how to show image from server without downloading it android - java

I am building an Android app that will show images - based on exact GPS location.
My idea is to show these images from server without downloading them to phone. That way you can view them only if you have downloaded that app and have internet access.
Is it possible in Android??

YEs.. You can load them in a webview:
http://developer.android.com/reference/android/webkit/WebView.html

Related

How can I open my application directly inside the play store installed android app by tapping on the universal link?

I want to open my android application inside the play store app when the user will tap on the universal link from skype, or facebook-messenger. Surfing a lot but fail to open it all the time. I've used the sample URL given below.
https://play.google.com/store/apps/details?id=com.amsoft71.babystudyguide&hl=en&gl=US

Glide for Android: How to include GIFs from Google Drive?

I am trying to include GIFs in my android application. My GIFs are shared as a document on Google Drive with public access enabled. Currently, I'm trying to use Glide to include the GIFs.
Glide.with(parent.getContext())
.asGif()
.load("https://drive.google.com/uc?id=1-QKgZ76K3EZQlbXyY3wI57FA8k31JmrA")
.into(imageView);
However, although there is no error, the GIF does not display on my phone, even after a long time(internet issues shouldn't be the problem).
It appears that this is only a problem for GIFs on google drive. Trying to show an internet GIF such as this one works on my Android phone.
How can I show GIF files on Google Drive with Glide on my Android device?
It should work. Because Glide trying to fetch image which type you specified. I just tried it and its work. it loads too late. If you wait a bit, you will see that it can be loaded. You can test it more easily if you upload a lower resolution gif file to Drive.

Picasso failure in Android Native Developing

I have an android application coded with Java in Android Studio.
I published my Restful Api to web server.
Whenever i open my android app, the pictures uploaded to the server can not be downloaded to the app via Picasso.
Moreover I can not access these pictures under App_Data folder. Any solutions?
I want to share that answer in case someone needs it.
The accessing problem to my pictures under the App_Data folder was caused by a missing virtual directory matching.
First i created a virtual directory pointing to my pictures folder under App_Data.
Second i tested whether i can access these pictures with chrome browser. if i typed the correct path with the new created virtual directory i can access via web browser.
But the key issue is that i can not access these files again from my app.
I found the reason by deep diving and analyzing.
The actual problem is that:
When i tried to access these files by my android app, Picasso assigns some mapping in its cache. which is under my android app folder.
Because of this cache, no matter i fixed the virtual directory issue Picasso can not access them. Picasso only checks it's cache and if there is a 404 error for that file it doesn't try one more time.
So at the and i completely uninstalled from the device and i installed it again. After that everything is fine!
Edit:clearing picasso cache also works. But it must be used on similar conditions, otherwise clearing picasso cache can affect load times as well as internet usage.

How to upload HtmlLink to Android WebView

I'm trying to uplaod html link url to Android Webview.
But I've noticed that it is differ by Android device and OS version.
In Some Device shows the whole texts while the other does not show all the texts.
Is there any way to show whole texts Programmatically.
I'm using Java language and the code is Just
this.loadUrl(strHtml);// this load www.blahblah.com/blah.html
Thank you.

Save as a image which is on android screen

I want to save as an image which is on android mobile screen at 10 sec time interval. Which may be home screen or menu screen or any thing. Can anybody tell me how i can achieve this?
I got success for my own application but its not capturing menu screen as an image.
Unfortunately, on most devices it's not possible to get the snapshot of the device outside your application. This, obviously, for security reasons.
This could be achieved accessing the frame buffer at /dev/graphics/fb0, but normally you don't have the permissions to read that.
You need to have a root access to achieve this. Write a background service and execute "/system/bin/screencap" to get the screenshot. Check this answer to find out how to get screenshot and store in sdcard.
Alternatively you can use Android Screenshot library to get screenshots on a non-rooted phones but it requires your phone to be connected to your desktop using ADB.

Categories

Resources