AndroidStudio: java. How can i return an arraylist to main activity?

I tried this way: The application stops working on setResult only when the arraylist is not empty. SECONDARY ACTIVITY Intent d = new Intent(); d.putExtra(“cat”,(Serializable) category….

How to share image via intent in android 10

I’m fetching an image from a URL as a bitmap using glide, and onResourceReady() I’m trying to share the image via intent, but I’m getting an exception. I’m using Android 30. Glide.with(this) ….

Android: pass data from initial activity (launching Zxing scanner) to onActivityResult callback

I use the library zxing-android-embedded in my Android App. Before calling initiateScan() method to start the scanner from my activity, I set a class variable scanedItemId to know on which item I …

Using Intent.createChooser and getting error: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag

I want to open the share via option from the service class. It is working fine in Android 7, but in 8+ OS it starts showing android.util.AndroidRuntimeException: Calling startActivity() from …

NullPointerException received when calling Bundle.getParcelable

I have a problem that I am trying to solve for few hours but cannot solve it and I need some help. I am trying to retrieve URL strings from a Login activity and trying to pass it to the Main activity …

How to make app wait and then start activity or go back?

I want my activity to show a screen for 3 seconds, then go back to previous screen. But when i use protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …