List of usage examples for android.os Bundle putString
public void putString(@Nullable String key, @Nullable String value)
From source file:com.ds.kaixin.Util.java
/** * &URLkey-value/*from w ww . j av a 2s. c o m*/ * * @param s * &URL * @return key-value */ public static Bundle decodeUrl(String s) { Bundle params = new Bundle(); if (s != null) { String array[] = s.split("&"); for (String parameter : array) { String v[] = parameter.split("="); if (v.length > 1) { params.putString(v[0], URLDecoder.decode(v[1])); } } } return params; }
From source file:com.renren.api.connect.android.Util.java
/** * &?URL???key-value?/*from ww w.j a v a 2 s. c o m*/ * * @param s * @return */ public static Bundle decodeUrl(String s) { Bundle params = new Bundle(); if (s != null) { params.putString("url", s); String array[] = s.split("&"); for (String parameter : array) { String v[] = parameter.split("="); if (v.length > 1) { params.putString(v[0], URLDecoder.decode(v[1])); } } } return params; }
From source file:cn.bidaround.ytcore.kaixin.KaixinUtil.java
/** * &?URL???key-value??//from w w w .j av a2s. c om * * @param s * &?URL? * @return key-value?? */ @SuppressWarnings("deprecation") public static Bundle decodeUrl(String s) { Bundle params = new Bundle(); if (s != null) { String array[] = s.split("&"); for (String parameter : array) { String v[] = parameter.split("="); if (v.length > 1) { params.putString(v[0], URLDecoder.decode(v[1])); } } } return params; }
From source file:com.iStudy.Study.Renren.Util.java
/** * &?URL???key-value?//from w ww . j a va 2 s. com * * @param s * @return */ @SuppressWarnings("deprecation") public static Bundle decodeUrl(String s) { Bundle params = new Bundle(); if (s != null) { params.putString("url", s); String array[] = s.split("&"); for (String parameter : array) { String v[] = parameter.split("="); if (v.length > 1) { params.putString(v[0], URLDecoder.decode(v[1])); } } } return params; }
From source file:com.chess.genesis.data.GameDataDB.java
public static Bundle rowToBundle(final Cursor cursor, final int index, final boolean closeCursor) { final Bundle bundle = new Bundle(); final String[] column = cursor.getColumnNames(); cursor.moveToPosition(index);//from w ww .j ava 2s. c om for (int i = 0, len = cursor.getColumnCount(); i < len; i++) bundle.putString(column[i], cursor.getString(i)); if (closeCursor) cursor.close(); return bundle; }
From source file:org.lol.reddit.fragments.PostListingFragment.java
public static PostListingFragment newInstance(final Uri url, final UUID session, final CacheRequest.DownloadType downloadType) { final PostListingFragment f = new PostListingFragment(); final Bundle bundle = new Bundle(4); bundle.putString("url", url.toString()); if (session != null) bundle.putString("session", session.toString()); bundle.putString("downloadType", downloadType.name()); f.setArguments(bundle);//from w w w . jav a 2s . com return f; }
From source file:br.liveo.ndrawer.ui.fragment.MainFragment31.java
public static MainFragment31 newInstance(String text) { MainFragment31 mFragment = new MainFragment31(); Bundle mBundle = new Bundle(); mBundle.putString(TEXT_FRAGMENT, text); mFragment.setArguments(mBundle);/*from ww w . j a v a 2s . co m*/ return mFragment; }
From source file:com.game.simple.Game3.java
public static void inviteFB() { self.runOnUiThread(new Runnable() { public void run() { if (Session.getActiveSession() != null && Session.getActiveSession().isOpened()) { /// Bundle params = new Bundle(); params.putString("message", "Let's play iCasino !"); params.putString("data", "{\"badge_of_awesomeness\":\"1\"," + "\"social_karma\":\"5\"}"); WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(self, Session.getActiveSession(), params)).setOnCompleteListener(new OnCompleteListener() { @Override public void onComplete(Bundle values, FacebookException error) { if (error != null) { if (error instanceof FacebookOperationCanceledException) { Toast.makeText(self.getApplicationContext(), "Hy m?i!", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(self.getApplicationContext(), "Hy b?", Toast.LENGTH_SHORT).show(); }// w w w . j a v a2 s . c om } else { final String requestId = values.getString("request"); if (requestId != null) { Toast.makeText(self.getApplicationContext(), "? m?i !", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(self.getApplicationContext(), "Hy !", Toast.LENGTH_SHORT).show(); } } } }).build(); requestsDialog.show(); } else { loginFB(); } } }); }
From source file:com.hybris.mobile.app.commerce.CommerceApplicationBase.java
/** * Update the ContentServiceHelper and SyncAdapter url * * @param url// w ww . ja v a 2 s . co m * @param catalog * @param catalogId * @param catalogMainCategoryId */ public static void updateUrl(String url, String catalog, String catalogId, String catalogMainCategoryId) { // Cancelling all the requests first mInstance.mContentServiceHelper.cancelAll(); // For the catalog sync adapter Bundle bundle = new Bundle(); bundle.putBoolean(CatalogSyncConstants.SYNC_PARAM_CANCEL_ALL_REQUESTS, true); requestCatalogSyncAdapter(bundle); // Updating the configuration of the catalog sync adapter bundle = new Bundle(); bundle.putString(CatalogSyncConstants.SYNC_PARAM_CONTENT_SERVICE_HELPER_URL, url); bundle.putString(CatalogSyncConstants.SYNC_PARAM_CONTENT_SERVICE_HELPER_CATALOG, catalog); bundle.putString(CatalogSyncConstants.SYNC_PARAM_CONTENT_SERVICE_HELPER_CATALOG_ID, catalogId); bundle.putString(CatalogSyncConstants.SYNC_PARAM_CONTENT_SERVICE_HELPER_CATALOG_VERSION_ID, mInstance.getString(R.string.url_path_catalog_version_id)); bundle.putString(CatalogSyncConstants.SYNC_PARAM_CONTENT_SERVICE_HELPER_MAIN_CATEGORY_ID, catalogMainCategoryId); requestCatalogSyncAdapter(bundle); // Content service helper mInstance.mContentServiceHelper.updateConfiguration(url, catalog, catalogId, mInstance.getString(R.string.url_path_catalog_version_id), catalogMainCategoryId); }
From source file:crow.weibo.util.WeiboUtil.java
/** * a=key&b=secret<br/>/*from w w w .j a v a2s . c o m*/ * <br/> * String [] {key,secret} * * @param response * @return * @throws Exception */ public static Bundle parseToken(String response) { Bundle bundle = new Bundle(); if (response == null || response.equals("")) { return bundle; } response = response.replace("#", "?"); if (response.contains("?")) { response = response.substring(response.indexOf("?") + 1); } String[] tokenArray = response.split("&"); for (String tokenpair : tokenArray) { String[] token = tokenpair.split("="); if (token.length != 0) { bundle.putString(token[0], URLDecoder.decode(token[1])); } } return bundle; }