public void showFriendsList() { Intent intent = new Intent(this, InviteFriendsActivity.class); intent.putExtra("previous", "PopupActivity"); intent.putStringArrayListExtra("plist", (ArrayList<String>) item.getParticipants()); intent.putStringArrayListExtra("ilist", (ArrayList<String>) item.getInvitedPeople()); startActivity(intent); }
protected void onPostExecute(userVerificationResult result) { Intent intent = new Intent(getApplicationContext(), ResultActivityGrid.class); // String result1 = result.description.get(1);//start with returning string description of 1st // index intent.putStringArrayListExtra(EXTRA_MESSAGE1, result.description); intent.putStringArrayListExtra(EXTRA_MESSAGE2, result.imageURL); startActivity(intent); }
public static void showImageViewPager( Context context, ArrayList<String> smallList, ArrayList<String> bigList, int position) { Intent intent = new Intent(context, ImageViewPager.class); intent.putStringArrayListExtra("imgs", smallList); intent.putStringArrayListExtra("bigImgs", bigList); intent.putExtra("index", position); context.startActivity(intent); }
public void run() { synchronized (zzqf.zzb(zzaoZ)) { Intent localIntent = new Intent("com.google.android.location.places.METHOD_CALL"); localIntent.setPackage("com.google.android.gms"); localIntent.putStringArrayListExtra("PLACE_IDS", zzqf.zzc(zzaoZ)); localIntent.putStringArrayListExtra("METHOD_NAMES", zzqf.zzd(zzaoZ)); zzqf.zze(zzaoZ).sendBroadcast(localIntent); zzqf.zza(zzaoZ, null); zzqf.zzb(zzaoZ, null); return; } }
@UiThreadTest @MediumTest @Feature({"Android-AppBase"}) public void testGetQueryFromVoiceSearchResultIntent_validVoiceQuery() { Intent intent = new Intent(RecognizerResultsIntent.ACTION_VOICE_SEARCH_RESULTS); intent.putStringArrayListExtra( RecognizerResultsIntent.EXTRA_VOICE_SEARCH_RESULT_STRINGS, CollectionUtil.newArrayList(VOICE_SEARCH_QUERY)); intent.putStringArrayListExtra( RecognizerResultsIntent.EXTRA_VOICE_SEARCH_RESULT_URLS, CollectionUtil.newArrayList(VOICE_SEARCH_QUERY_URL)); String query = IntentHandler.getUrlFromVoiceSearchResult(intent); assertEquals(VOICE_SEARCH_QUERY_URL, query); }
@Override public boolean onChildClick( ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { // TODO Auto-generated method stub if (v instanceof LinearLayout) { TagContactItem tcItem = (TagContactItem) v.getTag(R.string.tag_contact_item); // CheckBox cbox = (CheckBox) v.findViewById(R.id.contact_cbox); // String sname = (String) cbox.getTag(R.string.tag_item_name); // String semail = (String) cbox.getTag(R.string.tag_item_email); ArrayList<String> contactList = new ArrayList<String>(1); StringBuilder sb = new StringBuilder(); if (tcItem.strName != null && tcItem.strName.length() > 0) { sb.append(tcItem.strName); sb.append("<"); sb.append(tcItem.strEmail); sb.append(">"); } else { sb.append(tcItem.strEmail); } contactList.add(sb.toString()); Intent dit = new Intent( this, IOUtil.checkDemoCount() ? ComposeMailProActivity.class : ComposeMailActivity.class); dit.putExtra(D.INTENT_EXTRA_CURRENT_ACCOUNT, HomeGroup.strAccount); dit.putStringArrayListExtra(BaseComposeMailActivity.INTENT_EXTRA_MULTI_CONTACT, contactList); startActivity(dit); } return false; }
/** * 图片预览 * * @param context * @param pics * @param position */ public static void showImageUploadPager(Activity context, ArrayList<String> pics, int position) { Intent intent = new Intent(context, ImageUploadPager.class); intent.putStringArrayListExtra("list", pics); intent.putExtra("position", position); // System.out.println("pics================="+pics.size()); context.startActivityForResult(intent, REQUEST_CODE_FOR_VIEW); }
@Override public void onMultiPictureClick(int position, int picIndex) { WeiboListItem status = adapter.getItem(position); ArrayList<String> urls = new ArrayList<String>(); if (status.attach != null) { for (AttachItem item : status.attach) { String url = item.attach_middle; if (url == null) { url = item.attach_url; } urls.add(url); } } if ("1".equals(status.is_repost) && status.transpond_data != null) { for (AttachItem item : status.transpond_data.attach) { String url = item.attach_middle; if (url == null) { url = item.attach_url; } urls.add(url); } } Intent intent = new Intent(act, ImageViewActivity.class); intent.putStringArrayListExtra("urls", urls); intent.putExtra("position", picIndex); startDefaultActivity(intent); act.overridePendingTransition(R.anim.zoom_enter, 0); }
private void showStationList() { String freq; String name; ArrayList<String> freqList = new ArrayList<String>(); ArrayList<String> nameList = new ArrayList<String>(); // цикл по списку радиостанций IniFile.KeyIterator lines = props.enumKeys(TITLE_SECTION); while (lines.hasNext()) { freq = lines.next(); name = props.getValue(TITLE_SECTION, freq); freqList.add(freq); nameList.add(freq + " " + name); } if (freqList.size() > 0) { Intent intent = new Intent(context, StationList.class); intent.putStringArrayListExtra("freq", freqList); intent.putStringArrayListExtra("name", nameList); String sFreq = getFrequencyString(mFreq); Log.d(TAG, "sFreq=" + sFreq); intent.putExtra("current", sFreq); radioActivity.startActivityForResult(intent, 1); } else { Toast.makeText( radioActivity, context.getString(R.string.station_list_empty), Toast.LENGTH_SHORT) .show(); Log.w(TAG, context.getString(R.string.station_list_empty)); } }
/** 跳转到图片详情界面 */ public static void actionPictureDetail( Activity activity, ArrayList<String> imageUrls, int position) { Intent intent = new Intent(activity, PictureDetailActivity.class); intent.putStringArrayListExtra(EXTRA_IMAGE_LIST, imageUrls); intent.putExtra(EXTRA_IMAGE_POSITION, position); activity.startActivity(intent); }
@UiThreadTest @MediumTest @Feature({"Android-AppBase"}) public void testGetQueryFromVoiceSearchResultIntent_validUrlQuery() { Intent intent = new Intent(RecognizerResultsIntent.ACTION_VOICE_SEARCH_RESULTS); intent.putStringArrayListExtra( RecognizerResultsIntent.EXTRA_VOICE_SEARCH_RESULT_STRINGS, CollectionUtil.newArrayList(VOICE_URL_QUERY)); intent.putStringArrayListExtra( RecognizerResultsIntent.EXTRA_VOICE_SEARCH_RESULT_URLS, CollectionUtil.newArrayList(VOICE_URL_QUERY_URL)); String query = IntentHandler.getUrlFromVoiceSearchResult(intent); assertTrue( String.format( "Expected qualified URL: %s, to start " + "with http://www.google.com", query), query.indexOf("http://www.google.com") == 0); }
@Override protected void onPostExecute(Object o) { System.out.println("Starting playerListActivity"); Intent intent = new Intent(context, PlayerListActivity.class); intent.putStringArrayListExtra("playersList", infoPlayerList); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); }
private void handleActionList() throws UserRecoverableAuthIOException, IOException { List<Task> list = client.tasks().list(list_id).execute().getItems(); if (list != null) { ArrayList<String> ids = new ArrayList<String>(); ArrayList<String> titles = new ArrayList<String>(); for (Task task : list) { ids.add(task.getId()); titles.add(task.getTitle()); } Intent broadcast = new Intent(Utils.ACTION_LIST_TASKS); broadcast.putStringArrayListExtra(Utils.EXTRA_IDS, ids); broadcast.putStringArrayListExtra(Utils.EXTRA_TITLES, titles); LocalBroadcastManager.getInstance(this).sendBroadcast(broadcast); } }
/** * 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); }
/** * 获取查看图片的intent * * @param context * @param saveImgDir 保存图片的目录,如果传null,则没有保存图片功能 * @param previewImages 当前预览的图片目录里的图片路径集合 * @param currentPosition 当前预览图片的位置 * @return */ public static Intent newIntent( Context context, File saveImgDir, ArrayList<String> previewImages, int currentPosition) { Intent intent = new Intent(context, MQPhotoPreviewActivity.class); intent.putExtra(EXTRA_SAVE_IMG_DIR, saveImgDir); intent.putStringArrayListExtra(EXTRA_PREVIEW_IMAGES, previewImages); intent.putExtra(EXTRA_CURRENT_POSITION, currentPosition); intent.putExtra(EXTRA_IS_SINGLE_PREVIEW, false); return intent; }
public static void startNetworkImage( Context context, ArrayList<String> list, int index, int aid, String title) { Intent intent = new Intent(context, ImagePagerActivity.class); intent.putStringArrayListExtra(EXTRA_IMAGES, list); intent.putExtra(EXTRA_INDEX, index); intent.putExtra("aid", aid); intent.putExtra("title", title); context.startActivity(intent); }
private void showUserHead() { List<String> list = new ArrayList<>(); list.add(personalInfo.getHeadimage()); Intent intent = new Intent(); intent.putStringArrayListExtra("imgurls", (ArrayList<String>) list); intent.putExtra("postion", 0); intent.setClass(context, PhotoPagerActivity.class); startActivity(intent); }
public void startAlbum() { if (PhotoSelectorConstants.ALBUM_THUMBNAIL_SIZE == -1) PhotoSelectorConstants.ALBUM_THUMBNAIL_SIZE = (int) context.getResources().getDimension(R.dimen.album_item_height); Intent i = new Intent(context, PhotoSelectorActivity.class); i.putStringArrayListExtra(PhotoSelectorConstants.PREVIOUS_SELECTED_PATHS, selectedPaths); ((Activity) context).startActivityForResult(i, PhotoSelectorConstants.ALBUM_REQUEST_CODE); }
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if (keyCode == KeyEvent.KEYCODE_BACK) { Intent i = new Intent(); i.putStringArrayListExtra("GET_CONTACT", getcontactsList); setResult(RESULT_OK, i); } return super.onKeyDown(keyCode, event); }
@Test public void putStringArrayListExtra_addsListToExtras() { Intent intent = new Intent(); final ArrayList<String> strings = new ArrayList<String>(Arrays.asList("hi", "there")); intent.putStringArrayListExtra("KEY", strings); assertThat(intent.getStringArrayListExtra("KEY"), equalTo(strings)); assertThat( Robolectric.shadowOf(intent.getExtras()).getStringArrayList("KEY"), equalTo(strings)); }
public static void a( com.estrongs.android.pop.app.d.a parama, ArrayList<String> paramArrayList, boolean paramBoolean) { Intent localIntent = new Intent(); localIntent.putExtra("play", paramBoolean); localIntent.putStringArrayListExtra("files_selected", paramArrayList); localIntent.setClass(parama.n(), LocalFileSharingActivity.class); parama.G().startActivity(localIntent); }
/** Save all the splits from the split editor */ private void saveSplits() { if (!canSave()) { Toast.makeText(getActivity(), R.string.toast_error_check_split_amounts, Toast.LENGTH_SHORT) .show(); return; } List<Split> splitList = extractSplitsFromView(); ArrayList<String> splitStrings = new ArrayList<>(); for (Split split : splitList) { splitStrings.add(split.toCsv()); } Intent data = new Intent(); data.putStringArrayListExtra(UxArgument.SPLIT_LIST, splitStrings); data.putStringArrayListExtra(UxArgument.REMOVED_SPLITS, mRemovedSplitUIDs); getActivity().setResult(Activity.RESULT_OK, data); getActivity().finish(); }
/** * Initiate a new Group Chat * * @param ctx context * @param subject subject * @param participants list of participants */ public static void initiateGroupChat( Context ctx, String subject, ArrayList<String> participants) { Intent intent = new Intent(ctx, GroupChatView.class); intent.setAction(INTITIATE_GROUPCHAT); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putStringArrayListExtra(GroupChatView.EXTRA_PARTICIPANTS, participants); intent.putExtra(GroupChatView.EXTRA_MODE, GroupChatMode.OUTGOING); intent.putExtra(GroupChatView.EXTRA_SUBJECT, subject); ctx.startActivity(intent); }
private void startOfflineDownloadService(List<List<Double>> offlineAreas) { Intent intent = new Intent(this, OfflineRegionDownloadService.class); int c = 0; for (List<Double> d : offlineAreas) { intent.putStringArrayListExtra( OfflineRegionDownloadService.LIST_PARAM + c, convertDoubleList(d)); c++; } intent.putExtra(OfflineRegionDownloadService.SIZE_PARAM, offlineAreas.size()); startService(intent); }
protected void onPostExecute(LocationManager lm) { // Start feeds on Musubi List<MLocation> locations = lm.getLocations(); JSONObject toCreate = new JSONObject(); JSONArray outerArr = new JSONArray(); ArrayList<String> principals = new ArrayList<String>(); for (MLocation location : locations) { if (location.feedUri == null && !location.principal.equals("")) { JSONObject primary = new JSONObject(); JSONArray arr = new JSONArray(); JSONObject one = new JSONObject(); try { if (location.principal == null || Util.getPickedAccountType(OmniStanfordBaseActivity.this) == null || (location.feedUri != null && !location.feedUri.equals(""))) { continue; } primary.put("visible", false); one.put( "hashed", Base64.encodeToString( OmniStanfordBaseActivity.digestPrincipal(location.principal), Base64.DEFAULT)); one.put("name", location.name); one.put("type", location.accountType); principals.add(location.principal); arr.put(0, one); primary.put("members", arr); primary.put("sender", Util.getPickedAccountType(OmniStanfordBaseActivity.this)); outerArr.put(primary); } catch (JSONException e) { Log.e(TAG, "JSON parse error", e); return; } } } try { toCreate.put("array", outerArr); if (outerArr.length() > 0) { Intent intent = new Intent(ACTION_CREATE_STANFORD_FEED); intent.putExtra(EXTRA_NAME, toCreate.toString()); Log.d(TAG, "starting..."); Log.d(TAG, toCreate.toString()); intent.putStringArrayListExtra("principals", principals); Log.d(TAG, "sent principals: " + principals); try { startActivityForResult(intent, REQUEST_CREATE_FEED); } catch (ActivityNotFoundException e) { Log.w(TAG, "activity not found", e); } } } catch (JSONException e) { Log.e(TAG, "JSON error", e); } }
public void submit(View view) { Intent intent = new Intent(this, SolutionActivity.class); EditText[] editTexts = getEditTexts(); ArrayList<String> board = new ArrayList<String>(); for (int i = 0; i < 16; i++) { board.add(editTexts[i].getText().toString().toUpperCase()); } intent.putStringArrayListExtra(BOARD, board); startActivity(intent); }
@Override protected void onPostExecute(String s) { // Intent intent=new Intent(context,Category_intent.class); // intent.putStringArrayListExtra("arrayOfProducts",(ArrayList)productsList); // //intent.putStringArrayListExtra("arrayOfCats", (ArrayList<String>) categories); // context.startActivity(intent); Intent intent = new Intent(context, Products_List.class); intent.putStringArrayListExtra("arrayOfProducts", (ArrayList<String>) productsList); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); }
@Override public void onClick(View view) { gridItemEntity gie = (gridItemEntity) view.getTag(); Intent it = new Intent(GridImageView.this, com.coolroy.photoscanner.ImageSwitcher.class); it.putStringArrayListExtra("pathes", imagePathes); it.putExtra("index", gie.index); startActivity(it); if (mThread.isAlive()) { isWait = true; } }
/** 跳转单独显示图片的界面 */ private void show() { Intent intent = new Intent(getActivity(), ImagesShowActivity.class); ArrayList<String> mList = new ArrayList<>(); mList.add("http://test11.mypatroller.com/FilesInfo/fat.png"); mList.add("http://test11.mypatroller.com/FilesInfo/LoseFlesh.bmp"); mList.add("http://test11.mypatroller.com/FilesInfo/normal1.jpg"); mList.add("http://test11.mypatroller.com/FilesInfo/normal2.gif"); intent.putStringArrayListExtra("mlist", mList); intent.putExtra("pos", "0"); startActivity(intent); getActivity().overridePendingTransition(R.anim.scale_in, android.R.anim.fade_out); }
@Override protected void onResume() { super.onResume(); intent.putExtra("size_from", fltParams.GetSizeFrom()); intent.putExtra("size_to", fltParams.GetSizeTo()); intent.putExtra("time_from", fltParams.GetTimeFrom()); intent.putExtra("time_to", fltParams.GetTimeTo()); intent.putStringArrayListExtra("names", fltParams.GetNames()); intent.putExtra("use_filter", fltParams.IsUseFilter()); setResult(RESULT_CANCELED, intent); }