Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Intent;

public class Main {
    public static char getCharExtra(Intent intent, String name, char defaultValue) {
        if (!hasIntent(intent) || !hasExtra(intent, name))
            return defaultValue;
        return intent.getCharExtra(name, defaultValue);
    }

    public static boolean hasIntent(Intent intent) {
        return intent != null;
    }

    public static boolean hasExtra(Intent intent, String key) {
        return intent.hasExtra(key);
    }
}