Posts by Micael Costa • 93 points
7 posts
-
4
votes1
answer121
viewsQ: Java Https - Httpsurlconnection - Unsupported Sslv2hello
When making an https request I have the following Exception: javax.net.ssl.Sslexception: Unsupported record version Sslv2hello public static void main(String[] args) throws Exception { URL url = new…
javaasked Micael Costa 93 -
1
votes3
answers931
viewsA: Images getImageUrl()
Resolved with: I used: Bitmap bitmap = BitmapFactory.decodeStream(conn.getInputStream()); to get the image in Bitmap and then used: imageView.setImageBitmap(bitmap);…
androidanswered Micael Costa 93 -
1
votes3
answers931
viewsQ: Images getImageUrl()
I’m uploading images like this: final ImageView img = (ImageView) firstElementView.findViewById(R.id.grid_image); String src = item.getImageUrl(); img.setTag(src); imageLoader.displayImage(src, img,…
androidasked Micael Costa 93 -
1
votes2
answers268
viewsA: Set value for a cookie
I solved the problem with: conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "application/json; charset=UTF-8");…
-
2
votes2
answers268
viewsQ: Set value for a cookie
I intend to change a cookie value, I’m using: public static void main(String[] args) throws Exception { URL url; HttpURLConnection conn; url = new URL("http://google.pt"); conn = (HttpURLConnection)…
-
0
votes3
answers465
viewsA: Media Player setDataSource
I have a file - file.m3u8 with the following content: EXTM3U EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 1",AUTOSELECT=YES,DEFAULT=YES…
androidanswered Micael Costa 93 -
0
votes3
answers465
viewsA: Media Player setDataSource
Works if it is a local file, but it is a streaming file (a url) AssetFileDescriptor afd = ctx.getAssets().openFd("file.txt"); mediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(),…
androidanswered Micael Costa 93