Okay, so there may be times wherein you do not want to pass an Intent to redirect users to an app whenever the user may tap on the notification. The quickest thing that I thought might work was to pass a null Intent to the Notification object.

However, this is wrong as it can lead to problems. The correct way is to do it like this

Try it. This should do the trick.

This helper method opens a PDF file from your Android app using any PDF related app installed in the smart phone. This is made possible with the use of an Intent object and setting its data and type so that it will recognize that it will be opening a PDF file.

If there is more than one app that can open PDF files, it will prompt you to choose which one you want to use to open the PDF file.

Here is a method that returns an Intent object reference in order for Android to open up the compose SMS form.

Related Posts Plugin for WordPress, Blogger...