kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
04/30/14 02:48 PM (10 years ago)

URL scheme for Android?

Hi All, I'm currently using a custom URL scheme in my ios app (thanks Niraj) and I've rather come to love using this method for interlinking screens and html documents. I can simply put a link into an html document appurlschemename://ScreenNickname and it works! So far so good. Now I'm after doing the same for Android in Eclipse. I was hoping some of you could guide me in the right direction or share any experience. I've read about adding <data android:scheme="myapp" /> to the android manifest but I'm not sure if this will do what I want or what the links would have tp look like. Any help would be much appreciated.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/01/14 04:01 AM (10 years ago)
Hi @kingelessar, Not sure what you are asking but the links and html should work the same in Android. Now sometimes it can be easier for loading if you put the html docs in your eclipse folder. LA
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
05/01/14 12:57 PM (10 years ago)
Hello LA, I'm not clear what else I may need to add to the manifest file, nor what the links are meant to look like. For example, if the hyperlinks inside an html document (pointing to another document) have to look like they do on the ios side, which is scheme://ScreenName pointing to a plugin which in turn contains the html file name. If so, I've not got it to work. What does work is a simple <a href="filename.html" title="blabla">blablabla</a></p> I seem to be able to go from file to file, rather than screen to screen. But I don't think that's what I'm supposed to do, because if I go from file 1 to file 2 to file 3, the navigation bar will always show the name of 1 and the back button will go straight to the originating menu. So although it work in a way, I'd rather know how to replicate the ios way.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/01/14 01:08 PM (10 years ago)
You would not do anything in the manifest unless you are adding permission..etc. Treat it like a link. I think it goes like this: file:///android_asset/main/main.html but it has been awhile. If you put all your images and html in the same folder in Eclipse, then the html should pick up the images by itself. For going from file 1 to file 2, why don't you use the buzztouch cp for that? LA
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
05/01/14 01:24 PM (10 years ago)
Not sure what you mean, using the cp? I know two ways of doing this. One is using the html pro plugin for creating links in an html file pointing to a BT screen, which is fine but rather tedious for apps with lots of such links. The other way is the above url scheme that I'm trying to figure out.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.