Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 55

miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
07/09/15 08:41 AM (9 years ago)

Image in CustomHTML, both iOS and Android

If I want to place image in customHTML, for iOS app is enough: <img src=“image.png" /> and works fine. This doesn't work for me in Android version. Chris1 suggested this: <img src = "file:///android_res/drawable/image.png" /> and it works fine on Android. I would like to have the same image in both versions and I use a lot of CustomHTMLs in my app, and I don't want to make 2 apps, 1 for iOS and 1 for Android. Is it possible to enter the same src attribute which works for both platforms?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/09/15 09:05 AM (9 years ago)
The easiest way to do it is the host the images elsewhere in this case. In my opinion.
 
Imagenparaweb
Aspiring developer
Profile
Posts: 121
Reg: Dec 13, 2011
Cordoba
1,210
like
07/10/15 05:21 AM (9 years ago)
If you use Custom HTML plugin, then users must be connected to internet.. so I'm agree with mysps, you should use an internet location for the image. Or you can use HTML Doc plugin. I use that and have no problem with images in Android o iOS.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
07/11/15 04:27 AM (9 years ago)
If you uploaded the image to files in buzztouch, click on that image and it brings up a html page, you can copy that link for both ios and android. Always put the image in your project for faster download and cache. If you keep the names simple, like image.png, with no caps and png, then the image will work on both platforms. Just a few tips. LA
 

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.