Skip to content

Android 13 on samsung device #13

@aldebaranzbradaradjan

Description

@aldebaranzbradaradjan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions