Code example for ComponentName

Methods: flattenToString

0
    public static Intent wrap(Context context, Intent intent, ComponentName alsoUpdateExtension) {
        return new Intent(context, WidgetClickProxyActivity.class)
                .setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)))
                .putExtra(EXTRA_UPDATE_EXTENSION, (alsoUpdateExtension == null)
                        ? null 
                        : alsoUpdateExtension.flattenToString())
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                        | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    } 
 
    public static Intent getTemplate(Context context) {
        return new Intent(context, WidgetClickProxyActivity.class)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                        | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    } 
 
    public static Intent getFillIntent(Intent clickIntent) {
        return getFillIntent(clickIntent, null);
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE