Closed iLexiconn closed 8 years ago
The BufferedImage and ImageIO classes can't isn't part of the android sdk. And maybe use the android http stuff as well.
You can use FileOutputStream
. I used it to store images on Android.
I don't want to store it. It's used to get the profile picture. I also can't get the httpclient to work in Android 6.0+
Could you make an test repo or branch for Android? I'll take a look at it
Done. :)
How do you exactly want to return the profile picture? There are so many ways
Er, just an image. :p
So, FileOutputStream
.
I mean a test project for Android. Not really a development branch
Sure. :p
Whoops missed that message. I'll create one in a few mins.
There is no more httpclient in android 6.0 and up
I know, that's why I tested it on that version.
And it doesn't fall back on urlhttpconnention?
I'm talking about the HttpClient stuff.
Yeah but if the library is used on android, it should fall back on using urlhttpconnention instead of using httpclient.
I'm sorry i already get what you wete talking about. I will add this to my todo list for tomorrow.
:+1:
Lol, why don't you just compile it with a lower version?
The lib is gone maybe, but that doesn't mean that older version won't run.
Because than it will crash on android 6.0+ because they cant find the class
I want this lib to be future-ready. You never know when they are going to remove it completely.
Got a fix for it.
Please dont let it be just adding:
useLibrary 'org.apache.http.legacy'
To the gradle file 😕
Yeah.. :smile:
Well that's not really a 'fix'
I agree, let's migrate to HttpURLConnection
than.
Only for android or also for normal desktop use?
Let's take the easy path and do both.
I agree with that. Let's keep it as universal as possible
Ok them I will migrate every thing to HttpUrlConnection
Cool :+1:
👍
Well this still doesn't fix the BufferedImage stuff.
Yes i forgot
We can return an object containing a drawable or a buffered image depending on which os we are running.
Yeah, just return an universal type of object.
Well there is none. So we will have to create a wrapper.
Can you be more clear? I can implement it right away for android. You just have to run it on another thread instead of the ui thread.