Code example for Intent

Methods: putExtraputExtrassetActionsetClassName

0
         * Build the {@link Intent} described by this item. If this item 
         * can't create a valid {@link android.content.ComponentName}, it will return 
         * {@link Intent#ACTION_CREATE_SHORTCUT} filled with the item label. 
         */ 
        Intent getIntent() {
            Intent intent = new Intent();
            if (packageName != null && className != null) {
                // Valid package and class, so fill details as normal intent 
                intent.setClassName(packageName, className);
                if (extras != null) {
                    intent.putExtras(extras);
                } 
            } else { 
                // No valid package or class, so treat as shortcut with label 
                intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
                intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, label);
            } 
            return intent;
        } 
 
        public CharSequence getLabel() {