0

I know how to invoke my app "App.A" on my android phone from html file using my android browser. The html is on my web server "App B" that is on my android as well, in html I added:

<a href="foo://App.A">Click me?</a>

And in my app "App A" I added the following to the AndroidManifest.xml file:

        <intent-filter >
        <data android:scheme="foo" android:host="App.A" />
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" /> 
        <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>

When I go to my web server "App B" from my phone browser "192.168.0.196:8080" I can start my app "App A" by clicking "Click me?".

But when I tray to open the app "App A" from my PC browser I got: "The address wasn't understood" and I see on the web address:

foo://App.A

Any help please?

Majid ff
  • 249
  • 7
  • 22
  • Ofcourse that does not work as the foo sheme is unknown by your pc browser. If you make your own android webserver (nano httpd) then the webserver could start an app if a certain page is asked. Or a certain page with the wanted ap as get parameter. – greenapps Aug 24 '14 at 22:13
  • OK, I am using kWS because the password based file encryption with 128 bit AES, so it is more secure than nano httpd as I understand. But I will test nano httpd later on, thanks "greenapps". – Majid ff Aug 25 '14 at 14:54
  • I just used the (nano httpd) but still same problem! – Majid ff Aug 25 '14 at 17:03
  • You have to adapt the code of nano httpd. Did you? `You have to make your own webserver` !!!! Don't think nano knows that is has to start an apk. You have to code that. – greenapps Aug 25 '14 at 18:41

1 Answers1

0

You can't do it from the PC browser, you will need a server.
I don't know what are you trying to achieve, but you may want to take a look at google cloud messaging.

pomber
  • 23,132
  • 10
  • 81
  • 94
  • Thanks "pomber" for reply, I actually already have an android server called kWS,it is running on my android phone, it has a a very simple html with a button. I want to control (start and stop) an app on my android from the browser of my PC (or nay other mobile phone browser). – Majid ff Aug 24 '14 at 20:24
  • @Majidff I am in same problem, Can you please post the answer if any you have ? – Rahul Matte Mar 11 '15 at 06:59