Imageurl Loading with "com.googlecode.android-query:android-query:0.25.9"

14 views
Skip to first unread message

krishna teja Reddappagari

unread,
Sep 7, 2018, 7:10:21 AM9/7/18
to Android Query
Hi,

I am trying to load Imageurl using dependency "com.googlecode.android-query:android-query:0.25.9" in SDK 28, but it's not loading the image. 

I don't get any compiletime errors, but when I try to run in targetSdkVersion 28 it doesn't load any images, but when i try in targetSdkVersion 27 or lesser versions it does load normally.

Is there something wrong with the dependency file or is there any latest version available for targetSdkVersion 28?

Any Suggestions?

Thanks.

Abhishek Patel

unread,
Sep 7, 2018, 12:39:43 PM9/7/18
to androi...@googlegroups.com
Some files are not compatible with android SDK version 28. you image file is uploading in android but it is not showing actually it is main problem. You can use this code for your upload image operation, I was facing the same problem I tried this solution and it worked.

I hope this will help you.

Thank you.

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

if (resultCode == RESULT_OK) {
if (requestCode == SELECT_PICTURE) {
// Get the url from data
Uri selectedImageUri = data.getData();
if (null != selectedImageUri) {

path = getPathFromURI(selectedImageUri);


String imagep = path;
SharedPreferences.Editor adt = sharedPreferences.edit();
adt.putString(image, path);
adt.commit();
// Set the image in ImageView
((CircleImageView) findViewById(R.id.selectimager)).setImageURI(Uri.parse(path));
imageview = (CircleImageView) findViewById(R.id.selectimager);
hitupload();

}
}
}

}
public String getPathFromURI(Uri contentUri) {
String res = null;
String[] proj = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(contentUri, proj, null, null, null);
if (cursor.moveToFirst()) {
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
res = cursor.getString(column_index);
}
cursor.close();
return res;
}


--
You received this message because you are subscribed to the Google Groups "Android Query" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-quer...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages