0

I have a link "openactivity://", my application has activity: com.example.MyAct

Is there way to open activity "com.example.MyAct" by clicking on the link ?

I have tried with :

 <activity android:name=".MyAct"
                  android:label="@string/app_name">
      <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <data android:scheme="openactivity"/>
      </intent-filter>
   </activity >

But it doesn't alway work, it seem not work on Android device with high version.(It doesn't work on my HTC Sensation version 2.3.4 and HTC One X version 4.0.3)

kairen
  • 235
  • 3
  • 13
  • Also have a look at http://stackoverflow.com/questions/3471503/how-to-listen-for-a-custom-uri – Rajesh Apr 25 '12 at 13:09
  • Hi Rajesh, I have tried with the way intent-filter and Uri data = getIntent().getData(); but that not work with all android device – kairen Apr 25 '12 at 13:13

1 Answers1

0

i got the answer: some android email app will change my link into http format before lauching, that's why I cannot catch custom URL event.

HTC Sensation version's native mail app does the thing I say above.

Just try with other mail app like K-9 Email, everything would work.

kairen
  • 235
  • 3
  • 13