onyxbits / raccoon4

APK Downloader for Google Play
https://raccoon.onyxbits.de
Apache License 2.0
655 stars 91 forks source link

Figure out how to hook up Raccoon with a webbrowser #27

Open onyxbits opened 7 years ago

onyxbits commented 7 years ago

Firefox has this "Open With" Addon (https://addons.mozilla.org/en-US/firefox/addon/open-with/). Would be nice to have a

--gpa-open

Commandline parameter to hand over a market page from browser to Raccoon.

ToDo:

  1. Modify the gplay package and add an option to show an app by packagename wihtout first searching for it.
  2. Due to the file locks on the database we can't run multiple Raccoon instances simultanously. There needs to be a mechanism to check if Raccoon is already running and, if so, to pass a task to the running instance.
DragoonAethis commented 7 years ago

This could be cleanly done by handling a custom URI schema. For example, Spotify does this "handover" with links like: spotify://track/3lsdij2abcroddj6pshuap, and Windows Store uses something like: ms-windows-store://pdp/?PFN= Microsoft.Office.OneNote_8wekyb3d8bbwe - on Android the same is done if you open a Google Play link in a web browser by opening a market://details?id=com.example.your.package link. Apps can register themselves to handle such links (much like default HTTP/HTTPS/FTP/... link handlers).

This would probably involve registering Raccoon as a URI handler (have a Stack Overflow post - annotated project is also written in Java with MIT-licensed sources on GitHub), using a browser extension to open a market:// link directly and handling that.

(I'm not sure if the "Open With" addon lets you pass links to arbitrary applications and that you'd just like to integrate that without integrating with the system itself.)