Questions tagged [android-ion]

Asynchronous networking and image loading library for Android. Use with the [android] tag

179 questions
87
votes
4 answers

OkHttp Post Body as JSON

So, back when I was using Koush's Ion, I was able to add a json body to my posts with a simple .setJsonObjectBody(json).asJsonObject() I'm moving over to OkHttp, and I really don't see a good way to do that. I'm getting error 400's all over the…
Pixel Perfect
  • 1,266
  • 1
  • 11
  • 14
17
votes
1 answer

How to convert the uri to inputStream data and upload the stream data into server?

I am working the task in picking the file from the gallery and upload the picked file to the server. protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if…
Prabha Karan
  • 1,309
  • 3
  • 17
  • 35
15
votes
4 answers

How to load gif image in placeholder of Glide/Picasso/Ion etc

Not able to find perfect solution for loading a gif image in placeholder Glide .with(context) .load("imageUrl") .asGif() .placeholder(R.drawable.gifImage) .crossFade() .into(imageView) Tried asGif() property of Glide…
Dinesh Sunny
  • 4,663
  • 3
  • 30
  • 29
10
votes
4 answers

How to use self-signed SSL in android network library (ION)?

Using this network library: https://github.com/koush/ion As the current status is development, I would like to use self-signed SSL cert The library forum has some discussion: https://github.com/koush/ion/issues/3 Ion ion = Ion.getDefault(c); …
user3538235
  • 1,991
  • 6
  • 27
  • 55
9
votes
0 answers

Spring Android Vs Retrofit

I've been doing some digging lately into the REST Clients for Android. Majority of the discussions have been around Volley and Retrofit, seldom I came across comparisons between Ion, Robospice with these two. I could not find any comparison with…
Mushtaq Jameel
  • 7,053
  • 7
  • 33
  • 52
9
votes
2 answers

How to create a PUT request in ION library

I am using Ion library and i should say that is awesome. but i cannot find a documentation for creating PUT , DELETE , GET request? if it can handle this REST Request can you guide me ?
Navid_pdp11
  • 3,487
  • 3
  • 37
  • 65
8
votes
4 answers

Java generic method type argument

I have a problem with generic method's explicit type arguments. I know I can do this: Foo.function(); assuming there is a void function() {...} function in Foo class. The exact problem is: I would like to download some content (Android…
Tamás Cseh
  • 3,050
  • 1
  • 20
  • 30
7
votes
1 answer

Get MediaStore path of a Specific Folder

I'm creating an update for my application, in it I have a folder with saved images that I would like to display in a GridView. I am already using the Ion library. The creator of the library (Koush Dutta) already has a sample doing what I want and…
Tristan
  • 3,530
  • 3
  • 30
  • 39
5
votes
2 answers

SSL handshake exception retrofit android

I am getting unusual exception suddenly after base url got changed from http:// to https://. Every time I hit API with https:// I can see log flashing "HTTP FAILED: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException:…
The90sArtist
  • 177
  • 1
  • 1
  • 9
5
votes
2 answers

Save gif to android gallery

Using https://github.com/koush/ion image Loader to display gif files into ImageView I save the jpg images into gallery by this code MediaStore.Images.Media.insertImage( getActivity().getContentResolver(),…
Jehad
  • 472
  • 2
  • 10
  • 24
4
votes
3 answers

Android Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/RequestLine;

On Android 9 on a OnePlus5, when I try a remote connection using the ion library, I receive this error: Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/RequestLine; at…
shaithana
  • 2,470
  • 1
  • 24
  • 37
4
votes
2 answers

Android app using ION for HTTPS requests fail, seemingly after Google Play Services update

I have an Android app using ION to make HTTPS requests to my backend. This morning, suddenly it started failing with SSL handshake errors: javax.net.ssl.SSLHandshakeException: error:10000410:SSL…
JHH
  • 8,567
  • 8
  • 47
  • 91
4
votes
1 answer

Ion Android getHeaders

How do I get a specific header using the Ion network library for Android? This is what I'm trying: ... .setCallback(new FutureCallback>() { @Override public void onCompleted(Exception e, Response result) { …
Andrew
  • 3,545
  • 4
  • 31
  • 37
4
votes
3 answers

Android Ion Cache Refresh

I'm using a specific url to obtain an image online, but the url itself automatically changes every few minutes. I'm using ION library from Here The problem I'm having is when I refresh the page, the page itself looks like it is refreshing but the…
John McKenzie
  • 420
  • 6
  • 16
4
votes
1 answer

Koush Ion Library - Upload Multipart/form-data with Progressbar, TimeoutException

I'm going to upload file to rest API with Ion like this ( base on sample code that Koush provided) if (Upload != null && !Upload.isDone() && !Upload.isCancelled()){ resetUploadReq(); return; } String…
1
2 3
11 12