Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7791485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:54:05+00:00 2026-06-01T21:54:05+00:00

I have an application that gets information from google calendar by getting them from

  • 0

I have an application that gets information from google calendar by getting them from the php API, the issue is that the app works on the emulator but when I try to use it on my phone there is only a regular black screen with no information. It seems to be a connection issue (unlike my first thought).
The emulator android version is 2.3.3 and same thing for my phone.

This is my code:

 public class AgendaActivity extends Activity {
    /** Called when the activity is first created. */
  public static final String CAL= "http://192.168.1.58/calendar.php";
  ListView vue;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
  vue = (ListView) findViewById(R.id.listView1);
      List<HashMap<String, String>> liste = new ArrayList<HashMap<String,String>>();       
      HashMap<String, String> element;
    String result = getServerData(CAL);
    String[] chaine = result.split(";");
    for(int i=1;i<chaine.length-1;i++)
    {
                String[] event = chaine[i].split(":");
                element = new HashMap<String, String>();
                element.put("titre", event[1]);
                element.put("date",event[3]+":"+event[4] );
                liste.add(element);
    }
      ListAdapter adapter = new SimpleAdapter(this,  
            liste,
            android.R.layout.simple_list_item_2,
            new String[] {"titre", "date"}, 
            new int[] {android.R.id.text1, android.R.id.text2 });
      vue.setAdapter(adapter);      
}
private String getServerData(String returnString)  {    
    InputStream is = null;
    String result = "";
    File file = new File("sdcard/event.txt");
    FileWriter fw;
    FileReader fr;
    ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
    nameValuePairs.add(new BasicNameValuePair("contact",""));
    HttpResponse response=null;
    try{
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost(returnString);
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
         response = httpclient.execute(httppost);
        HttpEntity entity = response.getEntity();
        is = entity.getContent();   
    }catch(Exception e){
        Log.e("log_tag", "Error in http connection " + e.toString());
        String str = "";
        int i = 0;  
        try {
            fr =new FileReader(file);
            while((i = fr.read()) != -1)
                str += (char)i;
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        returnString=str;
        return returnString;    
    }
    try{
        BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
        StringBuilder sb = new StringBuilder();
        String line = null;
        while ((line = reader.readLine()) != null) {
            sb.append(line + "\n");
        }
        is.close();
        result=sb.toString();
    }catch(Exception e){
        Log.e("log_tag", "Error converting result " + e.toString());
    }
    try{
        JSONArray jArray = new JSONArray(result);   
        for(int i=0;i<jArray.length();i++)
        {
            JSONObject json_data = jArray.getJSONObject(i);
            returnString = ""+ json_data;
        }
        }catch(JSONException e)
    {  
        returnString=e.toString();
    }
    try {
            fw = new FileWriter(file);
        fw.write(returnString);
        fw.close();
    } catch (FileNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return returnString; }      
 }

The app on the simulator works fine but, when i launch the app i get on the logcat in the error section:

04-10 15:03:56.493: E/Zygote(33): setreuid() failed. errno: 2
04-10 15:04:09.523: E/Zygote(33): setreuid() failed. errno: 17
04-10 15:04:12.363: E/BatteryService(72): usbOnlinePath not found
04-10 15:04:12.363: E/BatteryService(72): batteryVoltagePath not found
04-10 15:04:12.363: E/BatteryService(72): batteryTemperaturePath not found
04-10 15:04:12.393: E/SurfaceFlinger(72): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
04-10 15:04:12.723: E/SensorService(72): couldn't open device for module sensors (Invalid argument)
04-10 15:04:20.463: E/EventHub(72): could not get driver version for /dev/input/mouse0, Not a typewriter
04-10 15:04:20.463: E/EventHub(72): could not get driver version for /dev/input/mice, Not a typewriter
04-10 15:04:20.493: E/System(72): Failure starting core service
04-10 15:04:20.493: E/System(72): java.lang.SecurityException
04-10 15:04:20.493: E/System(72):   at android.os.BinderProxy.transact(Native Method)
04-10 15:04:20.493: E/System(72):   at  android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
04-10 15:04:20.493: E/System(72):   at android.os.ServiceManager.addService(ServiceManager.java:72)
04-10 15:04:20.493: E/System(72):   at com.android.server.ServerThread.run(SystemServer.java:206)
04-10 15:04:21.153: E/SoundPool(72): error loading /system/media/audio/ui/Effect_Tick.ogg
04-10 15:04:21.153: E/SoundPool(72): error loading /system/media/audio/ui/KeypressStandard.ogg
04-10 15:04:21.163: E/SoundPool(72): error loading /system/media/audio/ui/KeypressSpacebar.ogg
04-10 15:04:21.163: E/SoundPool(72): error loading /system/media/audio/ui/KeypressDelete.ogg
04-10 15:04:21.163: E/SoundPool(72): error loading /system/media/audio/ui/KeypressReturn.ogg
04-10 15:04:21.245: E/UsbObserver(72): java.lang.NullPointerException
04-10 15:04:21.245: E/UsbObserver(72):  at com.android.server.UsbObserver.init(UsbObserver.java:131)
04-10 15:04:21.245: E/UsbObserver(72):  at com.android.server.UsbObserver.<init>(UsbObserver.java:65)
04-10 15:04:21.245: E/UsbObserver(72):  at com.android.server.ServerThread.run(SystemServer.java:402)
04-10 15:04:22.623: E/ThrottleService(72): Could not open GPS configuration file /etc/gps.conf
04-10 15:04:26.083: E/logwrapper(173): executing /system/bin/tc failed: No such file or directory
04-10 15:04:26.123: E/logwrapper(174): executing /system/bin/tc failed: No such file or directory
04-10 15:04:26.239: E/logwrapper(175): executing /system/bin/tc failed: No such file or directory
04-10 15:17:37.467: E/InputDispatcher(72): channel '407739a0 com.android.agenda/com.android.agenda.AgendaActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
04-10 15:17:37.467: E/InputDispatcher(72): channel '407739a0 com.android.agenda/com.android.agenda.AgendaActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:54:08+00:00Added an answer on June 1, 2026 at 9:54 pm

    I finally found where the problem came from. I didn’t change the setting of my xampp to allow connection from oustide i was working on local only.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that gets information from a database and it creates ImageButtons
I have a data Store that gets it's information from a JSON api on
We have a web application that gets its data from a certain database. The
I have a Visual Studio 2005/ C# ClickOnce application that gets all its data from a
I have an application that I'm writing, which gets some HTML from a website.
Assume I have a application that stores data,gets data and processes data and stores
I have applications(WinForm) that gets some objects from webservice. After receiving array I transform
I have an application that uses the bluetooth to receive some data (bytes) from
I currently have an application that gets hit with over 20,000 users daily and
I have an application that works some what similar to how iPhone's Contact application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.