signpost

Android Dev - Callback URL not working… (0_o)

守給你的承諾、 提交于 2019-11-27 21:03:09
问题 I'm working on an android application for my research, and I am working with OAuth (signpost library) to gain access to user data from a web service which is also a part of the development process. I am able to flow through the common steps of OAuth, and I use a Uri (for callback to the app), and can get to the step where I invoke the devices browser, choose to verify my app, and the next step is SUPPOSED to redirect the browser BACK to the application.... Instead I get an error that reads

HttpURLConnection.getResponseCode() returns -1 on second invocation

狂风中的少年 提交于 2019-11-26 21:51:22
I seem to be running into a peculiar problem on Android 1.5 when a library I'm using (signpost 1.1-SNAPSHOT), makes two consecutive connections to a remote server. The second connection always fails with a HttpURLConnection.getResponseCode() of -1 Here's a testcase that exposes the problem: // BROKEN public void testDefaultOAuthConsumerAndroidBug() throws Exception { for (int i = 0; i < 2; ++i) { final HttpURLConnection c = (HttpURLConnection) new URL("https://api.tripit.com/oauth/request_token").openConnection(); final DefaultOAuthConsumer consumer = new DefaultOAuthConsumer(api_key, api

HttpURLConnection.getResponseCode() returns -1 on second invocation

折月煮酒 提交于 2019-11-26 08:06:36
问题 I seem to be running into a peculiar problem on Android 1.5 when a library I\'m using (signpost 1.1-SNAPSHOT), makes two consecutive connections to a remote server. The second connection always fails with a HttpURLConnection.getResponseCode() of -1 Here\'s a testcase that exposes the problem: // BROKEN public void testDefaultOAuthConsumerAndroidBug() throws Exception { for (int i = 0; i < 2; ++i) { final HttpURLConnection c = (HttpURLConnection) new URL(\"https://api.tripit.com/oauth/request