/development/samples/training/device-management-policy/src/com/example/training/deviceadmin/ |
H A D | SecureActivity.java | 32 Intent intent = new Intent(); 33 intent.setClass(this, PolicySetupActivity.class); 34 intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | 36 startActivity(intent);
|
/development/cmds/monkey/src/com/android/commands/monkey/ |
H A D | MonkeyActivityEvent.java | 48 Intent intent = new Intent(Intent.ACTION_MAIN); 49 intent.addCategory(Intent.CATEGORY_LAUNCHER); 50 intent.setComponent(mApp); 51 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); 52 return intent; 57 Intent intent = getEvent(); 59 System.out.println(":Switch: " + intent.toUri(0)); 65 intent.putExtras(args); 69 iam.startActivity(null, intent, null, null, null, 0, 77 + intent [all...] |
/development/samples/training/notify-user/src/com/example/android/pingme/ |
H A D | ResultActivity.java | 39 Intent intent = new Intent(getApplicationContext(), PingService.class); 40 intent.setAction(CommonConstants.ACTION_SNOOZE); 41 startService(intent); 45 Intent intent = new Intent(getApplicationContext(), PingService.class); 46 intent.setAction(CommonConstants.ACTION_DISMISS); 47 startService(intent);
|
/development/samples/ApiDemos/src/com/example/android/apis/media/ |
H A D | MediaPlayerDemo.java | 60 Intent intent = 63 intent.putExtra(MEDIA, LOCAL_AUDIO); 64 startActivity(intent); 70 Intent intent = 73 intent.putExtra(MEDIA, RESOURCES_AUDIO); 74 startActivity(intent); 81 Intent intent = 84 intent.putExtra(MEDIA, LOCAL_VIDEO); 85 startActivity(intent); 91 Intent intent [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
H A D | LauncherShortcuts.java | 35 * 2. Any time the user clicks on an installed shortcut, an intent is sent. 49 * In a real application, you would probably use the shortcut intent to display specific content 60 // Resolve the intent 62 final Intent intent = getIntent(); 63 final String action = intent.getAction(); 65 // If the intent is a request to create a shortcut, we'll do that and exit 73 // If we weren't launched with a CREATE_SHORTCUT intent, simply put up an informative 83 String info = intent.toString(); 84 String extra = intent.getStringExtra(EXTRA_KEY); 95 * The first intent serve [all...] |
H A D | IntentActivityFlags.java | 52 Intent intent = new Intent(Intent.ACTION_MAIN); 53 intent.setClass(IntentActivityFlags.this, com.example.android.apis.ApiDemos.class); 54 intent.putExtra("com.example.android.apis.Path", "Views"); 55 intents[1] = intent; 57 intent = new Intent(Intent.ACTION_MAIN); 58 intent.setClass(IntentActivityFlags.this, com.example.android.apis.ApiDemos.class); 59 intent.putExtra("com.example.android.apis.Path", "Views/Lists"); 61 intents[2] = intent;
|
H A D | Forwarding.java | 78 Intent intent = new Intent(); 79 intent.setClass(Forwarding.this, ForwardTarget.class); 80 startActivity(intent);
|
H A D | Intents.java | 42 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); 43 intent.setType("audio/*"); 44 startActivity(Intent.createChooser(intent, "Select music"));
|
H A D | ReorderFour.java | 41 Intent intent = new Intent(ReorderFour.this, ReorderTwo.class); 42 intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); 43 startActivity(intent);
|
/development/samples/Home/src/com/example/android/home/ |
H A D | ApplicationInfo.java | 24 * Represents a launchable application. An application is made of a name (or title), an intent 34 * The intent used to start the application. 36 Intent intent; field in class:ApplicationInfo 49 * Creates the application intent based on a component name and various launch flags. 51 * @param className the class name of the component representing the intent 55 intent = new Intent(Intent.ACTION_MAIN); 56 intent.addCategory(Intent.CATEGORY_LAUNCHER); 57 intent.setComponent(className); 58 intent.setFlags(launchFlags); 72 intent [all...] |
/development/samples/SampleSyncAdapter/src/com/example/android/samplesync/notifier/ |
H A D | NotifierService.java | 34 protected void onHandleIntent(Intent intent) { argument 37 Log.i(TAG, "Contact opened: " + intent.getData());
|
/development/samples/ApiDemos/src/com/example/android/apis/nfc/ |
H A D | TechFilter.java | 38 Intent intent = getIntent(); 39 String action = intent.getAction(); 41 mText.setText("Discovered tag " + ++mCount + " with intent: " + intent); 48 public void onNewIntent(Intent intent) { argument 49 mText.setText("Discovered tag " + ++mCount + " with intent: " + intent);
|
/development/samples/StackWidget/src/com/example/android/stackwidget/ |
H A D | StackWidgetProvider.java | 48 public void onReceive(Context context, Intent intent) { argument 50 if (intent.getAction().equals(TOAST_ACTION)) { 51 int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, 53 int viewIndex = intent.getIntExtra(EXTRA_ITEM, 0); 56 super.onReceive(context, intent); 64 // Here we setup the intent which points to the StackViewService which will 66 Intent intent = new Intent(context, StackWidgetService.class); 67 intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]); 70 intent.setData(Uri.parse(intent [all...] |
/development/samples/XmlAdapters/src/com/example/android/xmladapters/ |
H A D | UrlIntentListener.java | 34 final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); 35 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 37 context.startActivity(intent);
|
/development/samples/AppNavigation/src/com/example/android/appnavigation/app/ |
H A D | ContentViewActivity.java | 34 Intent intent = getIntent(); 35 if (Intent.ACTION_VIEW.equals(intent.getAction())) { 38 } else if (intent.hasExtra(EXTRA_TEXT)) { 40 tv.setText(intent.getStringExtra(EXTRA_TEXT));
|
H A D | AppNavHomeActivity.java | 47 startActivity(info.intent); 51 Intent intent = new Intent(Intent.ACTION_MAIN, null); 52 intent.setPackage(getPackageName()); 53 intent.addCategory(Intent.CATEGORY_SAMPLE_CODE); 56 List<ResolveInfo> infos = pm.queryIntentActivities(intent, 0); 78 Intent intent; field in class:AppNavHomeActivity.SampleInfo 80 SampleInfo(String name, Intent intent) { argument 82 this.intent = intent;
|
H A D | OutsideTaskActivity.java | 33 Intent intent = new Intent(Intent.ACTION_VIEW) 36 startActivity(intent);
|
/development/samples/BrowserPlugin/src/com/android/sampleplugin/ |
H A D | SamplePlugin.java | 34 public IBinder onBind(Intent intent) { argument
|
/development/apps/CustomLocale/src/com/android/customlocale2/ |
H A D | CustomLocaleReceiver.java | 33 * $ adb shell am broadcast -a com.android.intent.action.SET_LOCALE \
34 * --es com.android.intent.extra.LOCALE en_US
43 public static final String ACTION_SET_LOCALE = "com.android.intent.action.SET_LOCALE";
45 public static final String EXTRA_LOCALE = "com.android.intent.extra.LOCALE";
48 public void onReceive(Context context, Intent intent) {
argument 50 if (intent == null || ! ACTION_SET_LOCALE.equals(intent.getAction())) {
52 Log.d(TAG, "Invalid intent: " + (intent == null ? "null" : intent [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/content/ |
H A D | InstallApk.java | 75 public void onActivityResult(int requestCode, int resultCode, Intent intent) { argument 97 Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); 98 intent.setData(Uri.fromFile(prepareApk("HelloActivity.apk"))); 99 startActivity(intent); 105 Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); 106 intent.setData(Uri.fromFile(prepareApk("HelloActivity.apk"))); 107 intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true); 108 intent.putExtra(Intent.EXTRA_RETURN_RESULT, true); 109 intent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, 111 startActivityForResult(intent, REQUEST_INSTAL [all...] |
/development/samples/SupportAppNavigation/src/com/example/android/support/appnavigation/app/ |
H A D | AppNavHomeActivity.java | 47 startActivity(info.intent); 51 Intent intent = new Intent(Intent.ACTION_MAIN, null); 52 intent.setPackage(getPackageName()); 53 intent.addCategory(Intent.CATEGORY_SAMPLE_CODE); 56 List<ResolveInfo> infos = pm.queryIntentActivities(intent, 0); 78 Intent intent; field in class:AppNavHomeActivity.SampleInfo 80 SampleInfo(String name, Intent intent) { argument 82 this.intent = intent;
|
H A D | OutsideTaskActivity.java | 33 Intent intent = new Intent(Intent.ACTION_VIEW) 36 startActivity(intent);
|
/development/samples/ToyVpn/src/com/example/android/toyvpn/ |
H A D | ToyVpnClient.java | 47 Intent intent = VpnService.prepare(this); 48 if (intent != null) { 49 startActivityForResult(intent, 0); 59 Intent intent = new Intent(this, ToyVpnService.class) 63 startService(intent);
|
/development/apps/BluetoothDebug/src/com/android/bluetoothdebug/ |
H A D | DebugReceiver.java | 46 public void onReceive(Context context, Intent intent) { argument 47 Log.d(TAG, shorten(intent.getAction())); 49 Bundle bundle = intent.getExtras();
|
/development/apps/Development/src/com/android/development/ |
H A D | DataList.java | 38 Intent intent = getIntent(); 40 mCursor = getContentResolver().query(intent.getData(), null, null, null, null); 41 mDisplay = intent.getStringExtra("display"); 102 Intent intent = new Intent(Intent.ACTION_VIEW, uri); 103 intent.setClass(this, Details.class); 105 intent.putExtra("data", data); 108 intent.putExtra("title", 112 startActivity(intent);
|