D darabon Active Member Oct 4, 2022 #1 Hello, I need to get installed applications on the Android The found solution is: B4X: Copy Private Sub ShowInstalledApps Dim pm As PackageManager 'phone library For Each pck As String In pm.GetInstalledPackages Dim name As String = pm.GetApplicationLabel(pck) Log(name) Next End Sub My question is Does the codes compatible with all android versions? In my app, I have to give a score user after installing app and that is important that I can get the installed app Thanks
Hello, I need to get installed applications on the Android The found solution is: B4X: Copy Private Sub ShowInstalledApps Dim pm As PackageManager 'phone library For Each pck As String In pm.GetInstalledPackages Dim name As String = pm.GetApplicationLabel(pck) Log(name) Next End Sub My question is Does the codes compatible with all android versions? In my app, I have to give a score user after installing app and that is important that I can get the installed app Thanks
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2022 #2 darabon said: My question is Does the codes compatible with all android versions? Click to expand... No. See the changes related to targetSdkVersion = 31: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content Upvote 0
darabon said: My question is Does the codes compatible with all android versions? Click to expand... No. See the changes related to targetSdkVersion = 31: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content
agraham Expert Licensed User Longtime User Oct 6, 2022 #3 You need to put this in your manifest AddManifestText(<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>) But then Google will not allow it in the Play Store without good reason. Use of the broad package (App) visibility (QUERY_ALL_PACKAGES) permission - Play Console Help Google Play restricts the use of high-risk or sensitive permissions, including the QUERY_ALL_PACKAGES permission, which gives visibility into the inventory of installed support.google.com Upvote 0
You need to put this in your manifest AddManifestText(<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>) But then Google will not allow it in the Play Store without good reason. Use of the broad package (App) visibility (QUERY_ALL_PACKAGES) permission - Play Console Help Google Play restricts the use of high-risk or sensitive permissions, including the QUERY_ALL_PACKAGES permission, which gives visibility into the inventory of installed support.google.com
agraham Expert Licensed User Longtime User Oct 6, 2022 #4 You can query for the existence of specific apps with something like this AddManifestText(<queries> <package android:name="com.fake.app" /> <package android:name="com.fake.game" /> </queries>) Upvote 0
You can query for the existence of specific apps with something like this AddManifestText(<queries> <package android:name="com.fake.app" /> <package android:name="com.fake.game" /> </queries>)
D darabon Active Member Oct 6, 2022 #5 agraham said: You can query for the existence of specific apps with something like this AddManifestText(<queries> <package android:name="com.fake.app" /> <package android:name="com.fake.game" /> </queries>) Click to expand... The apps are not specified and can be any app so your code is not compatiable for my app Upvote 0
agraham said: You can query for the existence of specific apps with something like this AddManifestText(<queries> <package android:name="com.fake.app" /> <package android:name="com.fake.game" /> </queries>) Click to expand... The apps are not specified and can be any app so your code is not compatiable for my app
agraham Expert Licensed User Longtime User Oct 6, 2022 #6 darabon said: The apps are not specified and can be any app so your code is not compatiable for my app Click to expand... Post #3 above should work then - but it probably won't be accepted by Google if you want it in the Play Store Upvote 0
darabon said: The apps are not specified and can be any app so your code is not compatiable for my app Click to expand... Post #3 above should work then - but it probably won't be accepted by Google if you want it in the Play Store
D darabon Active Member Oct 6, 2022 #7 agraham said: Post #3 above should work then - but it probably won't be accepted by Google if you want it in the Play Store Click to expand... Understood Thanks. Upvote 0
agraham said: Post #3 above should work then - but it probably won't be accepted by Google if you want it in the Play Store Click to expand... Understood Thanks.