简体   繁体   中英

integrate my application with browser android

I would like to create an application wherein if the app is installed on our android mobile,the user should be given a facility to share images through the application on selection of images while browsing.
Please let me know how i can achieve this.Can i achieve this using intent filters?
Please let me know your valuable suggestions.
Thanks in advance.

You need to use a custom scheme and host, for example

in your activity definition on your manifest

put this:

<intent-filter>
    <data android:scheme="http" android:host="twitter.com"/>
    <action android:name="android.intent.action.VIEW" />
</intent-filter>

then on your browser go to twitter.com you should be asked to open that link with the browser or with your app

hope this help

update1: you can handle http protocol so you can get the full url and depending on the host or extension can be an image....

Step #1: Write a Web site that allows "selection of images", since this is not something native to a Web browser

Step #2: Implement some sort of sharing feature to your Web site

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM