android - The application may be doing too much work on its main thread (Phonegap) -


when try run application on emulator, returns white screen (it's splash screen think) on eclipse returns notification application may doing work on main thread. mainactivity.java:

package com.example.mythesis; import org.apache.cordova.droidgap; import android.os.bundle;  public class mainactivity extends droidgap {      public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         super.loadurl("file:///android_asset/www/index.html");         //setcontentview(r.layout.activity_main);     }  } 

and androidmanifest.xml:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.mythesis"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="14"         android:targetsdkversion="14" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <activity             android:name="org.apache.cordova.droidgap"             android:label="@string/app_name"              android:configchanges="orientation|keyboardhidden" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>          </activity>     </application>      <supports-screens     android:largescreens="true"     android:normalscreens="true"     android:smallscreens="true"     android:resizeable="true"     android:anydensity="true"     />      <uses-permission android:name="android.permission.camera" />     <uses-permission android:name="android.permission.vibrate" />     <uses-permission android:name="android.permission.access_coarse_location" />     <uses-permission android:name="android.permission.access_fine_location" />     <uses-permission android:name="android.permission.access_location_extra_commands" />     <uses-permission android:name="android.permission.read_phone_state" />     <uses-permission android:name="android.permission.internet" />     <uses-permission android:name="android.permission.receive_sms" />     <uses-permission android:name="android.permission.record_audio" />     <uses-permission android:name="android.permission.modify_audio_settings" />     <uses-permission android:name="android.permission.read_contacts" />     <uses-permission android:name="android.permission.write_contacts" />     <uses-permission android:name="android.permission.write_external_storage" />     <uses-permission android:name="android.permission.access_network_state" />      <uses-permission android:name="android.permission.get_accounts" />     <uses-permission android:name="android.permission.broadcast_sticky" />  </manifest> 

i started doing android development , following tutorials internet. can me one? thanks.

i think use asynctask.
asynctask simillar thread.
think asynctask more useful.
link you. http://developer.android.com/reference/android/os/asynctask.html


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -