2

I want to open another app and open a specific page in it! in their guide they said to use the bellow for default action

android.intent.action.VIEW

and use a kind of intent, which didn't get which, like bellow to go to that specific page:

somecompany://details?id=com.example.calendar

but i don't know how! And i tryed a ton of solutions but coudn't do it !

Thanks for your help.

4

2 回答 2

8

I think this is what you're asking for. This will open a specific app's page in the Google Play store.

startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse(
    "market://details?id=com.mycompany.mypackage")));

Don't replace the word market. That is specifically reserved by Android to open the Google Play store.

于 2013-08-14T02:12:22.087 回答
2

You can launch an app using intents. But to go to a specific page in the app, there should be a pre defined intent to reach there. Either it can be custom intent defined by that app and exposed to others or may be predefined system app. For example, you can open Settings application and reach a particular page in it based on the intents "Setting Application" has defined. Another example is "Camera Application". You can launch it and reach some page in it but not all pages.

In your case you may try something like this though:

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(uri, "video/mp4"); 

I hope you understand what I meant.

于 2013-08-14T01:18:36.663 回答