Skip to content

Tag: android-intent

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

How to pass a list of objects from one activity to another using parcelable

I want to pass the list of itemselected or ItemsInCart to another activity. My Items Model implements parcelable. The problem is am getting error below in my SecondActivity class. Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘void androidx.recyclerview.widget.RecyclerView.setLayoutManager(androidx.recyclerview.widget.RecyclerView$LayoutManager)’ on a null object reference at com.example.Project1.SecondActivity.onCreate( Below is the code Model Item; } First Activity; The list that i want

How to show Heads up notifications android

How to get a heads up notification.With below code i can only see three dots on status bar and a notification in notification bar. Answer I was having the same problem, but I was using the newer NotificationCompat.Builder() call which requires a channel ID from a NotificationChannel. The notification will only appear as a heads-up notification if the NotificationChannel is