I'm testing this code to share a file directly in Google Drive.
B4X:
File.Copy(File.DirAssets, "1.pdf", Starter.Provider.SharedFolder, "1.pdf")
Dim sendIntent As Intent
sendIntent.Initialize(sendIntent.ACTION_SEND,"")
sendIntent.SetComponent("com.google.android.apps.docs/.common.shareitem.UploadMenuActivity")
sendIntent.PutExtra("android.intent.extra.STREAM", Starter.Provider.GetFileUri("1.pdf"))
StartActivity(sendIntent)
It works fine in Android 10, but in Android 13 I get this error message:
B4X:
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.apps.docs/com.google.android.apps.docs.common.shareitem.UploadMenuActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
Do I need declare something in manifest in Android 13 to use the intent?
Google Drive is up to date in both devices and I can see the component string with QueryIntentActivities.
Until now I used PackageManager to check which applications were installed (for example WhatsApp) Currently google requires QUERY_ALL_PACKAGES in Manifest in order to have a list of Installed Packages. Is it possible to know if WhatsApp is installed, via tried through some kind of Try-Catch...
Until now I used PackageManager to check which applications were installed (for example WhatsApp) Currently google requires QUERY_ALL_PACKAGES in Manifest in order to have a list of Installed Packages. Is it possible to know if WhatsApp is installed, via tried through some kind of Try-Catch...
but works only in Android 10.
In Android 13 I get the error.
Edit: I'm still testing. I can't use the QUERY_ALL_PACKAGES because the app is in Play Store.
Thanks both!
Anyone with a Samsung device with Android 13 to test the code?
The devices which I tested the code - and got the error - was a Samsung A71 and M32.
Android version 13 on Galaxy A13 buildnumber TP1A220624.014.A135FXXS5CWG1 and after software update to current release TP1A220624.014.A135FXXS5CWH1 both working correctly in release mode compiled with jdk-1.8.3_81.
Thanks both!
Anyone with a Samsung device with Android 13 to test the code?
The devices which I tested the code - and got the error - was a Samsung A71 and M32.