Phonegap android black external image - android

I'm new to android/phonegap development. I'm trying to access external images but I only get black places where the image should be on the emulator.If I try to open the html in chrome it displays the image. I already added the domain to the white list.
Would you be so kind as to help me figure out what the problem could be?
Thank you,
Henrik

Please check the case of the images names. See if the browser is also displaying the image or not

It was just an error of the emulator, when I tried on an actual device all worked fine!

Related

Images of a node server won't be shown in my app

I'm trying to open the following image in my android app using picasso for imageView, but it is not displaying:
https://www.mesannuairesvideos.com/uploads/file-1491574016406.jpg
However, i can open it from any browser (whether on mobile or on computer).
Am sure of my picasso method cuz it works perfectly with other urls, my problem is that images in that server are displayed on browsers and won't be shown in android applications.
Could anyone try to include this image in an android test application.
Can anyone test it for me please.That would be so helpful
Kowing that images are on a remote server.
Any help would be appreciated. thanks :)
The problem you're facing have to do with the part S from your protocol (i.e. httpS - the image you are trying to open is behind a secure connection). Picasso has a flaw dealing with secure connections. But you have workarounds. See this: https://github.com/square/picasso/issues/500
Not working for me too!
I using this code:
Picasso.with(context).load("https://www.mesannuairesvideos.com/uploads/file-1491574016406.jpg").placeholder(R.drawable.placeholder).into(holder.mPhoto);
I had this issue too. So this is how i have done
Node JS Code.
_app.get('/services/user/:photo, function(req, res){
consoles.log('Loading picture -> '+req.params.photo);
res.sendFile(_path.resolve('./upload/_profile/'+req.params.photo+'.jpg'));
console.log('./upload/_profile/'+req.params.photo+'.jpg');
});
Android code is here
Picasso.with(mContext).load(url).error(R.mipmap.ic_launcher_round).placeholder(R.mipmap.ic_launcher_round).into(viewHolder.icon);
Your url does not work try with this url https://netic-news.net/upload/_article/156.jpg
I'm waiting for your feedback!

Why one of these images doesn't load on Android app?

I have a Phonegap app which runs ok in Android and iOS, except for one reason: one of the images below don't load for nothing in the Android app, but works ok on iOS:
It works: http://mobile_server.s3.amazonaws.com/banners/assets/000/000/021/medium/serra_azul.jpg?1410372361
It wont: http://mobile_server.s3.amazonaws.com/banners/assets/000/000/017/medium/boscato_banner_app.jpg?1410372359
I checked many things like image size, especial characters, network loading (debuggin' in Chrome browser), but I think that those are not the reason.
The method im using to load the image is just a <img src="..." />. Im sure that there is no problem here, because the first image works perfectly.
Maybe someone can check these two images and tell me the difference that one has to another which can make the second image don't load in Android app.
Thanks,

Image save path

i am making a Android application using PhoneGap. After capturing the image, i want the saved path of that image into the textfield.
So please help me how to get the path or any tutorial will be also fine.
I don't know if it help you but i found this post and this one as well
hope it help. Good luck!

What is the use of R.Drawable.Loader in android app while downloading image from URL

This might be a silly question, but i am stuck at a single place from quite some time and am not able to figure out the reason.
I am trying to download image from a URL to an android app. For this I am following this tutorial - http://www.androidhive.info/2012/07/android-loading-image-from-url-http/
The problem is that eclipse (I am doing coding in eclipse) is giving the error: Loader cannot be resolved or is not a field on the line where i have wriiten int load = R.drawable.loader
Any help would be appreciated.
Thanks in advance !
Going by the information given in the tutorial you linked to, R.drawable.loader is a place holder image used by the tutorial app to show to the user before the real image has finished downloading.
If the tutorial site allows you to download full projects, you can probably find this image in the /res/drawable(-something)/ directory. If not, you can pick any random placeholder image you like, rename it to loader. and put it in one of the res/drawable folders.

Android WebView Grid Display

I am having some problems with a webview I am using to access a specific URL within my Activity. When I load this exact same URL on a PC browser such as firefox, the edges of the grid are displayed
When I try to load the same URL from within my WebView by using
webView.loadURL("www.url.com");
I get the following grid.
Any ideas on how I can fix this? It's not a major issue, just annoying.
And this isn't real data, so don't worry about that.
I don't know that much about HTML so maybe this is an HTML issue?
Apologize for using imageshack, I can't post images yet.
Have you tried scrolling to the side? Does it display the images, then?
You might try the following:
Building webpages to support different screen densities
Take a look at the Android documentation there. It should give you a good example of how to get your data to display properly on any device.
Hope this helps!

Categories

Resources