Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 13 on samsung device #13

Open
aldebaranzbradaradjan opened this issue Oct 26, 2023 · 1 comment
Open

Android 13 on samsung device #13

aldebaranzbradaradjan opened this issue Oct 26, 2023 · 1 comment

Comments

@aldebaranzbradaradjan
Copy link

aldebaranzbradaradjan commented Oct 26, 2023

Hi,

First, thank for this repo, the code is very neat and the explanations of qt blog are nice.

I have had problem on Android 13 (specifically on Samsung device, no pb on xiaomi device).
The options of sharing was very reduced (only 3 apps, ble sharing, drive and an other app).

On this forum : https://forum.qt.io/topic/128187/data-sharing-with-apps-from-qt-app-on-android/11
ahsan737 showed this solution (apply on /android/src/org/ekkescorner/utils/QShareUtils.java) :

replacing the following line of code
return createCustomChooserAndStartActivity(sendIntent, title, requestId, uri);

with these lines has worked for me.
QtNative.activity().startActivity(Intent.createChooser(sendIntent, null));
return true; 

Based on this commit on a bluerock app : https://itsblue.dev/bluerock/app/commit/447c1135dd3629646b08ea1e84b217f39d56aedb

I am very new to android dev, but it take me all the day to figure it out, so I share this here.
Even if this repo is just an example, i think it will be usefull to adapt createCustomChooserAndStartActivity with this code.
At least, if someone search for this problem he will find this solution more easily.

Thanks !

PS :

I just find : #10
Sorry for the duplication, but QtNative.activity().startActivity(Intent.createChooser(sendIntent, null)); is the only thing that work well on the android 13 samsung device i own.

@ekke
Copy link
Owner

ekke commented Oct 26, 2023

thx for your infos
I'm still in the process of porting all my apps from 5.15 to 6.6
when finished I'll refactor/rewrite the ShareExample App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants