Skip to first unread message

TakshilaOnline.com

unread,
Aug 5, 2016, 7:52:53 AM8/5/16
to MIT App Inventor Forum
I have multiple Apps. In every App, I am giving links (on button click) of my another App.

Now what I want is, before showing link of my another App, I want to check if that App is already installed or not. If another App is already installed, I will hide the link otherwise display it

I have the details Package name and other details of my all Apps. Is there any way using Activity Starter/Resolve activity so that I could check if my another App is already installed or not?

Regards,
Neha
15000+ Downloads & counting...

Taifun

unread,
Aug 5, 2016, 8:33:53 AM8/5/16
to MIT App Inventor Forum
use the resolve activity block of the activity starter
some examples you can find here https://puravidaapps.com/snippets.php in the Activity Starter section
Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

TakshilaOnline.com

unread,
Aug 6, 2016, 7:48:03 AM8/6/16
to MIT App Inventor Forum
Hi Taifun,

I am providing following values before resolving the activity.

Action = android.intent.action.VIEW 
Package = appinventor.ai_takshilaonline.CivilExamPolityQuiz

This App is available at PlayStore at this link: https://play.google.com/store/apps/details?id=appinventor.ai_takshilaonline.CivilExamPolityQuiz and is installed in my mobile.

But in another App when I try to check if this App is already installed or not I am not getting the desired result. Could you please suggest, what needs to be changed to get the right info.

Regards,
Neha

Taifun

unread,
Aug 6, 2016, 10:19:14 AM8/6/16
to MIT App Inventor Forum
according to the documentation http://ai2.appinventor.mit.edu/reference/other/activitystarter.html
only the Package name is sufficient
Taifun

Is the application available on the device?

If your app tries to start other apps, you'll want to check that those other apps are available on your user's phone before trying to start them. You can determine this using the ActivityStarter.ResolveActivity , which returns the name of the Activity that would be started by ActivityStarter.StartActivity, given the package or other information you've provided. If this name is blank, then the required application is not present, and you can make your app alert the user.

Reply all
Reply to author
Forward
0 new messages