spacedrive/apps/mobile/scripts/withAndroidIntent.js
Utku b638fc2177
[MOB-37, MOB-38, MOB-39] Preview for PDF, Text and Media files (#2098)
* version & microphonePermission text & eslint

* remove polyfill as hermes supports intl now

* why do we have solid on mobile?

* cleanup

* add solid back =_=

* pnpm lock

* we hate relative paths here

* android config

* open file logic

* visual tweaks

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2024-02-21 13:26:05 +00:00

27 lines
690 B
JavaScript

const { withAndroidManifest } = require('@expo/config-plugins');
// NOTE: Can be extended if needed (https://forums.expo.dev/t/how-to-edit-android-manifest-was-build/65663/4)
function modifyAndroidManifest(androidManifest) {
const { manifest } = androidManifest;
const intent = manifest['queries'][0]['intent'][0];
if (intent) {
// Adds <data android:mimeType="*/*" /> to the intents
intent['data'].push({
$: {
'android:mimeType': '*/*'
}
});
}
return androidManifest;
}
module.exports = function withAndroidIntent(config) {
return withAndroidManifest(config, (config) => {
config.modResults = modifyAndroidManifest(config.modResults);
return config;
});
};