Previously it was working all fine. I recently changed the OS and installed android studio and since then the problem arrived. The app is supposed to open url and open a location on clicking the respective buttons but it is not able to handle the intent. Same goes for the intent receiver. The receiver is supposed to ask the user to choose an app to open the activity instead it does nothing. There is also a third button supposed to send a text which works perfectly fine.
Since the code is taken from the official android developer’s page, I guess there is nothing wrong with the code.