Home
last modified time | relevance | path

Searched refs:intent (Results 1 – 25 of 241) sorted by relevance

12345678910

/development/samples/devbytes/telephony/SmsSampleProject/SmsSample/src/main/java/com/example/android/smssample/receiver/
DMessagingReceiver.java35 public void onReceive(Context context, Intent intent) { in onReceive() argument
36 String action = intent == null ? null : intent.getAction(); in onReceive()
41 handleIncomingSms(context, intent); in onReceive()
43 handleIncomingMms(context, intent); in onReceive()
47 handleIncomingSms(context, intent); in onReceive()
49 handleIncomingMms(context, intent); in onReceive()
54 private void handleIncomingSms(Context context, Intent intent) { in handleIncomingSms() argument
57 intent.setAction(MessagingService.ACTION_MY_RECEIVE_SMS); in handleIncomingSms()
58 intent.setClass(context, MessagingService.class); in handleIncomingSms()
59 startWakefulService(context, intent); in handleIncomingSms()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/content/
DDocumentsSample.java80 Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); in onCreate()
81 intent.addCategory(Intent.CATEGORY_OPENABLE); in onCreate()
82 intent.setType("*/*"); in onCreate()
84 intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); in onCreate()
87 intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true); in onCreate()
89 startActivityForResult(intent, CODE_READ); in onCreate()
99 Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); in onCreate()
100 intent.addCategory(Intent.CATEGORY_OPENABLE); in onCreate()
101 intent.setType("image/*"); in onCreate()
103 intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); in onCreate()
[all …]
DInstallApk.java75 public void onActivityResult(int requestCode, int resultCode, Intent intent) { in onActivityResult() 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_INSTALL);
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/app/
DIntents.java37 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); in onGetMusic() local
38 intent.setType("audio/*"); in onGetMusic()
39 startActivity(Intent.createChooser(intent, "Select music")); in onGetMusic()
43 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); in onGetImage() local
44 intent.setType("image/*"); in onGetImage()
45 startActivity(Intent.createChooser(intent, "Select image")); in onGetImage()
49 Intent intent = new Intent(Intent.ACTION_GET_CONTENT); in onGetStream() local
50 intent.setType("*/*"); in onGetStream()
51 startActivity(Intent.createChooser(intent, "Select stream")); in onGetStream()
DLauncherShortcuts.java62 final Intent intent = getIntent(); in onCreate() local
63 final String action = intent.getAction(); in onCreate()
83 String info = intent.toString(); in onCreate()
84 String extra = intent.getStringExtra(EXTRA_KEY); in onCreate()
130 Intent intent = new Intent(); in setupShortcut() local
131 intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); in setupShortcut()
132 intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.shortcut_name)); in setupShortcut()
135 intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource); in setupShortcut()
139 setResult(RESULT_OK, intent); in setupShortcut()
DForegroundService.java151 public void onStart(Intent intent, int startId) { in onStart() argument
152 handleCommand(intent); in onStart()
156 public int onStartCommand(Intent intent, int flags, int startId) { in onStartCommand() argument
157 handleCommand(intent); in onStartCommand()
164 void handleCommand(Intent intent) { in handleCommand() argument
165 if (ACTION_FOREGROUND.equals(intent.getAction())) { in handleCommand()
183 } else if (ACTION_BACKGROUND.equals(intent.getAction())) { in handleCommand()
189 public IBinder onBind(Intent intent) { in onBind() argument
219 Intent intent = new Intent(ForegroundService.ACTION_FOREGROUND);
220 intent.setClass(Controller.this, ForegroundService.class);
[all …]
DIntentActivityFlags.java52 Intent intent = new Intent(Intent.ACTION_MAIN); in buildIntentsToViewsLists() local
53 intent.setClass(IntentActivityFlags.this, com.example.android.apis.ApiDemos.class); in buildIntentsToViewsLists()
54 intent.putExtra("com.example.android.apis.Path", "Views"); in buildIntentsToViewsLists()
55 intents[1] = intent; in buildIntentsToViewsLists()
57 intent = new Intent(Intent.ACTION_MAIN); in buildIntentsToViewsLists()
58 intent.setClass(IntentActivityFlags.this, com.example.android.apis.ApiDemos.class); in buildIntentsToViewsLists()
59 intent.putExtra("com.example.android.apis.Path", "Views/Lists"); in buildIntentsToViewsLists()
61 intents[2] = intent; in buildIntentsToViewsLists()
/development/samples/ApiDemos/src/com/example/android/apis/media/
DMediaPlayerDemo.java60 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/cmds/monkey/src/com/android/commands/monkey/
DMonkeyActivityEvent.java48 Intent intent = new Intent(Intent.ACTION_MAIN); in getEvent() local
49 intent.addCategory(Intent.CATEGORY_LAUNCHER); in getEvent()
50 intent.setComponent(mApp); in getEvent()
51 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); in getEvent()
52 return intent; in getEvent()
57 Intent intent = getEvent(); in injectEvent() local
59 System.out.println(":Switch: " + intent.toUri(0)); in injectEvent()
65 intent.putExtras(args); in injectEvent()
69 iam.startActivity(null, null, intent, null, null, null, 0, in injectEvent()
77 + intent.toUri(0)); in injectEvent()
/development/samples/Home/src/com/example/android/home/
DApplicationInfo.java36 Intent intent; field in ApplicationInfo
55 intent = new Intent(Intent.ACTION_MAIN); in setActivity()
56 intent.addCategory(Intent.CATEGORY_LAUNCHER); in setActivity()
57 intent.setComponent(className); in setActivity()
58 intent.setFlags(launchFlags); in setActivity()
72 intent.getComponent().getClassName().equals( in equals()
73 that.intent.getComponent().getClassName()); in equals()
80 final String name = intent.getComponent().getClassName(); in hashCode()
/development/samples/StackWidget/src/com/example/android/stackwidget/
DStackWidgetProvider.java48 public void onReceive(Context context, Intent intent) { in onReceive() argument
50 if (intent.getAction().equals(TOAST_ACTION)) { in onReceive()
51 int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, in onReceive()
53 int viewIndex = intent.getIntExtra(EXTRA_ITEM, 0); in onReceive()
56 super.onReceive(context, intent); in onReceive()
66 Intent intent = new Intent(context, StackWidgetService.class); in onUpdate() local
67 intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]); in onUpdate()
70 intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))); in onUpdate()
72 rv.setRemoteAdapter(appWidgetIds[i], R.id.stack_view, intent); in onUpdate()
85 intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))); in onUpdate()
/development/samples/browseable/MediaRouter/src/com.example.android.mediarouter/provider/
DSampleMediaRouteProvider.java285 public boolean onControlRequest(Intent intent, ControlRequestCallback callback) { in onControlRequest() argument
286 Log.d(TAG, mRouteId + ": Received control request " + intent); in onControlRequest()
287 String action = intent.getAction(); in onControlRequest()
288 if (intent.hasCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)) { in onControlRequest()
291 success = handlePlay(intent, callback); in onControlRequest()
293 success = handleEnqueue(intent, callback); in onControlRequest()
295 success = handleRemove(intent, callback); in onControlRequest()
297 success = handleSeek(intent, callback); in onControlRequest()
299 success = handleGetStatus(intent, callback); in onControlRequest()
301 success = handlePause(intent, callback); in onControlRequest()
[all …]
/development/samples/Support7Demos/src/com/example/android/supportv7/media/
DSampleMediaRouteProvider.java302 public boolean onControlRequest(Intent intent, ControlRequestCallback callback) { in onControlRequest() argument
303 Log.d(TAG, mRouteId + ": Received control request " + intent); in onControlRequest()
304 String action = intent.getAction(); in onControlRequest()
305 if (intent.hasCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)) { in onControlRequest()
308 success = handlePlay(intent, callback); in onControlRequest()
310 success = handleEnqueue(intent, callback); in onControlRequest()
312 success = handleRemove(intent, callback); in onControlRequest()
314 success = handleSeek(intent, callback); in onControlRequest()
316 success = handleGetStatus(intent, callback); in onControlRequest()
318 success = handlePause(intent, callback); in onControlRequest()
[all …]
/development/samples/training/notify-user/src/com/example/android/pingme/
DResultActivity.java39 Intent intent = new Intent(getApplicationContext(), PingService.class); in onSnoozeClick() local
40 intent.setAction(CommonConstants.ACTION_SNOOZE); in onSnoozeClick()
41 startService(intent); in onSnoozeClick()
45 Intent intent = new Intent(getApplicationContext(), PingService.class); in onDismissClick() local
46 intent.setAction(CommonConstants.ACTION_DISMISS); in onDismissClick()
47 startService(intent); in onDismissClick()
/development/samples/browseable/MessagingService/src/com.example.android.messagingservice/
DMessageReplyReceiver.java34 public void onReceive(Context context, Intent intent) { in onReceive() argument
35 if (MessagingService.REPLY_ACTION.equals(intent.getAction())) { in onReceive()
36 int conversationId = intent.getIntExtra(MessagingService.CONVERSATION_ID, -1); in onReceive()
37 CharSequence reply = getMessageText(intent); in onReceive()
51 private CharSequence getMessageText(Intent intent) { in getMessageText() argument
52 Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); in getMessageText()
/development/samples/devbytes/telephony/SmsSampleProject/SmsSample/src/main/java/com/example/android/smssample/service/
DMessagingService.java42 protected void onHandleIntent(Intent intent) { in onHandleIntent() argument
43 if (intent != null) { in onHandleIntent()
44 String intentAction = intent.getAction(); in onHandleIntent()
49 MessagingReceiver.completeWakefulIntent(intent); in onHandleIntent()
54 MessagingReceiver.completeWakefulIntent(intent); in onHandleIntent()
/development/samples/browseable/ActionBarCompat-ShareActionProvider/src/com.example.android.actionbarcompat.shareactionprovider/content/
DContentItem.java82 Intent intent = new Intent(Intent.ACTION_SEND); in getShareIntent() local
86 intent.setType("image/jpg"); in getShareIntent()
88 intent.putExtra(Intent.EXTRA_STREAM, getContentUri()); in getShareIntent()
92 intent.setType("text/plain"); in getShareIntent()
94 intent.putExtra(Intent.EXTRA_TEXT, context.getString(contentResourceId)); in getShareIntent()
98 return intent; in getShareIntent()
/development/samples/browseable/Notifications/Application/src/com.example.android.support.wearable.notifications/
DNotificationIntentReceiver.java40 public void onReceive(Context context, Intent intent) { in onReceive() argument
41 if (intent.getAction().equals(ACTION_EXAMPLE)) { in onReceive()
43 String message = intent.getStringExtra(NotificationUtil.EXTRA_MESSAGE); in onReceive()
44 Bundle remoteInputResults = RemoteInput.getResultsFromIntent(intent); in onReceive()
54 } else if (intent.getAction().equals(ACTION_ENABLE_MESSAGES)) { in onReceive()
56 } else if (intent.getAction().equals(ACTION_DISABLE_MESSAGES)) { in onReceive()
/development/samples/ApiDemos/src/com/example/android/apis/nfc/
DTechFilter.java38 Intent intent = getIntent(); in onCreate() local
39 String action = intent.getAction(); in onCreate()
41 mText.setText("Discovered tag " + ++mCount + " with intent: " + intent); in onCreate()
48 public void onNewIntent(Intent intent) { in onNewIntent() argument
49 mText.setText("Discovered tag " + ++mCount + " with intent: " + intent); in onNewIntent()
/development/apps/CustomLocale/src/com/android/customlocale2/
DCustomLocaleReceiver.java48 public void onReceive(Context context, Intent intent) { in onReceive() argument
50 if (intent == null || ! ACTION_SET_LOCALE.equals(intent.getAction())) { in onReceive()
52 Log.d(TAG, "Invalid intent: " + (intent == null ? "null" : intent.toString())); in onReceive()
57 String locale = intent.getStringExtra(EXTRA_LOCALE); in onReceive()
/development/samples/browseable/ElizaChat/Application/src/com.example.android.wearable.elizachat/
DResponderService.java67 public IBinder onBind(Intent intent) { in onBind() argument
72 public int onStartCommand(Intent intent, int flags, int startId) { in onStartCommand() argument
73 if (null == intent || null == intent.getAction()) { in onStartCommand()
76 String action = intent.getAction(); in onStartCommand()
78 Bundle remoteInputResults = RemoteInput.getResultsFromIntent(intent); in onStartCommand()
101 Intent intent = new Intent(ACTION_RESPONSE); in showNotification() local
102 PendingIntent pendingIntent = PendingIntent.getService(this, 0, intent, in showNotification()
134 Intent intent = new Intent(MainActivity.ACTION_NOTIFY); in broadcastMessage() local
135 intent.putExtra(MainActivity.EXTRA_MESSAGE, message); in broadcastMessage()
136 mBroadcastManager.sendBroadcast(intent); in broadcastMessage()
/development/samples/SupportAppNavigation/src/com/example/android/support/appnavigation/app/
DAppNavHomeActivity.java47 startActivity(info.intent); in onListItemClick()
51 Intent intent = new Intent(Intent.ACTION_MAIN, null); in querySampleActivities() local
52 intent.setPackage(getPackageName()); in querySampleActivities()
53 intent.addCategory(Intent.CATEGORY_SAMPLE_CODE); in querySampleActivities()
56 List<ResolveInfo> infos = pm.queryIntentActivities(intent, 0); in querySampleActivities()
78 Intent intent; field in AppNavHomeActivity.SampleInfo
80 SampleInfo(String name, Intent intent) { in SampleInfo() argument
82 this.intent = intent; in SampleInfo()
/development/samples/AppNavigation/src/com/example/android/appnavigation/app/
DAppNavHomeActivity.java47 startActivity(info.intent); in onListItemClick()
51 Intent intent = new Intent(Intent.ACTION_MAIN, null); in querySampleActivities() local
52 intent.setPackage(getPackageName()); in querySampleActivities()
53 intent.addCategory(Intent.CATEGORY_SAMPLE_CODE); in querySampleActivities()
56 List<ResolveInfo> infos = pm.queryIntentActivities(intent, 0); in querySampleActivities()
78 Intent intent; field in AppNavHomeActivity.SampleInfo
80 SampleInfo(String name, Intent intent) { in SampleInfo() argument
82 this.intent = intent; in SampleInfo()
/development/samples/training/device-management-policy/src/com/example/training/deviceadmin/
DSecureActivity.java32 Intent intent = new Intent(); in onResume() local
33 intent.setClass(this, PolicySetupActivity.class); in onResume()
34 intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | in onResume()
36 startActivity(intent); in onResume()
/development/samples/Support4Demos/src/com/example/android/supportv4/content/
DLocalServiceBroadcaster.java72 public void onReceive(Context context, Intent intent) { in onCreate()
73 if (intent.getAction().equals(ACTION_STARTED)) { in onCreate()
75 } else if (intent.getAction().equals(ACTION_UPDATE)) { in onCreate()
76 callbackData.setText("Got update: " + intent.getIntExtra("value", 0)); in onCreate()
77 } else if (intent.getAction().equals(ACTION_STOPPED)) { in onCreate()
121 Intent intent = new Intent(ACTION_UPDATE);
122 intent.putExtra("value", mCurUpdate);
123 mLocalBroadcastManager.sendBroadcast(intent);
139 public int onStartCommand(Intent intent, int flags, int startId) { in onStartCommand() argument
162 public IBinder onBind(Intent intent) { in onBind() argument

12345678910