Open armandn opened 6 months ago
Hello @armandn, thanks for sharing this! This was requested in 87. We'll have to see if your code changes interfere with the "normal" share functionality. But if not, we could include this as an addition to the project. If you find time, please create a pull request for this!
I managed to register my app as the default handler for a file type (mime type) and I think the plugin could be modified/extended to do this as well.
Note that in my tests I did not register a separate activity, I used MainActivity. it seems to work fine, although I'll have to do more tests.
In AndroidManifest.xml:
I then modified SendIntent.java:
In
checkSendIntentReceived
:In
readItemAt
: fromto
I also modified
readFileName()
to avoid some possible errors:Finally, I also have this in MainActivity.java:
I am pretty new at Android so I'm not entirely sure the code is correct and doesn't introduce other unwanted behavior.