R ronell Well-Known Member Licensed User Longtime User Sep 22, 2017 #1 i now managed to make my app the default messaging in settings using the sample code here https://www.b4x.com/android/forum/th...t-notification-android-4-4.37171/#post-227969 .. how can i check if the app is set as default at runtime?
i now managed to make my app the default messaging in settings using the sample code here https://www.b4x.com/android/forum/th...t-notification-android-4-4.37171/#post-227969 .. how can i check if the app is set as default at runtime?
Erel B4X founder Staff member Licensed User Longtime User Sep 22, 2017 #2 PackageManager.QueryIntentActivities will return a list of all apps that support the relevant intent. Try this: B4X: Dim pm As PackageManager Dim in As Intent in.Initialize("android.intent.action.SENDTO", "smsto:") Log(pm.QueryIntentActivities(in)) Your app should be the first item if it is the default app. Upvote 0
PackageManager.QueryIntentActivities will return a list of all apps that support the relevant intent. Try this: B4X: Dim pm As PackageManager Dim in As Intent in.Initialize("android.intent.action.SENDTO", "smsto:") Log(pm.QueryIntentActivities(in)) Your app should be the first item if it is the default app.