Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.1
-
None
Description
Similar to QTBUG-70170 it would be useful to launch an Android app based on the file extension. The following entry to the AndroidManifest.xml file starts the app. Now it would be nice if the passed url is provided:
<intent-filter android:icon="@mipmap/ic_launcher" android:label="My music player" android:priority="1"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="content"/> <data android:scheme="file"/> <data android:host="*"/> <data android:mimeType="audio/mp3"/> <data android:pathPattern=".*\\.mp3"/> </intent-filter>
onCreate and onNewIntent can then check and process the Uri:
Uri uri = getIntent().getData(); if (uri != null && ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) == 0) // process Uri and pass it to Qt
The uri could then be opened using QFile::open.
Attachments
Issue Links
- mentioned in
-
Page Loading...