List of usage examples for android.app Notification EXTRA_PROGRESS_INDETERMINATE
String EXTRA_PROGRESS_INDETERMINATE
To view the source code for android.app Notification EXTRA_PROGRESS_INDETERMINATE.
Click Source Link
From source file:com.ademsha.appnotifico.NotificationDataHelper.java
@TargetApi(Build.VERSION_CODES.KITKAT) private static JSONObject getNotificationExtras(JSONObject notification, StatusBarNotification statusBarNotification) { try {/*from w w w .j a va2 s . c om*/ Bundle extras = statusBarNotification.getNotification().extras; if (extras != null) { notification.put("text", extras.getString(Notification.EXTRA_TEXT)); notification.put("sub_text", extras.getString(Notification.EXTRA_SUB_TEXT)); notification.put("summary_text", extras.getString(Notification.EXTRA_SUMMARY_TEXT)); notification.put("text_lines", Arrays .toString(extras.getCharSequenceArray(Notification.EXTRA_TEXT_LINES)).replace("null", "")); notification.put("icon", String.valueOf(extras.getInt(Notification.EXTRA_SMALL_ICON))); if (extras.getParcelable(Notification.EXTRA_LARGE_ICON) != null) { notification.put("large_icon", String.valueOf(extras.getParcelable(Notification.EXTRA_LARGE_ICON).toString()) .replace("null", "")); } notification.put("title", extras.getString(Notification.EXTRA_TITLE)); notification.put("title_big", extras.getString(Notification.EXTRA_TITLE_BIG)); notification.put("progress", extras.getInt(Notification.EXTRA_PROGRESS)); notification.put("progress_indeterminate", String.valueOf(extras.getBoolean(Notification.EXTRA_PROGRESS_INDETERMINATE))); notification.put("progress_max", String.valueOf(extras.getInt(Notification.EXTRA_PROGRESS_MAX))); notification.put("people", extras.getStringArray(Notification.EXTRA_PEOPLE)); } } catch (JSONException e) { e.printStackTrace(); } return notification; }