Java Code Examples for android.content.Intent#putStringArrayListExtra()
The following examples show how to use
android.content.Intent#putStringArrayListExtra() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RongCallKit.java From sealtalk-android with MIT License | 6 votes |
/** * 发起多人通话 * * @param context 上下文 * @param conversationType 会话类型 * @param targetId 会话 id * @param mediaType 会话媒体类型 * @param userIds 参与者 id 列表 */ public static void startMultiCall(Context context, Conversation.ConversationType conversationType, String targetId, CallMediaType mediaType, ArrayList<String> userIds) { String action; if (mediaType.equals(CallMediaType.CALL_MEDIA_TYPE_AUDIO)) { action = RongVoIPIntent.RONG_INTENT_ACTION_VOIP_MULTIAUDIO; } else { action = RongVoIPIntent.RONG_INTENT_ACTION_VOIP_MULTIVIDEO; } Intent intent = new Intent(action); userIds.add(RongIMClient.getInstance().getCurrentUserId()); intent.putExtra("conversationType", conversationType.getName().toLowerCase()); intent.putExtra("targetId", targetId); intent.putExtra("callAction", RongCallAction.ACTION_OUTGOING_CALL.getName()); intent.putStringArrayListExtra("invitedUsers", userIds); context.startActivity(intent); }
Example 2
Source File: SubredditMultiselectionActivity.java From Infinity-For-Reddit with GNU Affero General Public License v3.0 | 6 votes |
@Override public boolean onOptionsItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; case R.id.action_save_subreddit_multiselection_activity: if (mAdapter != null) { Intent returnIntent = new Intent(); returnIntent.putStringArrayListExtra(EXTRA_RETURN_SELECTED_SUBREDDITS, mAdapter.getAllSelectedSubreddits()); setResult(RESULT_OK, returnIntent); } finish(); return true; case R.id.action_search_subreddit_multiselection_activity: Intent intent = new Intent(this, SearchActivity.class); intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, true); startActivityForResult(intent, SUBREDDIT_SEARCH_REQUEST_CODE); } return false; }
Example 3
Source File: PuzzleActivity.java From imsdk-android with MIT License | 6 votes |
public static void startWithPaths(android.support.v4.app.Fragment fragmentV, ArrayList<String> paths, String puzzleSaveDirPath, String puzzleSaveNamePrefix, int requestCode, boolean replaceCustom, @NonNull ImageEngine imageEngine) { if (null != toClass) { toClass.clear(); toClass = null; } if (Setting.imageEngine != imageEngine) { Setting.imageEngine = imageEngine; } Intent intent = new Intent(fragmentV.getActivity(), PuzzleActivity.class); intent.putExtra(Key.PUZZLE_FILE_IS_PHOTO, false); intent.putStringArrayListExtra(Key.PUZZLE_FILES, paths); intent.putExtra(Key.PUZZLE_SAVE_DIR, puzzleSaveDirPath); intent.putExtra(Key.PUZZLE_SAVE_NAME_PREFIX, puzzleSaveNamePrefix); if (replaceCustom) { if (null != fragmentV.getActivity()) toClass = new WeakReference<Class<? extends Activity>>(fragmentV.getActivity().getClass()); } fragmentV.startActivityForResult(intent, requestCode); }
Example 4
Source File: AlbumListActivity.java From jmessage-android-uikit with MIT License | 5 votes |
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { List<String> childList = mGruopMap.get(list.get(position).getFolderName()); Intent intent = new Intent(); intent.setClass(AlbumListActivity.this, PickPictureActivity.class); intent.putExtra("albumName", list.get(position).getFolderName()); intent.putStringArrayListExtra("data", (ArrayList<String>) childList); startActivityForResult(intent, REQUEST_CODE_SELECT_PICTURE); }
Example 5
Source File: NaviVoice.java From PocketMaps with MIT License | 5 votes |
public static void showTtsActivity(Activity activity) { Intent installTTSIntent = new Intent(); installTTSIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA); ArrayList<String> languages = new ArrayList<String>(); languages.add(DISPLAY_LANG); languages.add("en"); installTTSIntent.putStringArrayListExtra(TextToSpeech.Engine.EXTRA_CHECK_VOICE_DATA_FOR, languages); activity.startActivity(installTTSIntent); }
Example 6
Source File: BtnNavClipboard.java From XposedNavigationBar with GNU General Public License v3.0 | 5 votes |
@Override protected void getClipboadrData(Context context) { ArrayList<String> data = MyClipBoard.getClipboardData(); for (String s : data) { XpLog.i(s); } Intent intent = new Intent(ACTION_CLIPBOARD); intent.putStringArrayListExtra("data", data); //使用这种启动标签,可以避免在打开软件本身以后再通过快捷键呼出备忘对话框时仍然显示软件的界面的bug intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); context.startActivity(intent); }
Example 7
Source File: GalleryActivity.java From TLint with Apache License 2.0 | 5 votes |
@OnClick(R.id.btCommit) void setBtCommitClick() { if (resultList != null && resultList.size() > 0) { // 返回已选择的图片数据 Intent data = new Intent(); data.putStringArrayListExtra(EXTRA_RESULT, resultList); setResult(RESULT_OK, data); finish(); } }
Example 8
Source File: BigImagePagerActivity.java From youqu_master with Apache License 2.0 | 5 votes |
public static void startImagePagerActivity(Activity activity, List<String> imgUrls, int position){ Intent intent = new Intent(activity, BigImagePagerActivity.class); intent.putStringArrayListExtra(INTENT_IMGURLS, new ArrayList<String>(imgUrls)); intent.putExtra(INTENT_POSITION, position); activity.startActivity(intent); activity.overridePendingTransition(R.anim.fade_in, R.anim.fade_out); }
Example 9
Source File: LocationsManagerBase.java From edslite with GNU General Public License v2.0 | 5 votes |
public static void storePathsInIntent(Intent i, Location loc, Collection<? extends Path> paths) { i.setData(loc.getLocationUri()); i.putExtra(PARAM_LOCATION_URI, loc.getLocationUri()); if(paths != null) i.putStringArrayListExtra(PARAM_PATHS, Util.storePaths(paths)); }
Example 10
Source File: TextShow.java From WeCenterMobile-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onClick(View v) { // ��תijҳ�� Intent intent = new Intent(); intent.putStringArrayListExtra("images", urlSpans); intent.putExtra("tag",tag); intent.setClass(context, ShowPic.class); context.startActivity(intent); }
Example 11
Source File: MultiImageSelectorActivity.java From ImageChoose with MIT License | 5 votes |
@Override public void onSingleImageSelected(String path) { Intent data = new Intent(); resultList.add(path); data.putStringArrayListExtra(EXTRA_RESULT, resultList); setResult(RESULT_OK, data); finish(); }
Example 12
Source File: VaultsListFragment.java From secrecy with Apache License 2.0 | 5 votes |
void restore() { ArrayList<String> INCLUDE_EXTENSIONS_LIST = new ArrayList<String>(); INCLUDE_EXTENSIONS_LIST.add(".zip"); Intent intent = new Intent(context, FileChooserActivity.class); intent.putStringArrayListExtra( FileChooserActivity.EXTRA_FILTER_INCLUDE_EXTENSIONS, INCLUDE_EXTENSIONS_LIST); intent.putExtra(FileChooserActivity.PATH, Storage.getRoot().getAbsolutePath()); startActivityForResult(intent, REQUESTCODE); }
Example 13
Source File: GalleryAnimationActivity.java From iBeebo with GNU General Public License v3.0 | 5 votes |
public static Intent newIntent(ArrayList<String> lPics, ArrayList<AnimationRect> rectList, int initPosition) { Intent intent = new Intent(BeeboApplication.getInstance(), GalleryAnimationActivity.class); intent.putStringArrayListExtra("pics", lPics); intent.putExtra("position", initPosition); intent.putExtra("rect", rectList); intent.putExtra("hot_model", true); return intent; }
Example 14
Source File: PreviewImageFromLocalActivity.java From NIM_Android_UIKit with MIT License | 5 votes |
public static Intent initPreviewImageIntent( ArrayList<String> thumbnailImageList, ArrayList<String> orignialImageList, boolean isOrignial ) { Intent intent = new Intent(); intent.putStringArrayListExtra(Extras.EXTRA_SCALED_IMAGE_LIST, thumbnailImageList); intent.putStringArrayListExtra(Extras.EXTRA_ORIG_IMAGE_LIST, orignialImageList); intent.putExtra(Extras.EXTRA_IS_ORIGINAL, isOrignial); return intent; }
Example 15
Source File: CheckForWonGiveaways.java From SteamGifts with MIT License | 5 votes |
/** * Return an intent for dismissing all won games, i.e. not showing them in future anymore. * * @return intent for dismissing all won games. */ private PendingIntent getDeleteIntent() { if (lastGiveawayIds == null) Log.w(TAG, "Calling getDeleteIntent without giveaway ids"); Intent intent = new Intent(context, CheckForNewMessages.class); intent.setAction(ACTION_DELETE); intent.putStringArrayListExtra(EXTRA_GIVEAWAY_IDS, lastGiveawayIds); return PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); }
Example 16
Source File: Tethering.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
private void sendTetherStateChangedBroadcast() { if (!mDeps.isTetheringSupported()) return; final ArrayList<String> availableList = new ArrayList<>(); final ArrayList<String> tetherList = new ArrayList<>(); final ArrayList<String> localOnlyList = new ArrayList<>(); final ArrayList<String> erroredList = new ArrayList<>(); boolean wifiTethered = false; boolean usbTethered = false; boolean bluetoothTethered = false; final TetheringConfiguration cfg = mConfig; synchronized (mPublicSync) { for (int i = 0; i < mTetherStates.size(); i++) { TetherState tetherState = mTetherStates.valueAt(i); String iface = mTetherStates.keyAt(i); if (tetherState.lastError != TETHER_ERROR_NO_ERROR) { erroredList.add(iface); } else if (tetherState.lastState == IControlsTethering.STATE_AVAILABLE) { availableList.add(iface); } else if (tetherState.lastState == IControlsTethering.STATE_LOCAL_ONLY) { localOnlyList.add(iface); } else if (tetherState.lastState == IControlsTethering.STATE_TETHERED) { if (cfg.isUsb(iface)) { usbTethered = true; } else if (cfg.isWifi(iface)) { wifiTethered = true; } else if (cfg.isBluetooth(iface)) { bluetoothTethered = true; } tetherList.add(iface); } } } final Intent bcast = new Intent(ACTION_TETHER_STATE_CHANGED); bcast.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); bcast.putStringArrayListExtra(EXTRA_AVAILABLE_TETHER, availableList); bcast.putStringArrayListExtra(EXTRA_ACTIVE_LOCAL_ONLY, localOnlyList); bcast.putStringArrayListExtra(EXTRA_ACTIVE_TETHER, tetherList); bcast.putStringArrayListExtra(EXTRA_ERRORED_TETHER, erroredList); mContext.sendStickyBroadcastAsUser(bcast, UserHandle.ALL); if (DBG) { Log.d(TAG, String.format( "sendTetherStateChangedBroadcast %s=[%s] %s=[%s] %s=[%s] %s=[%s]", "avail", TextUtils.join(",", availableList), "local_only", TextUtils.join(",", localOnlyList), "tether", TextUtils.join(",", tetherList), "error", TextUtils.join(",", erroredList))); } if (usbTethered) { if (wifiTethered || bluetoothTethered) { showTetheredNotification(SystemMessage.NOTE_TETHER_GENERAL); } else { showTetheredNotification(SystemMessage.NOTE_TETHER_USB); } } else if (wifiTethered) { if (bluetoothTethered) { showTetheredNotification(SystemMessage.NOTE_TETHER_GENERAL); } else { /* We now have a status bar icon for WifiTethering, so drop the notification */ clearTetheredNotification(); } } else if (bluetoothTethered) { showTetheredNotification(SystemMessage.NOTE_TETHER_BLUETOOTH); } else { clearTetheredNotification(); } }
Example 17
Source File: FormRecordProcessor.java From commcare-android with Apache License 2.0 | 4 votes |
/** * This is the entry point for processing a form. New transaction types * should all be declared here. */ public FormRecord process(FormRecord record) throws InvalidStructureException, IOException, XmlPullParserException, UnfullfilledRequirementsException { String form = record.getFilePath(); final File f = new File(form); final Cipher decrypter = FormUploadUtil.getDecryptCipher((new SecretKeySpec(record.getAesKey(), "AES"))); InputStream is = new CipherInputStream(new FileInputStream(f), decrypter); AndroidTransactionParserFactory factory = new AndroidTransactionParserFactory(c, null) { @Override public TransactionParser getParser(KXmlParser parser) { String namespace = parser.getNamespace(); String name = parser.getName(); if (LedgerXmlParsers.STOCK_XML_NAMESPACE.equals(namespace) || "case".equalsIgnoreCase(name)) { return super.getParser(parser); } else { return null; } } }; XmlFormRecordProcessor.process(is, factory); //Let anyone who is listening know! Intent i = new Intent("org.commcare.dalvik.api.action.data.update"); i.putStringArrayListExtra("cases", factory.getCreatedAndUpdatedCases()); c.sendBroadcast(i, "org.commcare.dalvik.provider.cases.read"); //Update the record before trying to purge, so we don't block on this, in case //anything weird happens. We don't want to get into a loop FormRecord updatedRecord = updateRecordStatus(record, FormRecord.STATUS_UNSENT); if(factory.wereCaseIndexesDisrupted()) { if(isBulkProcessing) { isPurgePending = true; } else { performPurge(); } } return updatedRecord; }
Example 18
Source File: FacebookLoginActivity.java From facebooklogin with MIT License | 4 votes |
public static void launch(Activity activity, String applicationId, ArrayList<String> permissions) { final Intent intent = new Intent(activity, FacebookLoginActivity.class); intent.putExtra(EXTRA_FACEBOOK_APPLICATION_ID, applicationId); intent.putStringArrayListExtra(EXTRA_PERMISSIONS, permissions); activity.startActivityForResult(intent, FacebookLoginActivity.FACEBOOK_LOGIN_REQUEST_CODE); }
Example 19
Source File: VKServiceActivity.java From cordova-social-vk with Apache License 2.0 | 4 votes |
/** * Starts login process with fragment * @param act current running activity * @param scopeList authorization */ static void startLoginActivity(@NonNull Activity act, @NonNull ArrayList<String> scopeList) { Intent intent = createIntent(act.getApplicationContext(), VKServiceType.Authorization); intent.putStringArrayListExtra(KEY_SCOPE_LIST, scopeList); act.startActivityForResult(intent, VKServiceType.Authorization.getOuterCode()); }
Example 20
Source File: ShareIntentBuilder.java From ShareIntentBuilder with Apache License 2.0 | 4 votes |
private void setMultipleText(Intent intent) { intent.setAction(Intent.ACTION_SEND_MULTIPLE); intent.putStringArrayListExtra(Intent.EXTRA_TEXT, new ArrayList<>(texts)); }