Home | History | Annotate | Download | only in sender

Lines Matching refs:intent

17 package com.android.cts.intent.sender;
22 import android.content.Intent;
78 * This method will send an intent to a receiver in another profile.
79 * This intent will have, in the ClipData, a uri whose associated file stores a message.
80 * The receiver will read the message from the uri, and put it inside the result intent.
85 Intent intent = new Intent(ACTION_READ_FROM_URI);
86 intent.setClipData(ClipData.newRawUri("", uri));
87 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
89 final Intent result = mActivity.getCrossProfileResult(intent);
95 * This method will send an intent to a receiver in another profile.
96 * This intent will have a message in an extra, and a uri specified by the ClipData.
101 // It's the receiver of the intent that should write to the uri, not us. So, for now, we
105 Intent intent = new Intent(ACTION_WRITE_TO_URI);
106 intent.setClipData(ClipData.newRawUri("", uri));
107 intent.putExtra("extra_message", MESSAGE);
108 intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION
109 | Intent.FLAG_GRANT_READ_URI_PERMISSION);
111 mActivity.getCrossProfileResult(intent);
120 Intent intent = new Intent(ACTION_READ_FROM_URI);
121 intent.setClipData(ClipData.newRawUri("", uri));
123 final Intent result = mActivity.getCrossProfileResult(intent);
129 * The intent receiver will try to read uriNotGranted.
146 // activity with another intent.
149 Intent notGrant = new Intent(ACTION_READ_FROM_URI);
152 final Intent result = mActivity.getCrossProfileResult(notGrant);
166 final Intent intent = new Intent(ACTION_READ_FROM_URI);
167 intent.setClipData(ClipData.newRawUri("", uri));
168 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
171 final Intent result = mActivity.getCrossProfileResult(intent);
187 Intent intent = new Intent(ACTION_NOTIFY_URI_CHANGE);
188 intent.setClipData(ClipData.newRawUri("", uri));
189 intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION
190 | Intent.FLAG_GRANT_READ_URI_PERMISSION);
197 mActivity.getCrossProfileResult(intent);
211 Intent intent = new Intent(ACTION_OBSERVE_URI_CHANGE);
212 intent.setClipData(ClipData.newRawUri("", uri));
213 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
224 // A non-null result intent indicates success.
225 assertNotNull(mActivity.getCrossProfileResult(intent));
255 Intent grantPersistable = new Intent(ACTION_TAKE_PERSISTABLE_URI_PERMISSION);
257 grantPersistable.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
258 | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
267 .authority("com.android.cts.intent.sender.provider")
286 return FileProvider.getUriForFile(mContext, "com.android.cts.intent.sender.fileprovider",