Android intent filter: associate app with file extension


#1

Hi,

This could be done for android by adding this

 <data android:mimeType="application/pdf" />

in the intent-filter in AndroidManifest.xml (in android studio).

I searched but couldn’t find anything in react-native or expo for handling incoming pdf file.

How can i catch this file name when opening a pdf from outside the app?

note: just found this feature request which is a bit similar:
https://expo.canny.io/feature-requests/p/implement-android-share-receiver

Greetings


Share photo to application
#2

Hi @flieks, so far we only support app linking via url schemes, where you could pass the file name as a url parameter (ie) https://docs.expo.io/versions/latest/guides/linking.html#in-a-standalone-app . Afaik, intent-filters can only be done right now via detached mode.

We will try our best to implement the requests on our feature board, please add/upvote feature requests if there are some things you wish to see in the future!


#3

Hi, @quinlanj any update for this issue?
Thanks!


#4

Hi,

I’m working on a solution to have a PDF offline viewer, inner app viewer (android capable, using expo):