in my android app (java) i want to save a bitmap to locale storage and then get the absolute path so another app (flutter app) can also retrieve this image using the absolute path.
what's the best way to do it ?
Related
I have downloaded an image from a URL using ImageIO.write, so now I am wondering if there was a possibility of somehow caching that image. Is there a possibility to compare the downloaded image with the URL it's downloaded from to know that the image is from that URL? I need this because if I download an image and than later call that same URL for downloading, my app can recognize that it already has the image downloaded, so it doesn't download it again.
You should try to see if you can integrate the code to upload the picture to google and search by image. Or, you can also save the url of the image with an array while storing the image if you have multiple images you want to download at once.
i have demo application with image view and in this image view i need to set image from which selected from whats app Chat,
Currently i was getting Path of selected image i.e. content://com.whatsapp.provider.media/item/245429
Does any idea to resolve this ?
Thank You in Advance.
There is no image path, as there is no requirement that this Uri point to a file, let alone point to a file that you have direct filesystem access to.
Use an image-loading library (e.g., Glide, Picasso) and provide it the Uri that you get from WhatsApp. Those libraries know how to use ContentResolver and openInputStream() to read in the bytes associated with that content, convert those bytes into a Bitmap using BitmapFactory.decodeStream(), and put the Bitmap into your ImageView.
I want to apply a wallpaper from assets using the default cropper (shown below):
This is usually done by using the WallpaperManager.getCropAndSetWallpaperIntent(ContentUri uri);
However, I can't figure out how the use the images from the assets to do this. The problem is that this method requires Content URI, and all I have from the assets is the "usual" URI: file:///android_asset/...
How can I do this? Is there a workaround to this method?
I am developing android application with restFul webservice.anyone can tell that How all Android WebApplication developers Maintaining Images With common Database.
1)Will they storing only ImagePath on DataBase?
2)will they Storing Image on DataBase?
I am using a pre-populated database shipped with in the apk. Image's file name is written in the database table and Images are in drawables folder.
So in my case i read the file name from the database and get the image from the drawable folder.
You can use this method.
Put the image url-path into the database.
I want to read a image and re size it using App Engine java.
i am not able to find how to read image from a location and save it in app engine.
can any one help????
You can store uploaded image to blobstore. Read following document to know how to use blobstore.
https://developers.google.com/appengine/docs/java/blobstore/overview
Then you can use image service to scale image:
https://developers.google.com/appengine/docs/java/images/overview