开发者

Android: Possible to start any activity of other apps from my own?

This is an Android noob question.

I am trying to start an activity of ano开发者_StackOverflow中文版ther apk through my own application. Now I know I can launch any other application and invoke its main activity. In many cases I'm also able to start subactivities, for example display it's settings dialogue. However with some applications, for example Facebook or Endomondo I would get a FC everytime I try to launch some specific activity of their application.

Now I suspect that this is a permission issue and that the Facebook or Endomondo devs just don't want other applications to get access to their activities. But do I have to find out which activities I can use and which ones I can't use by trial and error every single time?

Plus: Is there any way around this dilemma? Maybe on a rooted device?

Cheers for any pointers.


As you already said you can only use activities of other apps which are designed to be used by others applications. Normally the developer of the other app define a set of intents and actions their app will be able to understand and process.

Using any other app's activity is by default not possible, this is by design of Android as every app runs in it own sandboxed process (there are some exceptions where apps can share a process).

So to use another app's activities you must know the intents it listen on. Normally this can be found in the applications website or documentation or on OpenIntents a dictionary for intents.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜