0

On my firestore db app, I am fetching google photos by URL address and using picasso to display the image view. It works efficiently on my Samsung Galaxy S4 but does not work at all on my Samsung S8. The relevant code:

setContentView(R.layout.encounters_detail);
txtdt = (TextView)findViewById(R.id.dt);                    
txtdt.setText(model.getDate().toString());
txtencounter= 
(TextView)findViewById(R.id.txt_encounter);
txtencounter.setText(model.getEncounter().
toString();
photourl=(model.getPhotoURL().toString());
String urlString = photourl;
try {
URL myURL = new URL(urlString);
photourl = myURL.toString();
 }catch (Exception e){
 }

 imgvw = (ImageView)findViewById(R.id.image);

 Picasso.with(context).load(photourl).
    fit().into(imgvw);

I appreciate any help.

rosey
  • 141
  • 1
  • 3
  • 9
  • Are both phones giving equal permissions (esp. network permission)? Can you add the phones' Android versions in the post? – Aleksandar Stefanović Feb 13 '18 at 21:32
  • Android version Galaxy s4 5.01, S8 7.0 – rosey Feb 14 '18 at 00:11
  • Android version Galaxy s4 5.01, S8 7.0 How do I check permissions? I should add that also 2 textfields on the layout display normally. Thanks for the help. – rosey Feb 14 '18 at 00:20
  • In running the app in debug mode and invoking the above code I got two different responses in the android studio Console. For the Galaxy S4 that displays the image: – rosey Feb 14 '18 at 14:00

1 Answers1

-1

Please try Glide ... https://github.com/codepath/android_guides/wiki/Displaying-Images-with-the-Glide-Library It's more effective then Picasso..

Umer Farooq
  • 168
  • 1
  • 12