1. Check out our companion app, Forums for Android! Download from Google Play

Problem with Twitter Search Query in Android Emulator

Discussion in 'Application Development' started by adamj2, Nov 29, 2010.

  1. adamj2

    adamj2 New Member
    Thread Starter
    5

    Nov 29, 2010
    1
    0
    5
    Hey,

    I am playing about with obtaining search results from the Twitter Search API using the Twitter4J library.

    I have got a simple search working in Eclispe using a standard java class and the results have been printed sucessfully in the console within Eclipse.

    However, it does not work when I integrate it into android and try it out on the emulator. Am using AVD 1.5 and same thing happens on 2.1

    The line of code it throws an exception for is:

    Code (Text):
    1.  
    2. QueryResult queryresult = twitter.search(query);
    3.  
    I was thinking it might be something to do with the emulator not being able to access the Internet to perform the search. (Although I am able to manually use the browser within the emulator to access the internet.)

    As I said, my code works using a standard Java class in Eclipse, but not when I try to put in into an android app and test on the emulator.

    Any suggestions?

    Many thanks for any help.
     

    Advertisement

Share This Page

Loading...