Note that there are some explanatory texts on larger screens.

plurals
  1. POjtwitter library: connecting to alternative service fails
    text
    copied!<blockquote> <p><strong>EDIT</strong></p> <p>omg I clearly should take a break... logcat gives these errors and as it seems the catch-block is also executed but the messages are actually sent as I have verified by visiting the page: <a href="http://yamba.marakana.com/" rel="nofollow noreferrer">http://yamba.marakana.com/</a></p> <p>Actually a thing that took me 2 hours to get aware of.. can someone please tell me why the app still wants to connect to twitter too?</p> </blockquote> <p>I am following this tutorial from MarakanaTechTV: <a href="https://www.youtube.com/watch?v=-P1eiRy-klk&amp;feature=relmfu" rel="nofollow noreferrer">https://www.youtube.com/watch?v=-P1eiRy-klk&amp;feature=relmfu</a></p> <p>It's about building a twitter-like client but for simplicity (avoiding OAuth) its useing its own service located here: <a href="http://yamba.marakana.com/" rel="nofollow noreferrer">http://yamba.marakana.com/</a> username is student and password is password.</p> <p>here is my code:</p> <pre><code> public void onClick(View v) { final String statusText = editStatus.getText().toString(); //zeitkritische Aufgaben wie z.b. networking oder DB Zugriff dürfen nicht im main-thread laufen //App crashed sonst new Thread() { public void run() { try { Twitter twitter = new Twitter("student", "password"); twitter.setAPIRootUrl("http://yamba.marakana.com/api"); twitter.setStatus(statusText); } catch (Exception e) { Log.e("error", "DIED", e); //e.printStackTrace(e); } } }.start(); Log.d("StatusActivity", "onClicked! with text: " + statusText); } } </code></pre> <p>and here is what logcat gives me:</p> <blockquote> <p>04-08 20:48:14.329: D/gralloc_goldfish(1935): Emulator without GPU emulation detected. 04-08 20:48:17.019: D/StatusActivity(1935): onClicked! with text: ggfdg 04-08 20:48:23.308: D/StatusActivity(1935): onClicked! with text: ggfdg 04-08 20:48:24.438: E/error(1935): DIED 04-08 20:48:24.438: E/error(1935): winterwell.jtwitter.TwitterException$E401: Unauthorized <a href="http://twitter.com/account/rate_limit_status.json" rel="nofollow noreferrer">http://twitter.com/account/rate_limit_status.json</a> (student) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.URLConnectionHttpClient.processError(URLConnectionHttpClient.java:125) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.URLConnectionHttpClient.getPage(URLConnectionHttpClient.java:91) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.URLConnectionHttpClient.processError(URLConnectionHttpClient.java:143) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:219) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.Twitter.post(Twitter.java:1944) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2555) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2502) 04-08 20:48:24.438: E/error(1935): at winterwell.jtwitter.Twitter.setStatus(Twitter.java:2274) 04-08 20:48:24.438: E/error(1935): at com.example.yamba.StatusActivity$1.run(StatusActivity.java:34)</p> </blockquote> <p>It seems that the app tries to connect to twitter despite the fact that it should connect to the marakana-service because of this line:</p> <pre><code>twitter.setAPIRootUrl("http://yamba.marakana.com/api"); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload