

(see Restrictions on starting activities from the background) Although this breaks a lot of things, it doesn’t affect full-screen intents. Why should Full-Screen Intents be used?Ī restriction was added with Android Q where an app couldn’t start an activity if not meeting the criteria.

In these situations, you can associate a full-screen intent with your notification. Your app might need to display an urgent, time-sensitive message, such as an incoming phone call or a ringing alarm.

Well, I guess that needs a bit more explanation so keep on reading. What are Full-Screen Intents?įull-Screen Intents are Intents that can launch in full-screen and can be used for showing a full-screen notification. You can retrieve your index as the same way you are using right now.Originally shared on my personal blog post. You will have your list in listGallery variable. You can use this way to store list in Preference variable public static Intent createIntent (Context context, List gallery, int indexOf).getType()) Initialize your SharedPreferences using: SharedPreferences prefrence = PreferenceManager.getDefaultSharedPreferences(context) You can use SharedPreferences to store your array list and retrieve the same on other activity. Please avoid to pass large amount of data with Intent. So sometime system can not handle much data to transfer at a time.

So it might possible that your list of List can have many data. You are passing whole List to your GalleryViewActivity with Intent.
