Support VIEW intents on Android. (#1799)
* Add Drop file event support for android. * Updated MIME type configuration and intent filter generation. * "supportedMimeTypes" => "mimeType" * `mimeType` -> `accept-file-intent`
This commit is contained in:
@@ -25,6 +25,16 @@
|
||||
|
||||
</intent-filter>
|
||||
|
||||
::foreach ANDROID_ACCEPT_FILE_INTENT::
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="::__current__::" />
|
||||
|
||||
</intent-filter>
|
||||
::end::
|
||||
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
@@ -493,6 +493,7 @@ class AndroidPlatform extends PlatformTarget
|
||||
"android:configChanges": project.config.getArrayString("android.configChanges", ["keyboardHidden", "orientation", "screenSize", "screenLayout", "uiMode"]).join("|"),
|
||||
"android:screenOrientation": project.window.orientation == PORTRAIT ? "sensorPortrait" : (project.window.orientation == LANDSCAPE ? "sensorLandscape" : null)
|
||||
});
|
||||
context.ANDROID_ACCEPT_FILE_INTENT = project.config.getArrayString("android.accept-file-intent", []);
|
||||
|
||||
if (!project.environment.exists("ANDROID_SDK") || !project.environment.exists("ANDROID_NDK_ROOT"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user