0

Hello friends i wnat to open my application form browser url so in my menifest file below is my code

<activity
        android:name=".Registration"
        android:exported="true" >
        <intent-filter>
            <data 
                android:scheme="rentalandroid"/>

            <category android:name="android.intent.category.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <action android:name="android.intent.action.VIEW" />
        </intent-filter>
    </activity>

and i want to open my application form Gmail application which is i receive one mail and inside that one button over here . so when i click on that button at that time my application should be open with registration screen which i set scheme for that so my PHP developer set url in on mail button click like below

My browser url is

http://secure.worldofrental.com/test/reg/36df6c69bf33fa39863e048a3018f899 


<a href='.base_url("test/reg/".$row['accsesskey']).'>testlink</a>

Using above code in my gmail i m not able to click that button so i can not navigate to my application so any idea how can i solve this problem ?

Harshal Kalavadiya
  • 2,412
  • 4
  • 38
  • 71

2 Answers2

1

Your url scheme should be rentalandroid for this to work:
Example: rentalandroid://mywebsite.com

 <activity
            android:name=".Registration"
            android:exported="true" >
            <intent-filter>
                <data 
                    android:scheme="rentalandroid"/>

                <category android:name="android.intent.category.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <action android:name="android.intent.action.VIEW" />
            </intent-filter>
        </activity>
Lazy Ninja
  • 22,342
  • 9
  • 83
  • 103
  • Lazy Ninja : your code is working , but now can you chekc my another question [http://stackoverflow.com/questions/30317211/issue-in-using-custom-url-schema-application-open-option-dialog-not-open-through](http://stackoverflow.com/questions/30317211/issue-in-using-custom-url-schema-application-open-option-dialog-not-open-through)? – Harshal Kalavadiya May 19 '15 at 06:52
0

Try to remove category for view :

<activity
        android:name=".Registration"
        android:exported="true" >

   <intent-filter>
       <data android:scheme="rentalandroid"/>
       <category android:name="android.intent.category.DEFAULT" />
       <category android:name="android.intent.category.BROWSABLE" />
       <action android:name="android.intent.action.VIEW" />
   </intent-filter>
</activity>
Haresh Chhelana
  • 24,720
  • 5
  • 57
  • 67