/developers/samples/android/media/MediaRouter/Application/src/main/java/com/example/android/mediarouter/provider/ |
D | SampleMediaRouteProvider.java | 284 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/samples/android/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/ |
D | UtilityService.java | 54 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/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chat/ |
D | ReplyToMessageIntentService.java | 56 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/content/ShareActionProvider/Application/src/main/java/com/example/android/shareactionprovider/content/ |
D | ContentItem.java | 82 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/ |
D | NotificationIntentReceiver.java | 40 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/ |
D | SendMessageActivity.java | 103 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/wearable/wear/XYZTouristAttractions/Application/src/main/java/com/example/android/xyztouristattractions/service/ |
D | UtilityReceiver.java | 32 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()
|
D | ListenerService.java | 46 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()
|
D | UtilityService.java | 89 Intent intent = new Intent(context, UtilityService.class); in triggerWearTest() local 90 intent.setAction(UtilityService.ACTION_FAKE_UPDATE); in triggerWearTest() 91 intent.putExtra(EXTRA_TEST_MICROAPP, microApp); in triggerWearTest() 92 context.startService(intent); in triggerWearTest() 96 Intent intent = new Intent(context, UtilityService.class); in addGeofences() local 97 intent.setAction(UtilityService.ACTION_ADD_GEOFENCES); in addGeofences() 98 context.startService(intent); in addGeofences() 102 Intent intent = new Intent(context, UtilityService.class); in requestLocation() local 103 intent.setAction(UtilityService.ACTION_REQUEST_LOCATION); in requestLocation() 104 context.startService(intent); in requestLocation() [all …]
|
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/ |
D | AuthActivity.kt | 87 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/content/DirectShare/Application/src/main/java/com/example/android/directshare/ |
D | SendMessageActivity.java | 102 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/samples/android/ui/window/MultiWindowPlayground/Application/src/main/java/com/android/multiwindowplayground/ |
D | MainActivity.java | 59 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/deprecated/wearable/wear/ElizaChat/Application/src/main/java/com/example/android/wearable/elizachat/ |
D | ResponderService.java | 67 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/samples/android/wearable/wear/WearComplicationProvidersTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/ |
D | ComplicationToggleReceiver.java | 35 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/notification/MessagingService/Application/src/main/java/com/example/android/messagingservice/ |
D | MessageReplyReceiver.java | 40 public void onReceive(Context context, Intent intent) { in onReceive() argument 41 if (MessagingService.REPLY_ACTION.equals(intent.getAction())) { in onReceive() 42 int conversationId = intent.getIntExtra(MessagingService.CONVERSATION_ID, -1); in onReceive() 43 CharSequence reply = getMessageText(intent); in onReceive() 68 private CharSequence getMessageText(Intent intent) { in getMessageText() argument 69 Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); in getMessageText()
|
/developers/samples/android/wearable/wear/XYZTouristAttractions/Application/src/main/java/com/example/android/xyztouristattractions/ui/ |
D | DetailActivity.java | 43 Intent intent = getLaunchIntent(activity, attraction); in launch() local 47 ActivityCompat.startActivity(activity, intent, options.toBundle()); in launch() 49 activity.startActivity(intent); in launch() 54 Intent intent = new Intent(context, DetailActivity.class); in getLaunchIntent() local 55 intent.putExtra(EXTRA_ATTRACTION, attraction); in getLaunchIntent() 56 return intent; in getLaunchIntent()
|
/developers/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/provider/ |
D | ComplicationToggleReceiver.java | 44 public void onReceive(Context context, Intent intent) { in onReceive() argument 45 Bundle extras = intent.getExtras(); in onReceive() 73 Intent intent = new Intent(context, ComplicationToggleReceiver.class); in getToggleIntent() local 74 intent.putExtra(EXTRA_PROVIDER_COMPONENT, provider); in getToggleIntent() 75 intent.putExtra(EXTRA_COMPLICATION_ID, complicationId); in getToggleIntent() 80 context, complicationId, intent, PendingIntent.FLAG_UPDATE_CURRENT); in getToggleIntent()
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/ |
D | MainActivity.kt | 61 intent?.let(::handleIntent) in onCreate() 65 override fun onNewIntent(intent: Intent?) { in onNewIntent() 66 super.onNewIntent(intent) in onNewIntent() 67 if (intent != null) { in onNewIntent() 68 handleIntent(intent) in onNewIntent() 72 private fun handleIntent(intent: Intent) { in handleIntent() 73 if (intent.action == Intent.ACTION_VIEW) { in handleIntent() 74 val id = intent.data.lastPathSegment.toLongOrNull() in handleIntent()
|
/developers/samples/android/content/contacts/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/ |
D | MainActivity.java | 48 protected void onNewIntent(Intent intent) { in onNewIntent() argument 49 handleIntent(intent); in onNewIntent() 57 private void handleIntent(Intent intent) { in handleIntent() argument 60 if (Intent.ACTION_SEARCH.equals(intent.getAction())) { in handleIntent() 63 String query = intent.getStringExtra(SearchManager.QUERY); in handleIntent()
|
/developers/samples/android/wearable/wear/WearNotifications/Application/src/main/java/com/example/android/wearable/wear/wearnotifications/handlers/ |
D | BigPictureSocialIntentService.java | 57 protected void onHandleIntent(Intent intent) { in onHandleIntent() argument 58 Log.d(TAG, "onHandleIntent(): " + intent); in onHandleIntent() 60 if (intent != null) { in onHandleIntent() 61 final String action = intent.getAction(); in onHandleIntent() 63 handleActionComment(getMessage(intent)); in onHandleIntent() 122 private CharSequence getMessage(Intent intent) { in getMessage() argument 123 Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); in getMessage() 183 Intent intent = new Intent(this, BigPictureSocialIntentService.class); in recreateBuilderWithBigPictureStyle() local 184 intent.setAction(BigPictureSocialIntentService.ACTION_COMMENT); in recreateBuilderWithBigPictureStyle() 185 replyActionPendingIntent = PendingIntent.getService(this, 0, intent, 0); in recreateBuilderWithBigPictureStyle()
|
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/util/ |
D | SchedulerHelper.java | 52 Intent intent = new Intent(context, MockIncomingMessageReceiver.class); in createPendingIntentToNotifyMessage() local 53 intent.setAction(Constants.ACTION_RECEIVE_MESSAGE); in createPendingIntentToNotifyMessage() 54 intent.putExtra(Constants.EXTRA_CHAT, chat.getId()); in createPendingIntentToNotifyMessage() 55 intent.putExtra(Constants.EXTRA_MESSAGE, message.getId()); in createPendingIntentToNotifyMessage() 57 return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); in createPendingIntentToNotifyMessage()
|
/developers/samples/android/ui/window/MultiWindowPlayground/kotlinApp/Application/src/main/java/com/android/multiwindowplayground/ |
D | MainActivity.kt | 55 val intent = Intent(this, UnresizableActivity::class.java).apply { in onStartUnresizableClick() constant 58 startActivity(intent) in onStartUnresizableClick() 78 val intent = Intent(this, AdjacentActivity::class.java).apply { in onStartAdjacentActivity() constant 81 startActivity(intent) in onStartAdjacentActivity() 97 val intent = Intent(this, LaunchBoundsActivity::class.java) in onStartLaunchBoundsActivity() constant 98 startActivity(intent, options.toBundle()) in onStartLaunchBoundsActivity()
|
/developers/samples/android/admin/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/ |
D | SetupProfileFragment.java | 78 Intent intent = new Intent(ACTION_PROVISION_MANAGED_PROFILE); in provisionManagedProfile() local 80 intent.putExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME, in provisionManagedProfile() 84 intent.putExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME, in provisionManagedProfile() 86 … intent.putExtra(EXTRA_DEVICE_ADMIN, EnforcerDeviceAdminReceiver.getComponentName(activity)); in provisionManagedProfile() 88 if (intent.resolveActivity(activity.getPackageManager()) != null) { in provisionManagedProfile() 89 startActivityForResult(intent, REQUEST_PROVISION_MANAGED_PROFILE); in provisionManagedProfile()
|
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/ |
D | CreditCardCompoundViewActivity.kt | 47 val intent = WelcomeActivity.getStartActivityIntent(this) in submit() constant 48 startActivity(intent) in submit() 54 val intent = Intent(context, CreditCardCompoundViewActivity::class.java) in getStartActivityIntent() constant 55 return intent in getStartActivityIntent()
|
/developers/samples/android/system/AppShortcuts/app/src/main/java/com/example/android/appshortcuts/ |
D | MyReceiver.java | 27 public void onReceive(Context context, Intent intent) { in onReceive() argument 28 Log.i(TAG, "onReceive: " + intent); in onReceive() 29 if (Intent.ACTION_LOCALE_CHANGED.equals(intent.getAction())) { in onReceive()
|