Skip to content

Commit

Permalink
fix(andoid): intent filter opens everything
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jul 3, 2024
1 parent 6983a7c commit 9ef62ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 8 additions & 9 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Deep links -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="cartes-ign.ign.fr" />
</intent-filter>
<!-- Pour l'ouvertutre des fichiers en local -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand All @@ -28,12 +35,10 @@

<data android:scheme="content" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathSuffix=".json" />
<data android:pathSuffix=".geojson" />
<data android:pathSuffix=".gpx" />
<data android:pathSuffix=".kml" />
<data android:host="*" />
<data android:pathPattern=".*\\.json" />
<data android:pathPattern=".*\\..*\\.json" />
<data android:pathPattern=".*\\..*\\..*\\.json" />
Expand Down Expand Up @@ -80,13 +85,7 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- Deep links -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="cartes-ign.ign.fr" />
</intent-filter>

</activity>

<provider
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:dev": "webpack --config webpack.dev.js",
"serve:dev": "webpack-dev-server --config webpack.dev.js --hot",
"run:android": "npm run build:dev && npx cap sync && npx cap run android",
"install:android": "npm run build:dev && npx cap sync && cd android && ./gradlew assembleRelease && cd app/build/outputs/apk/google/release && zipalign 4 app-google-release-unsigned.apk app-google-release.apk && apksigner sign --ks ~/ign.keystore --v1-signing-enabled true --v2-signing-enabled true app-google-release.apk && adb install app-google-release.apk",
"build:android": "npm run build && npx cap sync && cd android && ./gradlew assembleRelease -PbuildFlavor=google",
"build:android:foss": "npm run build && npx cap sync && cd android && ./gradlew assembleRelease -PbuildFlavor=fdroid",
"build:android:dev": "npm run build:dev && npx cap sync && cd android && ./gradlew",
Expand Down

0 comments on commit 9ef62ef

Please sign in to comment.