Android Question open apps installed in your phone from my app

fifiddu70

Well-Known Member
Licensed User
Longtime User
hello everyone, I would like to create an app for elderly people where within this app through icons you can open for example facebook, whatsapp, calendar etc, so I need to understand how to open phone apps from my app even externally by leaving mine app, can anyone tell me how to do it?
 

agraham

Expert
Licensed User
Longtime User
Be aware that current and future versions of Android do not allow you to get a list of all installed apps. If you want to check if an app is installed you need to specify its package name in your manifest otherwise it will be invisible to your app.


There is a QUERY_ALL_PACKAGES permission that you can add to your manifest but Google does not allow most store apps to use it, though it will be fine if you distribute the app yourself.

 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
I would like to create a panel in my application with icons representing for example: calculator, calendar, facebook, whatsapp, flashlight, alarm clock, etc, all clickable which allow each one to open his application obviously it must not open within my app but allow just to have the ability to open it from my app then open externally from my app.
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
Agraham I think the link DonManfred posted is what I was looking for, this code taken should be the one to open the applications that are installed on the phone right?

B4X:
Dim in As Intent
Dim pm As PackageManager
in = pm.GetApplicationIntent("com.google.android.youtube")
If in.IsInitialized Then StartActivity(in)
StartActivity(in)
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
i have this error when launch this code in button event:
java.lang.RuntimeException: Object should first be initialized (Intent).
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
It means that the package is not installed or you have the wrong PackageName
 
Upvote 0

pazzokli

Active Member
Licensed User
Longtime User
Hi friend, did you solve it?
I've same problem. Can't understand
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…