List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openTrends(final Activity activity, final long account_id) { if (activity == null) return;//from w w w. java 2s .com if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new TrendsFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_TRENDS); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openSavedSearches(final Activity activity, final long account_id) { if (activity == null) return;//from w ww . jav a 2 s . c om if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new SavedSearchesListFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_SAVED_SEARCHES); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openRetweetsOfMe(final Activity activity, final long account_id) { if (activity == null) return;/*from www .j a v a 2 s.c o m*/ if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new RetweetedToMeFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_RETWEETED_TO_ME); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openUserBlocks(final Activity activity, final long account_id) { if (activity == null) return;/*from w w w .jav a 2 s . co m*/ if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new UserBlocksListFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_USER_BLOCKS); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openConversation(final Activity activity, final long account_id, final long status_id) { if (activity == null) return;//from w w w . j av a 2 s .co m if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new ConversationFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); args.putLong(INTENT_KEY_STATUS_ID, status_id); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_CONVERSATION); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); builder.appendQueryParameter(QUERY_PARAM_STATUS_ID, String.valueOf(status_id)); activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openUserMentions(final Activity activity, final long account_id, final String screen_name) { if (activity == null) return;/*ww w. jav a 2 s .c om*/ if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new UserMentionsFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); if (screen_name != null) { args.putString(INTENT_KEY_SCREEN_NAME, screen_name); } fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_USER_MENTIONS); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); if (screen_name != null) { builder.appendQueryParameter(QUERY_PARAM_SCREEN_NAME, screen_name); } activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openUserRetweetedStatus(final Activity activity, final long account_id, final long status_id) { if (activity == null) return;//from w w w . j ava2s . co m if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new UserRetweetedStatusFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); if (status_id > 0) { args.putLong(INTENT_KEY_STATUS_ID, status_id); } fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_USERS_RETWEETED_STATUS); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); if (status_id > 0) { builder.appendQueryParameter(QUERY_PARAM_STATUS_ID, String.valueOf(status_id)); } activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.facebook.Session.java
private void logAuthorizationStart() { Bundle bundle = AuthorizationClient.newAuthorizationLoggingBundle(pendingAuthorizationRequest.getAuthId()); bundle.putLong(AuthorizationClient.EVENT_PARAM_TIMESTAMP, System.currentTimeMillis()); // Log what we already know about the call in start event try {// www .j av a 2s . c o m JSONObject extras = new JSONObject(); extras.put(AuthorizationClient.EVENT_EXTRAS_LOGIN_BEHAVIOR, pendingAuthorizationRequest.loginBehavior.toString()); extras.put(AuthorizationClient.EVENT_EXTRAS_REQUEST_CODE, pendingAuthorizationRequest.requestCode); extras.put(AuthorizationClient.EVENT_EXTRAS_IS_LEGACY, pendingAuthorizationRequest.isLegacy); extras.put(AuthorizationClient.EVENT_EXTRAS_PERMISSIONS, TextUtils.join(",", pendingAuthorizationRequest.permissions)); extras.put(AuthorizationClient.EVENT_EXTRAS_DEFAULT_AUDIENCE, pendingAuthorizationRequest.defaultAudience.toString()); bundle.putString(AuthorizationClient.EVENT_PARAM_EXTRAS, extras.toString()); } catch (JSONException e) { } AppEventsLogger logger = getAppEventsLogger(); logger.logSdkEvent(AuthorizationClient.EVENT_NAME_LOGIN_START, null, bundle); }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openUserListCreated(final Activity activity, final long account_id, final long user_id, final String screen_name) { if (activity == null) return;//from ww w . j a va 2 s . c o m if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new UserListCreatedFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); args.putLong(INTENT_KEY_USER_ID, user_id); args.putString(INTENT_KEY_SCREEN_NAME, screen_name); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_LIST_CREATED); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); if (user_id > 0) { builder.appendQueryParameter(QUERY_PARAM_USER_ID, String.valueOf(user_id)); } if (screen_name != null) { builder.appendQueryParameter(QUERY_PARAM_SCREEN_NAME, screen_name); } activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }
From source file:com.dwdesign.tweetings.util.Utils.java
public static void openUserListMemberships(final Activity activity, final long account_id, final long user_id, final String screen_name) { if (activity == null) return;//w ww. jav a 2 s . com if (activity instanceof DualPaneActivity && ((DualPaneActivity) activity).isDualPaneMode()) { final DualPaneActivity dual_pane_activity = (DualPaneActivity) activity; final Fragment fragment = new UserListMembershipsFragment(); final Bundle args = new Bundle(); args.putLong(INTENT_KEY_ACCOUNT_ID, account_id); args.putLong(INTENT_KEY_USER_ID, user_id); args.putString(INTENT_KEY_SCREEN_NAME, screen_name); fragment.setArguments(args); dual_pane_activity.showAtPane(DualPaneActivity.PANE_LEFT, fragment, true); } else { final Uri.Builder builder = new Uri.Builder(); builder.scheme(SCHEME_TWEETINGS); builder.authority(AUTHORITY_LIST_MEMBERSHIPS); builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_ID, String.valueOf(account_id)); if (user_id > 0) { builder.appendQueryParameter(QUERY_PARAM_USER_ID, String.valueOf(user_id)); } if (screen_name != null) { builder.appendQueryParameter(QUERY_PARAM_SCREEN_NAME, screen_name); } activity.startActivity(new Intent(Intent.ACTION_VIEW, builder.build())); } }