Skip to content
Advertisement

Tag: android-activity

How to open recent avtivity after app reopen in android studio

How to open recent activity after app reopen in android studio For Example, we create a book application Then after reopening the app, open the last page where we are Answer Create a Default activity as a launcher activity `public class Default extends AppCompatActivity { }` //In MainActivity while saving preferences use: `public class MainActivity extends AppCompatActivity { }` //In

On Activity App Bar back pressed go to the parent activity with the fragment it was called

I’m having an issue that maybe is happening to other community members and I wanted to ask if somebody knows the solution. I have an app with these Two activities (MainActivity, UserProfileActivity). The MainActivity contains a NavigationDrawer that navigates through fragments. So here it’s the problem. While navigating in the second fragment and pressing a button in that fragment. It

Activity or Fragment for a SearchView?

I´m doing my final degree project and I have chose to develop and Android app using Firebase Firestore, the idea it´s cool because I´m learning how to program on Android, but on Java. So, I have develop the SplashScreen, Login form, SignIn form and able to connect succesfully with Firebase but right now I´m having a problem about thinking the

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 outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? I have also included this flag to my Intent, but it’s still showing the same

Advertisement