last day (15 days later) » 

11:33
0
Q: Android Wear Standalone App. How to load url into ImageView

Carlos Cabello RuizI m working in an Standalone Wear app. Everything works but the image loading its too slow. The way I m doing is, using Firebase Storage as back-end, I m getting the url and using Glide loading it into an ImageView. I also try using Picasso with the same result I tried to use the DaVici libra...

How big is your image in terms of resolution and also in terms of size in MB / KB it will obviously matter for android wearable devices.
Hi! The images are 80-90Kb....they are profile images. I m using a Camera Intent
Camera intent for ??
No no...sorry!! You re right...The ones takes by the camera are 4Mb!!! I m gonna change that straight away but the mock users has images of 80-90Mb and its still really slow
You need to implement some optimization and compression techniques developer.android.com/topic/performance/graphics/…
11:33
Akshay Katariya..I updated the question adding the way I m compressing the image...I ve just change this rotatedBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos); to rotatedBitmap.compress(Bitmap.CompressFormat.PNG, 25, fos); but the image now instead of being 4Mb is 10MB!!!
Hi what exactly you are trying to achive??
you want to set image to Imagebiew or to upload image to firebase database?? im totally confused now
Hi!! Thanks for taking the time
The Wear App is loading the images from the firebase database
ok
so what is your exact problem?
and this is taking too long....I need to fix also the way I m uploading the images so far because they are huge, this is another thing
I m trying to load images 80-90Kb size in the Watch but its taking too long
thats exactly what I m asking in the question(I will fix the other problem on my own)
give me one sample of uri/url if possible of the image that you are trying to load
11:43
thats one of them...I m not sure if you can access
Thats the other one
One of the wear face that I created needs to load the image with the user name at the bottom
and how are you setting your image into imageview??
Also can you check what is your display dimensions using https://stackoverflow.com/a/4744499/4762767
Right now I m using Picasso....I m doing this
Picasso.get().load(imageUrl).into(iv);
where iv its the ImageView
The ImageView is in the first page of a ViewPager
I m using this adepter: android.support.v4.view.PagerAdapter;
I don't see anything wrong over here, but what you can try is loading an image from your drawable folder so that you can be sure it's not the internet that is causing the issue, if still, it is loading slow then try to reduce image dimension to 20X20 of any suitable smaller dimension
Cool! I m on it
Its instant when I use a drawable
I suspect its internet connectivity issue then
A walk around to this problem is store those image in internal storage when app loades first time and load it from there
11:58
I found the issue!!!
This is the code that I m using to download the image
Bitmap bitmap = Bitmap.createBitmap((int) getResources().getDimension(R.dimen.profile_face_height), (int) getResources().getDimension(R.dimen.profile_face_height), Bitmap.Config.ARGB_8888);
mFace1ProfilePicture.setImageBitmap(bitmap);

StorageReference imageReference = App.getStorage().getReference().child("images/" + mUser.getPicture());
imageReference.getDownloadUrl()
.addOnSuccessListener(uri -> {
Log.d("Testing", "loadSuggestionFace: setting the image");
UiTools.setImage(mFace1ProfilePicture, uri.toString());
I m setting a bitmap before downloading it(App.getStorage().getreference()...)
I removed it and it works!!
I will explain it in the question..
Cool Happy coding Bi
Many many many thanks for your time!!!!!
Have a nice day ;)
Same to you Bye :-)

last day (15 days later) »