开发者

Call or start external Application Android

HI to every one...

I'm working on a Application and I would like to s开发者_开发技巧tart or call an external application from it by pressing for example a button...on my application.

the application I would like to call is an open source application.

I've read on the official android website it is possible to do it but haven't found any suggestion on how to do it.

MY APPROACH:

So trying on my own I've used an Intent Action and a button...like this

 Intent i=new Intent(android.content.Intent.ACTION_VIEW);  

 startActivity(i); (when the button is pressed...with onClickListener)

RESULT:

when the button is pressed, A window appears which invites me to complete the Action I guess by choosing one of the Listed programs such as:

-Gstr 
-Import Ics
-Market
-Music
-Mail (com.htc.android.mail) and so on...but not the API I was looking for...

when I choose Gstr(I guess is the application manager) then opens another window

which shows a list of Installed Applications. From there I find the Application I was

looking for and starts it (by long pressing on it's Icon...)

ISSUE:

I would like to start the external Application directly by clicking on a button on my

application without passing through hundreds of others... Is there a way to achieve

this purpose coding?

THANKS for Your suggestions...


If your entire Intent is simply an ACTION_VIEW, of course there will be many applications. You need to have a more focused Intent. Contact the developers of the application you are trying to launch and ask them what Intent you should use.


This isn't really a valid situation. How would you make sure the user has the Open Source app installed? What you have now is technically the correct way to do it since you have no control what applications they have installed - and they may in fact NOT want the application you want to use be the application to handle the intent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜