Home
last modified time | relevance | path

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

12345678910>>...14

/developers/samples/android/media/MediaRouter/Application/src/main/java/com/example/android/mediarouter/provider/
DSampleMediaRouteProvider.java284 public boolean onControlRequest(Intent intent, ControlRequestCallback callback) { in onControlRequest() argument
285 Log.d(TAG, mRouteId + ": Received control request " + intent); in onControlRequest()
286 String action = intent.getAction(); in onControlRequest()
287 if (intent.hasCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)) { in onControlRequest()
290 success = handlePlay(intent, callback); in onControlRequest()
292 success = handleEnqueue(intent, callback); in onControlRequest()
294 success = handleRemove(intent, callback); in onControlRequest()
296 success = handleSeek(intent, callback); in onControlRequest()
298 success = handleGetStatus(intent, callback); in onControlRequest()
300 success = handlePause(intent, callback); in onControlRequest()
[all …]
/developers/build/prebuilts/gradle/MediaRouter/Application/src/main/java/com/example/android/mediarouter/provider/
DSampleMediaRouteProvider.java284 public boolean onControlRequest(Intent intent, ControlRequestCallback callback) { in onControlRequest() argument
285 Log.d(TAG, mRouteId + ": Received control request " + intent); in onControlRequest()
286 String action = intent.getAction(); in onControlRequest()
287 if (intent.hasCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)) { in onControlRequest()
290 success = handlePlay(intent, callback); in onControlRequest()
292 success = handleEnqueue(intent, callback); in onControlRequest()
294 success = handleRemove(intent, callback); in onControlRequest()
296 success = handleSeek(intent, callback); in onControlRequest()
298 success = handleGetStatus(intent, callback); in onControlRequest()
300 success = handlePause(intent, callback); in onControlRequest()
[all …]
/developers/build/prebuilts/gradle/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/
DUtilityService.java54 Intent intent = new Intent(context, UtilityService.class); in clearNotification() local
55 intent.setAction(UtilityService.ACTION_CLEAR_NOTIFICATION); in clearNotification()
56 context.startService(intent); in clearNotification()
64 Intent intent = new Intent(context, UtilityService.class); in getClearRemoteNotificationsIntent() local
65 intent.setAction(UtilityService.ACTION_CLEAR_REMOTE_NOTIFICATIONS); in getClearRemoteNotificationsIntent()
66 return intent; in getClearRemoteNotificationsIntent()
78 Intent intent = new Intent(context, UtilityService.class); in startDeviceActivity() local
79 intent.setAction(UtilityService.ACTION_START_DEVICE_ACTIVITY); in startDeviceActivity()
86 intent.putExtra(EXTRA_START_ACTIVITY_INFO, extraInfo); in startDeviceActivity()
87 intent.putExtra(EXTRA_START_PATH, path); in startDeviceActivity()
[all …]
/developers/samples/android/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/
DUtilityService.java54 Intent intent = new Intent(context, UtilityService.class); in clearNotification() local
55 intent.setAction(UtilityService.ACTION_CLEAR_NOTIFICATION); in clearNotification()
56 context.startService(intent); in clearNotification()
64 Intent intent = new Intent(context, UtilityService.class); in getClearRemoteNotificationsIntent() local
65 intent.setAction(UtilityService.ACTION_CLEAR_REMOTE_NOTIFICATIONS); in getClearRemoteNotificationsIntent()
66 return intent; in getClearRemoteNotificationsIntent()
78 Intent intent = new Intent(context, UtilityService.class); in startDeviceActivity() local
79 intent.setAction(UtilityService.ACTION_START_DEVICE_ACTIVITY); in startDeviceActivity()
86 intent.putExtra(EXTRA_START_ACTIVITY_INFO, extraInfo); in startDeviceActivity()
87 intent.putExtra(EXTRA_START_PATH, path); in startDeviceActivity()
[all …]
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chat/
DReplyToMessageIntentService.java56 protected void onHandleIntent(@Nullable Intent intent) { in onHandleIntent() argument
58 if (intent != null) { in onHandleIntent()
59 if (intent.hasExtra(Constants.EXTRA_CHAT)) { in onHandleIntent()
60 String action = intent.getAction(); in onHandleIntent()
62 handleReply(getMessage(intent), extractChat(intent)); in onHandleIntent()
85 private Chat extractChat(Intent intent) { in extractChat() argument
86 String chatId = intent.getStringExtra(Constants.EXTRA_CHAT); in extractChat()
93 private CharSequence getMessage(Intent intent) { in getMessage() argument
94 Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); in getMessage()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chat/
DReplyToMessageIntentService.java56 protected void onHandleIntent(@Nullable Intent intent) { in onHandleIntent() argument
58 if (intent != null) { in onHandleIntent()
59 if (intent.hasExtra(Constants.EXTRA_CHAT)) { in onHandleIntent()
60 String action = intent.getAction(); in onHandleIntent()
62 handleReply(getMessage(intent), extractChat(intent)); in onHandleIntent()
85 private Chat extractChat(Intent intent) { in extractChat() argument
86 String chatId = intent.getStringExtra(Constants.EXTRA_CHAT); in extractChat()
93 private CharSequence getMessage(Intent intent) { in getMessage() argument
94 Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); in getMessage()
/developers/build/prebuilts/gradle/ShareActionProvider/Application/src/main/java/com/example/android/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()
/developers/samples/android/content/ShareActionProvider/Application/src/main/java/com/example/android/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()
/developers/samples/android/deprecated/wearable/wear/Notifications/Application/src/main/java/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()
/developers/build/prebuilts/gradle/Notifications/Application/src/main/java/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()
/developers/samples/android/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/
DSendMessageActivity.java103 private boolean handleIntent(Intent intent) { in handleIntent() argument
104 if (Intent.ACTION_SEND.equals(intent.getAction()) in handleIntent()
105 && "text/plain".equals(intent.getType())) { in handleIntent()
106 mBody = intent.getStringExtra(Intent.EXTRA_TEXT); in handleIntent()
109 && intent.hasExtra(Intent.EXTRA_SHORTCUT_ID)) { in handleIntent()
110 String shortcutId = intent.getStringExtra(Intent.EXTRA_SHORTCUT_ID); in handleIntent()
136 Intent intent = new Intent(this, SelectContactActivity.class); in selectContact() local
137 intent.setAction(SelectContactActivity.ACTION_SELECT_CONTACT); in selectContact()
138 startActivityForResult(intent, REQUEST_SELECT_CONTACT); in selectContact()
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/
DAuthActivity.kt87 val intent = intent in <lambda>() constant
88 val forResponse = intent.getBooleanExtra(EXTRA_FOR_RESPONSE, true) in <lambda>()
89 val structure = intent.getParcelableExtra<AssistStructure>(EXTRA_ASSIST_STRUCTURE) in <lambda>()
99 val datasetName = intent.getStringExtra(EXTRA_DATASET_NAME) in <lambda>()
122 val intent = Intent(context, AuthActivity::class.java) in <lambda>() constant
123 return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT) in <lambda>()
128 val intent = Intent(context, AuthActivity::class.java) in <lambda>() constant
129 intent.putExtra(EXTRA_DATASET_NAME, datasetName) in <lambda>()
130 intent.putExtra(EXTRA_FOR_RESPONSE, false) in <lambda>()
131 return PendingIntent.getActivity(context, ++datasetPendingIntentId, intent, in <lambda>()
/developers/build/prebuilts/gradle/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/
DAuthActivity.kt87 val intent = intent in <lambda>() constant
88 val forResponse = intent.getBooleanExtra(EXTRA_FOR_RESPONSE, true) in <lambda>()
89 val structure = intent.getParcelableExtra<AssistStructure>(EXTRA_ASSIST_STRUCTURE) in <lambda>()
99 val datasetName = intent.getStringExtra(EXTRA_DATASET_NAME) in <lambda>()
122 val intent = Intent(context, AuthActivity::class.java) in <lambda>() constant
123 return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT) in <lambda>()
128 val intent = Intent(context, AuthActivity::class.java) in <lambda>() constant
129 intent.putExtra(EXTRA_DATASET_NAME, datasetName) in <lambda>()
130 intent.putExtra(EXTRA_FOR_RESPONSE, false) in <lambda>()
131 return PendingIntent.getActivity(context, ++datasetPendingIntentId, intent, in <lambda>()
/developers/samples/android/wearable/wear/XYZTouristAttractions/Application/src/main/java/com/example/android/xyztouristattractions/service/
DUtilityReceiver.java32 public void onReceive(Context context, Intent intent) { in onReceive() argument
37 intent.setClass(context, UtilityService.class); in onReceive()
38 intent.setAction(UtilityService.ACTION_GEOFENCE_TRIGGERED); in onReceive()
39 startWakefulService(context, intent); in onReceive()
DListenerService.java46 Intent intent = DetailActivity.getLaunchIntent(this, attractionName); in onMessageReceived() local
47 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in onMessageReceived()
48 startActivity(intent); in onMessageReceived()
54 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in onMessageReceived() local
55 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in onMessageReceived()
56 startActivity(intent); in onMessageReceived()
/developers/samples/android/content/DirectShare/Application/src/main/java/com/example/android/directshare/
DSendMessageActivity.java102 private boolean resolveIntent(Intent intent) { in resolveIntent() argument
103 if (Intent.ACTION_SEND.equals(intent.getAction()) && in resolveIntent()
104 "text/plain".equals(intent.getType())) { in resolveIntent()
105 mBody = intent.getStringExtra(Intent.EXTRA_TEXT); in resolveIntent()
106 mContactId = intent.getIntExtra(Contact.ID, Contact.INVALID_ID); in resolveIntent()
127 Intent intent = new Intent(this, SelectContactActivity.class); in selectContact() local
128 intent.setAction(SelectContactActivity.ACTION_SELECT_CONTACT); in selectContact()
129 startActivityForResult(intent, REQUEST_SELECT_CONTACT); in selectContact()
/developers/build/prebuilts/gradle/MultiWindowPlayground/Application/src/main/java/com/android/multiwindowplayground/
DMainActivity.java59 Intent intent = new Intent(this, UnresizableActivity.class); in onStartUnresizableClick() local
60 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in onStartUnresizableClick()
61 startActivity(intent); in onStartUnresizableClick()
80 Intent intent = new Intent(this, AdjacentActivity.class); in onStartAdjacentActivity() local
81 intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT | Intent.FLAG_ACTIVITY_NEW_TASK); in onStartAdjacentActivity()
82 startActivity(intent); in onStartAdjacentActivity()
96 Intent intent = new Intent(this, LaunchBoundsActivity.class); in onStartLaunchBoundsActivity() local
97 startActivity(intent, options.toBundle()); in onStartLaunchBoundsActivity()
/developers/samples/android/ui/window/MultiWindowPlayground/Application/src/main/java/com/android/multiwindowplayground/
DMainActivity.java59 Intent intent = new Intent(this, UnresizableActivity.class); in onStartUnresizableClick() local
60 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in onStartUnresizableClick()
61 startActivity(intent); in onStartUnresizableClick()
80 Intent intent = new Intent(this, AdjacentActivity.class); in onStartAdjacentActivity() local
81 intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT | Intent.FLAG_ACTIVITY_NEW_TASK); in onStartAdjacentActivity()
82 startActivity(intent); in onStartAdjacentActivity()
96 Intent intent = new Intent(this, LaunchBoundsActivity.class); in onStartLaunchBoundsActivity() local
97 startActivity(intent, options.toBundle()); in onStartLaunchBoundsActivity()
/developers/build/prebuilts/gradle/DirectShare/Application/src/main/java/com/example/android/directshare/
DSendMessageActivity.java102 private boolean resolveIntent(Intent intent) { in resolveIntent() argument
103 if (Intent.ACTION_SEND.equals(intent.getAction()) && in resolveIntent()
104 "text/plain".equals(intent.getType())) { in resolveIntent()
105 mBody = intent.getStringExtra(Intent.EXTRA_TEXT); in resolveIntent()
106 mContactId = intent.getIntExtra(Contact.ID, Contact.INVALID_ID); in resolveIntent()
127 Intent intent = new Intent(this, SelectContactActivity.class); in selectContact() local
128 intent.setAction(SelectContactActivity.ACTION_SELECT_CONTACT); in selectContact()
129 startActivityForResult(intent, REQUEST_SELECT_CONTACT); in selectContact()
/developers/build/prebuilts/gradle/XYZTouristAttractions/Application/src/main/java/com/example/android/xyztouristattractions/service/
DUtilityReceiver.java31 public void onReceive(Context context, Intent intent) { in onReceive() argument
36 intent.setClass(context, UtilityService.class); in onReceive()
37 intent.setAction(UtilityService.ACTION_GEOFENCE_TRIGGERED); in onReceive()
38 startWakefulService(context, intent); in onReceive()
DListenerService.java46 Intent intent = DetailActivity.getLaunchIntent(this, attractionName); in onMessageReceived() local
47 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in onMessageReceived()
48 startActivity(intent); in onMessageReceived()
54 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in onMessageReceived() local
55 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in onMessageReceived()
56 startActivity(intent); in onMessageReceived()
/developers/samples/android/deprecated/wearable/wear/ElizaChat/Application/src/main/java/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()
/developers/build/prebuilts/gradle/ElizaChat/Application/src/main/java/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()
/developers/build/prebuilts/gradle/WearComplicationProvidersTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/
DComplicationToggleReceiver.java35 public void onReceive(Context context, Intent intent) { in onReceive() argument
36 Bundle extras = intent.getExtras(); in onReceive()
58 Intent intent = new Intent(context, ComplicationToggleReceiver.class); in getToggleIntent() local
59 intent.putExtra(EXTRA_PROVIDER_COMPONENT, provider); in getToggleIntent()
60 intent.putExtra(EXTRA_COMPLICATION_ID, complicationId); in getToggleIntent()
65 context, complicationId, intent, PendingIntent.FLAG_UPDATE_CURRENT); in getToggleIntent()
/developers/samples/android/wearable/wear/WearComplicationProvidersTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/
DComplicationToggleReceiver.java35 public void onReceive(Context context, Intent intent) { in onReceive() argument
36 Bundle extras = intent.getExtras(); in onReceive()
58 Intent intent = new Intent(context, ComplicationToggleReceiver.class); in getToggleIntent() local
59 intent.putExtra(EXTRA_PROVIDER_COMPONENT, provider); in getToggleIntent()
60 intent.putExtra(EXTRA_COMPLICATION_ID, complicationId); in getToggleIntent()
65 context, complicationId, intent, PendingIntent.FLAG_UPDATE_CURRENT); in getToggleIntent()

12345678910>>...14