Java Code Examples for android.content.Intent#getCharArrayExtra()

The following examples show how to use android.content.Intent#getCharArrayExtra() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: pocketknife   File: StringSerializer.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String get(Intent intent, String data, String keyPrefix) {
    char[] inArray = intent.getCharArrayExtra(keyPrefix);
    char[] outArray = new char[inArray.length - keyPrefix.length()];
    System.arraycopy(inArray, keyPrefix.length(), outArray, 0, outArray.length);
    return new String(outArray);
}
 
Example 2
Source Project: Ticket-Analysis   File: IntentUtil.java    License: MIT License 4 votes vote down vote up
public static char[] getCharArrayExtra(Intent intent, String name) {
    if (!hasIntent(intent) || !hasExtra(intent, name)) return null;
    return intent.getCharArrayExtra(name);
}