Using Intent in an Android application to show another activity

In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error. Here are the classes: public class FirstActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button orderButton = (Button)findViewById(R.id.order); … Read more

How to filter specific apps for ACTION_SEND intent (and set a different text for each app)

How can you filter out specific apps when using the ACTION_SEND intent? This question has been asked in various ways, but I haven’t been able to gather a solution based on the answers given. Hopefully someone can help. I would like to provide the ability to share within an app. Following Android Dev Alexander Lucas’ … Read more

Android Gallery on Android 4.4 (KitKat) returns different URI for Intent.ACTION_GET_CONTENT

Before KitKat (or before the new Gallery) the Intent.ACTION_GET_CONTENT returned a URI like this content://media/external/images/media/3951. Using the ContentResolver and quering for MediaStore.Images.Media.DATA returned the file URL. In KitKat however the Gallery returns a URI (via “Last”) like this: content://com.android.providers.media.documents/document/image:3951 How do I handle this? 20 Answers 20

How to send parameters from a notification-click to an activity?

I can find a way to send parameters to my activity from my notification. I have a service that creates a notification. When the user clicks on the notification I want to open my main activity with some special parameters. E.g an item id, so my activity can load and present a special item detail … Read more

Parcelable encountered IOException writing serializable object getactivity()

so I am getting this in logcat: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.resources.student_list.Student) I know this means that my student class is not serializable, but it is, here is my student class: import java.io.Serializable; public class Student implements Comparable<Student>, Serializable{ private static final long serialVersionUID = 1L; private String firstName, lastName; … Read more

Android – Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23

I am getting the following tool tip in AndroidManifest.xml: App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details. Adds deep links to get your app into the Google index, to get installs and traffic to your app from Google Search. Can … Read more