1. Nimm jetzt an unserem Uhans - 3. ADVENT - Gewinnspiel teil - Alle Informationen findest Du hier!

Meine erste "große" App ist fast fertig - und funktioniert nicht richtig :-(

Dieses Thema im Forum "Android App Entwicklung" wurde erstellt von Linux4ever, 19.03.2012.

  1. Linux4ever, 19.03.2012 #1
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    Hallo,

    ich habe meine erste große App fast fertig gestellt, jedoch funktioniert sie nicht richtig.

    Mit dieser App kann man das Spiel SuperTuxKart steuern und dabei das Android-Phone als Lenkrad benutzen. Ich habe dazu ein Server programmiert, der die Befehle des Clienten auf dem Anroiden empfängt und auswertet.

    Jedoch stürzt die App häufig ab und das Signal wird nicht richtig empfangen oder gesendet.

    Kann mir jemand dazu helfen??? Ich habe schon viel Mühe hinein gesteckt und die App einfach "auf den Müll werfen" will ich nicht.

    Der Code ist (hoffentlich) verständlich kommentiert, sodass man es verstehen müsste, was ich da zusammengeschrieben habe.

    Gerne könnt ihr mir eine Rückmeldung über meinen Programmierstil geben, bzw. was ihr euch an der App noch wünscht.


    Die Anwendungen zum Herunterladen:

    Eine kleine App zum Testen des Lenksensors findet ihr
    als gesamten workspace mit Quellcode: Nicht mehr verfügbar...
    oder als signierte .apk: Nicht mehr verfügbar...

    Den Server findet ihr
    als gesamten workspace mit Quellcode: Nicht mehr verfügbar...
    oder als .jar:Nicht mehr verfügbar...

    Den workspace des Clienten könnt ihr hier herunterladen: Nicht mehr verfügbar...

    Ich hoffe dies war jetzt nicht zuviel Quellcode:unsure:...

    Also meine Frage an euch ist: Kennt ihr eine Verbesserung, sodass die App etwas stabiler läuft...:sad:

    Mit Hoffnung auf Lösung ;)

    euer L4e


    EDIT:

    Hier die App und den Server: (siehe Bild)
     

    Anhänge:

    Zuletzt bearbeitet: 26.03.2012
  2. Maddi, 20.03.2012 #2
    Maddi

    Maddi Android-Hilfe.de Mitglied

    Beiträge:
    82
    Erhaltene Danke:
    10
    Registriert seit:
    18.07.2010
    Kannst du noch den Log der App nach einem Absturz hochladen?
     
    Linux4ever bedankt sich.
  3. Linux4ever, 20.03.2012 #3
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    LogCat: Unable to open /dev/log/main... :sad:

    Habe im Intenet gelesen, dass es an meiner ROM liegen kann, flashe mal die Originale wieder drauf... :sad:

    In das Servicemenü komme ich nämlich nicht rein... Über adb ebenso nicht :sad:

    Melde mich in ca. 15min nocheinmal...

    EDIT: Also es funktioniert auch mit der Stockrom nicht...

    Code:
    Unable to open log device '/dev/log/main': No such file or directory
    
    Endlich.. Weiß auch nicht, was ich gemacht habe, aber nach dem zurückflashen der Custom Rom hat auf einmal alles funktioniert.

    Log:

    Hier nur die Fehler(Error):
    Code:
    03-20 12:30:12.150: E/Sensors(671): GsSensor: line +82 ~~~handle===0~~en==0~~!n
    03-20 12:30:12.420: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:12.680: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:18.920: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:19.180: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:19.639: E/Sensors(671): select_akm_deamon read akm devid = st_303dlh
    03-20 12:30:19.639: E/Sensors(671): select_akm_deamon: use default 'compassd' deamon thread
    03-20 12:30:19.690: E/COMPASSD(1708): main: set offset to lib : -567  106  -36 
    03-20 12:30:19.690: E/COMPASSD(1708): st303: Compass OPEN 
    03-20 12:30:21.260: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:21.520: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:23.080: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:26.720: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:27.240: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:27.760: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:28.020: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:28.280: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:28.540: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:29.320: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:30.880: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:31.400: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:31.659: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:32.180: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:33.480: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:33.740: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:35.040: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:35.819: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:36.079: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:37.120: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:37.640: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:41.020: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:42.320: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:42.420: E/ActivityManager(671): ANR in de.fpprogs.stk.lenkrad (de.fpprogs.stk.lenkrad/.STKLenkradActivity)
    03-20 12:30:42.420: E/ActivityManager(671): Reason: keyDispatchingTimedOut
    03-20 12:30:42.420: E/ActivityManager(671): Load: 9.78 / 6.83 / 2.96
    03-20 12:30:42.420: E/ActivityManager(671): CPU usage from 11273ms to 0ms ago:
    03-20 12:30:42.420: E/ActivityManager(671):   5.4% 1658/de.fpprogs.stk.lenkrad: 4.3% user + 1% kernel / faults: 443 minor 2 major
    03-20 12:30:42.420: E/ActivityManager(671):   1.5% 725/dhd_dpc: 0% user + 1.5% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   1.1% 63/gs_wq: 0% user + 1.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   1.1% 671/system_server: 0.6% user + 0.5% kernel / faults: 5 minor 1 major
    03-20 12:30:42.420: E/ActivityManager(671):   0.4% 1708/compassd: 0.1% user + 0.2% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.3% 4/events/0: 0% user + 0.3% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.2% 67/kondemand/0: 0.2% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.2% 609/adbd: 0% user + 0.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 3/ksoftirqd/0: 0% user + 0.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 79/aps_wq: 0% user + 0.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 724/dhd_watchdog: 0.1% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 749/com.android.systemui: 0.1% user + 0% kernel / faults: 1 minor
    03-20 12:30:42.420: E/ActivityManager(671):   0% 5/khelper: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 59/synaptics_wq: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 597/rild: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 666/logcat: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 758/wpa_supplicant: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 772/com.android.phone: 0% user + 0% kernel / faults: 12 minor
    03-20 12:30:42.420: E/ActivityManager(671):   0% 798/com.google.process.gapps: 0% user + 0% kernel / faults: 110 minor
    03-20 12:30:42.420: E/ActivityManager(671):   0% 1643/logcat: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671): 9.9% TOTAL: 5.5% user + 3.9% kernel + 0.4% softirq
    03-20 12:30:42.420: E/ActivityManager(671): CPU usage from 815ms to 1372ms later:
    03-20 12:30:42.420: E/ActivityManager(671):   10% 671/system_server: 5.3% user + 5.3% kernel / faults: 3 minor
    03-20 12:30:42.420: E/ActivityManager(671):     10% 710/InputDispatcher: 5.3% user + 5.3% kernel
    03-20 12:30:42.420: E/ActivityManager(671):     1.7% 711/InputReader: 1.7% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.8% 79/aps_wq: 0% user + 0.8% kernel
    03-20 12:30:42.420: E/ActivityManager(671): 51% TOTAL: 5.3% user + 8.9% kernel + 37% iowait
    03-20 12:30:42.580: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:44.410: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:44.670: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:45.710: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:46.240: E/Sensors(671): GsSensor: line +82 ~~~handle===0~~en==1~~!n
    03-20 12:30:46.240: E/Sensors(671): GsSensor::setDelay: line +112 ~~~handle===0~~ns==1224054832~~!n
    03-20 12:30:46.240: E/Sensors(671): GsSensor::setDelay: line +112 ~~~handle===0~~ns==-1475225119~~!n
    03-20 12:30:46.490: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:47.010: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:47.790: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:10.930: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:13.269: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:14.830: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:15.869: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:17.950: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:21.070: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:32.260: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:31:33.560: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:32:01.640: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:32:01.900: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:32:02.680: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:32:08.400: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    
    Hier alles:

    Code:
    03-20 12:30:11.800: I/ActivityManager(671): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=de.fpprogs.stk.lenkrad/.STKLenkradActivity } from pid 1645
    03-20 12:30:11.939: D/dalvikvm(1645): GC_EXTERNAL_ALLOC freed 89K, 45% free 3457K/6279K, external 3428K/3530K, paused 63ms
    03-20 12:30:11.970: I/ActivityManager(671): Start proc de.fpprogs.stk.lenkrad for activity de.fpprogs.stk.lenkrad/.STKLenkradActivity: pid=1658 uid=10094 gids={3003}
    03-20 12:30:11.980: I/ActivityManager(671): Starting: Intent { flg=0x10000000 cmp=com.alarmclock.xtreme.free/.AlarmClock bnds=[162,49][318,101] } from pid -1
    03-20 12:30:12.010: I/ActivityManager(671): Start proc com.alarmclock.xtreme.free for activity com.alarmclock.xtreme.free/.AlarmClock: pid=1661 uid=10036 gids={1015, 3002, 3003}
    03-20 12:30:12.150: E/Sensors(671): GsSensor: line +82 ~~~handle===0~~en==0~~!n
    03-20 12:30:12.240: I/ActivityThread(1661): Pub com.alarmclock.xtreme.free: com.anglelabs.alarmclock.contentproviders.AlarmProvider
    03-20 12:30:12.330: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM setting locale to de
    03-20 12:30:12.340: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM setting locale to de
    03-20 12:30:12.380: I/Database(1661): sqlite returned: error code = 0, msg = Recovered 8 frames from WAL file /data/data/com.alarmclock.xtreme.free/databases/alarms.db-wal
    03-20 12:30:12.420: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:12.480: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM ** setAlert id 1 atTime 1332307800000
    03-20 12:30:12.530: I/ActivityManager(671): Start proc com.cyanogenmod.cmparts for broadcast com.cyanogenmod.cmparts/.intents.LEDNotificationReceiver: pid=1674 uid=1000 gids={1015, 3002, 3001, 3003}
    03-20 12:30:12.540: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM telling next alarm time widgets to update
    03-20 12:30:12.570: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM setting locale to de
    03-20 12:30:12.680: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:12.690: D/dalvikvm(1661): GC_EXTERNAL_ALLOC freed 120K, 49% free 2759K/5379K, external 0K/0K, paused 68ms
    03-20 12:30:12.910: D/dalvikvm(1661): GC_EXTERNAL_ALLOC freed 37K, 49% free 2757K/5379K, external 55K/515K, paused 120ms
    03-20 12:30:12.920: I/ActivityThread(1674): Pub com.cyanogenmod.cmparts.provider.Settings: com.cyanogenmod.cmparts.provider.SettingsProvider
    03-20 12:30:13.050: D/AlarmClockXtreme(1661): 3/20/12 12:30 PM ********************************Reloading ad.
    03-20 12:30:13.130: D/dalvikvm(1674): GC_CONCURRENT freed 404K, 52% free 2743K/5639K, external 0K/0K, paused 8ms+5ms
    03-20 12:30:13.140: I/Database(1661): sqlite returned: error code = 0, msg = Recovered 14 frames from WAL file /data/data/com.alarmclock.xtreme.free/databases/webview.db-wal
    03-20 12:30:13.170: I/Database(1661): sqlite returned: error code = 0, msg = Recovered 6 frames from WAL file /data/data/com.alarmclock.xtreme.free/databases/webviewCache.db-wal
    03-20 12:30:13.180: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM creating a log file
    03-20 12:30:13.230: I/Ads(1661): To get test ads on this device, call adRequest.addTestDevice("6F6DBB31EF708DD6A58466210F2F9282");
    03-20 12:30:13.300: I/Ads(1661): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":0,"u_sd":1,"slotname":"a14cf52a51017b0","u_w":320,"msid":"com.alarmclock.xtreme.free","js":"afma-sdk-a-v4.3.1","mv":"8010004.com.android.vending","isu":"6F6DBB31EF708DD6A58466210F2F9282","cipa":0,"format":"320x50_mb","net":"wi","app_name":"50.android.com.alarmclock.xtreme.free","hl":"de","u_h":480,"u_audio":3});</script></head><body></body></html>
    03-20 12:30:13.510: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM setting locale to de
    03-20 12:30:13.630: I/ActivityManager(671): Displayed com.alarmclock.xtreme.free/.AlarmClock: +1s634ms (total +1s668ms)
    03-20 12:30:14.710: I/dun_service(605): The value returned from dun_getusbmodemstate_fromsys is 1 
    03-20 12:30:14.710: I/dun_service(605): Post event 1
    03-20 12:30:14.710: I/dun_service(605): received event: DUN_EVENT_USB_UNPLUG 
    03-20 12:30:14.710: I/dun_service(605): received event(DUN_EVENT_USB_UNPLUG) in state(DUN_STATE_USB_UNPLUG)
    03-20 12:30:14.710: I/dun_service(605): Ignoring the event DUN_EVENT_USB_UNPLUG in USB_UNPLUG_STATE
    03-20 12:30:14.710: I/dun_service(605): Moved to state(DUN_STATE_USB_UNPLUG)
    03-20 12:30:14.740: I/Battery(1010): Update
    03-20 12:30:14.860: D/dalvikvm(1661): GC_CONCURRENT freed 140K, 47% free 3012K/5639K, external 449K/843K, paused 6ms+7ms
    03-20 12:30:15.640: W/webcore(1661): Can't get the viewWidth after the first layout
    03-20 12:30:15.850: I/Ads(1661): Received ad url: <"url": "http://googleads.g.doubleclick.net:80/mads/gma?preqs=0&u_sd=1&slotname=a14cf52a51017b0&u_w=320&msid=com.alarmclock.xtreme.free&js=afma-sdk-a-v4.3.1&mv=8010004.com.android.vending&isu=6F6DBB31EF708DD6A58466210F2F9282&cipa=0&format=320x50_mb&net=wi&app_name=50.android.com.alarmclock.xtreme.free&hl=de&u_h=480&u_audio=3&u_so=p&output=html&region=mobile_app&u_tz=-60&ex=1&client_sdk=1&pto=0&caps=interactiveVideo_sdkAdmobApiForAds&jsv=8", "afmaNotifyDt": "null">
    03-20 12:30:16.020: W/Ads(1661): IOException connecting to ad url.
    03-20 12:30:16.020: W/Ads(1661): java.net.ConnectException: googleads.g.doubleclick.net/127.0.0.1:80 - Connection refused
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:437)
    03-20 12:30:16.020: W/Ads(1661):     at java.net.Socket.connect(Socket.java:983)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:75)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:48)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:322)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:285)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:267)
    03-20 12:30:16.020: W/Ads(1661):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:205)
    03-20 12:30:16.020: W/Ads(1661):     at com.google.ads.v.run(Unknown Source)
    03-20 12:30:16.020: W/Ads(1661):     at java.lang.Thread.run(Thread.java:1019)
    03-20 12:30:16.020: D/webviewglue(1661): nativeDestroy view: 0x232bd0
    03-20 12:30:16.030: I/Ads(1661): onFailedToReceiveAd(A network error occurred.)
    03-20 12:30:16.030: D/AlarmClockXtreme(1661): 3/20/12 12:30 PM AdMob failed to receive ad. Error code = A network error occurred.
    03-20 12:30:16.050: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM creating a log file
    03-20 12:30:18.920: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:19.180: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:19.300: I/dun_service(605): process rmnet event
    03-20 12:30:19.300: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:19.450: I/WindowManager(671): Setting rotation to 1, animFlags=1
    03-20 12:30:19.469: I/ActivityManager(671): Config changed: { scale=1.0 imsi=262/7 loc=de_DE touch=3 keys=1/1/2 nav=1/1 orien=2 layout=18 uiMode=17 seq=4 themeResource=null}
    03-20 12:30:19.559: I/PowerWidget(749): Clearing any old widget stuffs
    03-20 12:30:19.569: I/SyncButton(749): Unregistering sync state listener
    03-20 12:30:19.569: I/PowerWidget(749): Setting up widget
    03-20 12:30:19.569: I/PowerWidget(749): Button list: toggleWifi|toggleBluetooth|toggleGPS|toggleMobileData|toggleSync
    03-20 12:30:19.569: I/PowerWidget(749): Setting up button: toggleWifi
    03-20 12:30:19.580: I/PowerWidget(749): Setting up button: toggleBluetooth
    03-20 12:30:19.580: I/PowerWidget(749): Setting up button: toggleGPS
    03-20 12:30:19.580: I/PowerWidget(749): Setting up button: toggleMobileData
    03-20 12:30:19.600: I/PowerWidget(749): Setting up button: toggleSync
    03-20 12:30:19.600: I/SyncButton(749): Registering sync state listener
    03-20 12:30:19.639: E/Sensors(671): select_akm_deamon read akm devid = st_303dlh
    03-20 12:30:19.639: E/Sensors(671): select_akm_deamon: use default 'compassd' deamon thread
    03-20 12:30:19.690: E/COMPASSD(1708): main: set offset to lib : -567  106  -36 
    03-20 12:30:19.690: E/COMPASSD(1708): st303: Compass OPEN 
    03-20 12:30:19.720: V/AlarmClockXtreme(1661): 3/20/12 12:30 PM setting locale to de
    03-20 12:30:19.720: I/ActivityManager(671): Displayed de.fpprogs.stk.lenkrad/.STKLenkradActivity: +7s757ms (total +274ms)
    03-20 12:30:20.860: W/IInputConnectionWrapper(1661): showStatusIcon on inactive InputConnection
    03-20 12:30:21.150: D/dalvikvm(1658): GC_CONCURRENT freed 436K, 52% free 2719K/5639K, external 0K/0K, paused 10ms+6ms
    03-20 12:30:21.260: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:21.430: I/dun_service(605): process rmnet event
    03-20 12:30:21.430: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:21.520: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:21.570: I/dun_service(605): process rmnet event
    03-20 12:30:21.570: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:21.710: I/dun_service(605): process rmnet event
    03-20 12:30:21.710: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:21.749: I/dun_service(605): process rmnet event
    03-20 12:30:21.749: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:21.890: I/dun_service(605): process rmnet event
    03-20 12:30:21.890: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.010: I/dun_service(605): process rmnet event
    03-20 12:30:22.010: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.040: I/dun_service(605): process rmnet event
    03-20 12:30:22.040: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.169: I/dun_service(605): process rmnet event
    03-20 12:30:22.169: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.220: I/dun_service(605): process rmnet event
    03-20 12:30:22.220: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.300: I/dun_service(605): process rmnet event
    03-20 12:30:22.300: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.340: I/dun_service(605): process rmnet event
    03-20 12:30:22.340: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.380: I/dun_service(605): process rmnet event
    03-20 12:30:22.380: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.420: I/dun_service(605): process rmnet event
    03-20 12:30:22.420: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.450: I/dun_service(605): process rmnet event
    03-20 12:30:22.450: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:22.490: I/dun_service(605): process rmnet event
    03-20 12:30:22.490: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:23.030: D/dalvikvm(671): GC_EXPLICIT freed 479K, 42% free 6547K/11271K, external 2245K/2760K, paused 135ms
    03-20 12:30:23.080: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:24.120: I/dun_service(605): process rmnet event
    03-20 12:30:24.120: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:24.160: I/dun_service(605): process rmnet event
    03-20 12:30:24.160: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:24.200: I/dun_service(605): process rmnet event
    03-20 12:30:24.200: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:24.680: I/dun_service(605): The value returned from dun_getusbmodemstate_fromsys is 1 
    03-20 12:30:24.680: I/dun_service(605): Post event 1
    03-20 12:30:24.680: I/dun_service(605): received event: DUN_EVENT_USB_UNPLUG 
    03-20 12:30:24.680: I/dun_service(605): received event(DUN_EVENT_USB_UNPLUG) in state(DUN_STATE_USB_UNPLUG)
    03-20 12:30:24.680: I/dun_service(605): Ignoring the event DUN_EVENT_USB_UNPLUG in USB_UNPLUG_STATE
    03-20 12:30:24.680: I/dun_service(605): Moved to state(DUN_STATE_USB_UNPLUG)
    03-20 12:30:24.720: I/Battery(1010): Update
    03-20 12:30:25.520: D/dalvikvm(1658): GC_CONCURRENT freed 483K, 53% free 2739K/5767K, external 0K/0K, paused 9ms+6ms
    03-20 12:30:25.740: I/dun_service(605): process rmnet event
    03-20 12:30:25.740: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:26.440: D/dalvikvm(1658): GC_CONCURRENT freed 491K, 53% free 2731K/5767K, external 0K/0K, paused 7ms+4ms
    03-20 12:30:26.720: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:26.780: D/dalvikvm(1658): GC_CONCURRENT freed 475K, 53% free 2747K/5767K, external 0K/0K, paused 9ms+6ms
    03-20 12:30:27.090: D/dalvikvm(1658): GC_CONCURRENT freed 500K, 53% free 2730K/5767K, external 0K/0K, paused 9ms+4ms
    03-20 12:30:27.240: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:27.330: D/dalvikvm(1658): GC_CONCURRENT freed 500K, 53% free 2729K/5767K, external 0K/0K, paused 9ms+5ms
    03-20 12:30:27.570: D/dalvikvm(1658): GC_CONCURRENT freed 508K, 53% free 2720K/5767K, external 0K/0K, paused 4ms+6ms
    03-20 12:30:27.760: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:27.820: D/dalvikvm(1658): GC_CONCURRENT freed 492K, 53% free 2719K/5767K, external 0K/0K, paused 7ms+4ms
    03-20 12:30:28.020: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:28.280: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:28.540: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:28.680: D/dalvikvm(1658): GC_CONCURRENT freed 401K, 53% free 2717K/5767K, external 0K/0K, paused 9ms+4ms
    03-20 12:30:29.320: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:29.620: D/dalvikvm(1658): GC_CONCURRENT freed 400K, 53% free 2717K/5767K, external 0K/0K, paused 8ms+4ms
    03-20 12:30:30.430: D/dalvikvm(1658): GC_CONCURRENT freed 400K, 53% free 2717K/5767K, external 0K/0K, paused 9ms+4ms
    03-20 12:30:30.880: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:31.310: D/dalvikvm(1658): GC_CONCURRENT freed 407K, 54% free 2709K/5767K, external 0K/0K, paused 5ms+5ms
    03-20 12:30:31.400: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:31.659: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:32.130: D/dalvikvm(1658): GC_CONCURRENT freed 392K, 53% free 2717K/5767K, external 0K/0K, paused 7ms+5ms
    03-20 12:30:32.180: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:32.880: D/dalvikvm(1658): GC_EXTERNAL_ALLOC freed 391K, 54% free 2703K/5767K, external 0K/0K, paused 48ms
    03-20 12:30:33.480: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:33.620: D/dalvikvm(1658): GC_CONCURRENT freed 384K, 53% free 2720K/5767K, external 10K/522K, paused 4ms+4ms
    03-20 12:30:33.740: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:34.410: D/dalvikvm(1658): GC_CONCURRENT freed 400K, 53% free 2720K/5767K, external 10K/522K, paused 9ms+4ms
    03-20 12:30:35.040: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:35.040: I/dun_service(605): process rmnet event
    03-20 12:30:35.050: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:35.269: I/dun_service(605): process rmnet event
    03-20 12:30:35.269: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:35.819: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:36.010: I/dun_service(605): process rmnet event
    03-20 12:30:36.010: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:36.079: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:37.120: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:37.640: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:38.050: I/dun_service(605): process rmnet event
    03-20 12:30:38.050: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:38.100: I/dun_service(605): process rmnet event
    03-20 12:30:38.100: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:38.270: I/dun_service(605): process rmnet event
    03-20 12:30:38.270: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:39.070: I/dun_service(605): process rmnet event
    03-20 12:30:39.070: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:40.110: I/dun_service(605): process rmnet event
    03-20 12:30:40.110: I/dun_service(605):  rstate == DUN_RMNETSTATE_ERROR in dun_monitor_kevents
    03-20 12:30:40.980: I/InputDispatcher(671): Application is not responding: Window{406e50b0 de.fpprogs.stk.lenkrad/de.fpprogs.stk.lenkrad.STKLenkradActivity paused=false}.  5006.0ms since event, 5005.5ms since wait started
    03-20 12:30:40.980: I/WindowManager(671): Input event dispatching timed out sending to de.fpprogs.stk.lenkrad/de.fpprogs.stk.lenkrad.STKLenkradActivity
    03-20 12:30:41.020: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:41.050: I/Process(671): Sending signal. PID: 1658 SIG: 3
    03-20 12:30:41.050: I/dalvikvm(1658): threadid=4: reacting to signal 3
    03-20 12:30:41.050: I/dalvikvm(1658): Wrote stack traces to '/data/anr/traces.txt'
    03-20 12:30:41.050: I/Process(671): Sending signal. PID: 671 SIG: 3
    03-20 12:30:41.050: I/dalvikvm(671): threadid=4: reacting to signal 3
    03-20 12:30:41.080: I/dalvikvm(671): Wrote stack traces to '/data/anr/traces.txt'
    03-20 12:30:41.080: I/Process(671): Sending signal. PID: 772 SIG: 3
    03-20 12:30:41.080: I/dalvikvm(772): threadid=4: reacting to signal 3
    03-20 12:30:41.090: I/dalvikvm(772): Wrote stack traces to '/data/anr/traces.txt'
    03-20 12:30:41.090: I/Process(671): Sending signal. PID: 749 SIG: 3
    03-20 12:30:41.090: I/dalvikvm(749): threadid=4: reacting to signal 3
    03-20 12:30:41.100: I/dalvikvm(749): Wrote stack traces to '/data/anr/traces.txt'
    03-20 12:30:41.780: D/dalvikvm(671): GC_EXPLICIT freed 953K, 39% free 6983K/11271K, external 2242K/2760K, paused 155ms
    03-20 12:30:42.320: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:42.420: I/InputDispatcher(671): Dropping event because the pointer is not down.
    03-20 12:30:42.420: I/InputDispatcher(671): Dropping event because the pointer is not down.
    03-20 12:30:42.420: I/InputDispatcher(671): Dropping event because the pointer is not down.
    03-20 12:30:42.420: I/InputDispatcher(671): Dropping event because the pointer is not down.
    03-20 12:30:42.420: E/ActivityManager(671): ANR in de.fpprogs.stk.lenkrad (de.fpprogs.stk.lenkrad/.STKLenkradActivity)
    03-20 12:30:42.420: E/ActivityManager(671): Reason: keyDispatchingTimedOut
    03-20 12:30:42.420: E/ActivityManager(671): Load: 9.78 / 6.83 / 2.96
    03-20 12:30:42.420: E/ActivityManager(671): CPU usage from 11273ms to 0ms ago:
    03-20 12:30:42.420: E/ActivityManager(671):   5.4% 1658/de.fpprogs.stk.lenkrad: 4.3% user + 1% kernel / faults: 443 minor 2 major
    03-20 12:30:42.420: E/ActivityManager(671):   1.5% 725/dhd_dpc: 0% user + 1.5% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   1.1% 63/gs_wq: 0% user + 1.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   1.1% 671/system_server: 0.6% user + 0.5% kernel / faults: 5 minor 1 major
    03-20 12:30:42.420: E/ActivityManager(671):   0.4% 1708/compassd: 0.1% user + 0.2% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.3% 4/events/0: 0% user + 0.3% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.2% 67/kondemand/0: 0.2% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.2% 609/adbd: 0% user + 0.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 3/ksoftirqd/0: 0% user + 0.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 79/aps_wq: 0% user + 0.1% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 724/dhd_watchdog: 0.1% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.1% 749/com.android.systemui: 0.1% user + 0% kernel / faults: 1 minor
    03-20 12:30:42.420: E/ActivityManager(671):   0% 5/khelper: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 59/synaptics_wq: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 597/rild: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 666/logcat: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 758/wpa_supplicant: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0% 772/com.android.phone: 0% user + 0% kernel / faults: 12 minor
    03-20 12:30:42.420: E/ActivityManager(671):   0% 798/com.google.process.gapps: 0% user + 0% kernel / faults: 110 minor
    03-20 12:30:42.420: E/ActivityManager(671):   0% 1643/logcat: 0% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671): 9.9% TOTAL: 5.5% user + 3.9% kernel + 0.4% softirq
    03-20 12:30:42.420: E/ActivityManager(671): CPU usage from 815ms to 1372ms later:
    03-20 12:30:42.420: E/ActivityManager(671):   10% 671/system_server: 5.3% user + 5.3% kernel / faults: 3 minor
    03-20 12:30:42.420: E/ActivityManager(671):     10% 710/InputDispatcher: 5.3% user + 5.3% kernel
    03-20 12:30:42.420: E/ActivityManager(671):     1.7% 711/InputReader: 1.7% user + 0% kernel
    03-20 12:30:42.420: E/ActivityManager(671):   0.8% 79/aps_wq: 0% user + 0.8% kernel
    03-20 12:30:42.420: E/ActivityManager(671): 51% TOTAL: 5.3% user + 8.9% kernel + 37% iowait
    03-20 12:30:42.580: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:44.410: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:44.670: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:45.220: D/dalvikvm(1658): GC_CONCURRENT freed 400K, 53% free 2731K/5767K, external 10K/522K, paused 5ms+10ms
    03-20 12:30:45.710: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:45.950: D/dalvikvm(1658): GC_CONCURRENT freed 424K, 53% free 2732K/5767K, external 10K/522K, paused 4ms+5ms
    03-20 12:30:46.200: W/ActivityManager(671):   Force finishing activity de.fpprogs.stk.lenkrad/.STKLenkradActivity
    03-20 12:30:46.200: I/ActivityManager(671): Killing de.fpprogs.stk.lenkrad (pid=1658): user's request
    03-20 12:30:46.210: I/Process(671): Sending signal. PID: 1658 SIG: 9
    03-20 12:30:46.220: I/WindowManager(671): WIN DEATH: Window{406e50b0 de.fpprogs.stk.lenkrad/de.fpprogs.stk.lenkrad.STKLenkradActivity paused=true}
    03-20 12:30:46.230: I/ActivityManager(671): Process de.fpprogs.stk.lenkrad (pid 1658) has died.
    03-20 12:30:46.240: E/Sensors(671): GsSensor: line +82 ~~~handle===0~~en==1~~!n
    03-20 12:30:46.240: E/Sensors(671): GsSensor::setDelay: line +112 ~~~handle===0~~ns==1224054832~~!n
    03-20 12:30:46.240: E/Sensors(671): GsSensor::setDelay: line +112 ~~~handle===0~~ns==-1475225119~~!n
    03-20 12:30:46.490: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:46.620: D/dalvikvm(1645): GC_EXPLICIT freed 348K, 43% free 3823K/6663K, external 2810K/3497K, paused 67ms
    03-20 12:30:46.630: D/Launcher(1645): -- loadPreferences()
    03-20 12:30:46.770: W/InputManagerService(671): Got RemoteException sending setActive(false) notification to pid 1658 uid 10094
    03-20 12:30:47.010: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:47.450: D/Launcher(1645): about to setAppWidget for id=22, info=AppWidgetProviderInfo(provider=ComponentInfo{com.cyanogenmod.cmparts/com.cyanogenmod.cmparts.provider.RenderFXWidgetProvider})
    03-20 12:30:47.500: D/Launcher(1645): about to setAppWidget for id=20, info=AppWidgetProviderInfo(provider=ComponentInfo{com.bacastudio.BeautifulBattery/com.bacastudio.BeautifulBattery.BatteryWidget})
    03-20 12:30:47.520: D/Launcher(1645): about to setAppWidget for id=14, info=AppWidgetProviderInfo(provider=ComponentInfo{com.android.deskclock/com.android.alarmclock.AnalogAppWidgetProvider})
    03-20 12:30:47.570: D/Launcher(1645): about to setAppWidget for id=11, info=AppWidgetProviderInfo(provider=ComponentInfo{com.cyanogenmod.cmparts/com.cyanogenmod.cmparts.provider.RenderFXWidgetProvider})
    03-20 12:30:47.630: D/Launcher(1645): about to setAppWidget for id=6, info=AppWidgetProviderInfo(provider=ComponentInfo{com.android.providers.calendar/com.android.providers.calendar.CalendarAppWidgetProvider})
    03-20 12:30:47.690: D/Launcher(1645): about to setAppWidget for id=5, info=AppWidgetProviderInfo(provider=ComponentInfo{com.alarmclock.xtreme.free/com.anglelabs.alarmclock.widgetsproviders.NextAlarmTimeWidgetProvider})
    03-20 12:30:47.790: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 12:30:47.790: D/Launcher(1645): about to setAppWidget for id=19, info=AppWidgetProviderInfo(provider=ComponentInfo{com.android.settings/com.android.settings.widget.SettingsAppWidgetProvider})
    
    
     
    Zuletzt von einem Moderator bearbeitet: 20.03.2012
  4. Fr4gg0r, 20.03.2012 #4
    Fr4gg0r

    Fr4gg0r App-Anbieter (Werbung)

    Beiträge:
    2,506
    Erhaltene Danke:
    447
    Registriert seit:
    21.12.2009
    warum öffnest du den socket drölftausendmal anstatt ihn offen zu lassen?
     
    Linux4ever bedankt sich.
  5. Linux4ever, 20.03.2012 #5
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    Mit einmal öffnen hat es komischerweise nicht geklappt. Hast du einen Tipp für mich wie man dies ändern kann?
     
  6. Unicate, 20.03.2012 #6
    Unicate

    Unicate Android-Experte

    Beiträge:
    473
    Erhaltene Danke:
    57
    Registriert seit:
    09.08.2010
    Hi!

    Ich find die Idee große Klasse. Muss dich jetzt aber mal fragen wie viele Pakete du pro Sekunde sendest. Soweit ich das sehe verwendest du SENSOR_DELAY_FASTEST.
    Macht dein Router das mit? Ich würde zumindest festlegen wie viele er pro sekunde schicken darf. 30-60 ist eine Richtung die ok sein sollte.
     
    Linux4ever bedankt sich.
  7. Linux4ever, 20.03.2012 #7
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    Hmmm.... Das weiß ich gar nicht... Ich hatte diesen Wert noch aus meiner o.g. Sensortestapp drin. Reicht es, denn Sensor auf Game zu stellen oder wie kann ich den Sendewert besser begrenzen?
     
  8. Unicate, 20.03.2012 #8
    Unicate

    Unicate Android-Experte

    Beiträge:
    473
    Erhaltene Danke:
    57
    Registriert seit:
    09.08.2010
    Naja ich würde einfach das senden selbst so in etwa machen:

    PHP:
    while(true) {
    Thread.sleep(16);// ca. 60x/sek.
    sendPacket(_mSensorData);
    }
    Also die Sensordaten lokal so oft aktualisieren, wie es nötig ist (Kann schon sein, das du da SENSOR_DELAY_FASTEST nehmen musst), und den wert halt nur alle 16 ms schicken.
    So kannst du mit Sicherheit sagen das du ca. 60 Pakete/Sekunde schickst. Ansonsten könnte es bei schnellen Sensoren passieren, das dein Router geflutet wird und die eingaben sehr spät ankommen oder du in einer "Spiral of death" endest. (Es werden Pakete schneller geschickt als du sie verarbeiten kannst)
     
    Zuletzt bearbeitet: 20.03.2012
    Linux4ever bedankt sich.
  9. Linux4ever, 20.03.2012 #9
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    Also ich habe das jetzt so eingefügt:

    PHP:

    Code entfernt
    Ich sende nämlich nicht den Sensorwert sondern überprüfe wie der Sensorwert und sende dann die zugehörige Taste, d.h. die App wertet vor Ort aus, welche Taste gedrückt werden muss und sendet diese Taste an den Server, aber tut dies relativ häufig. Deshalb habe ich jetzt das .sleep eingefügt. Ist es dort an der richtigen Stelle?

    Ich glaube, das ist oft passiert, da er noch geschrieben hat, obwohl die App schon beendet war. Hmm. mal mit den Verbesserungen ausprobieren

    EDIT: Irgendwie ist das immer noch zuviel... Gas und der Rest funktioniert, jedoch die Lenkung hängt immer mehr im Laufe des Spiels, bis es abstürzt..

    ERRORLOG:

    Code:
    03-20 16:37:02.850: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:10.910: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:11.430: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:12.470: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:13.610: E/Sensors(671): GsSensor: line +82 ~~~handle===0~~en==0~~!n
    03-20 16:37:13.790: E/Sensors(671): select_akm_deamon read akm devid = st_303dlh
    03-20 16:37:13.790: E/Sensors(671): select_akm_deamon: use default 'compassd' deamon thread
    03-20 16:37:13.790: E/COMPASSD(1708): st303: Compass OPEN 
    03-20 16:37:36.920: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:39.520: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:56.210: E/ActivityManager(671): ANR in de.fpprogs.stk.lenkrad (de.fpprogs.stk.lenkrad/.STKLenkradActivity)
    03-20 16:37:56.210: E/ActivityManager(671): Reason: keyDispatchingTimedOut
    03-20 16:37:56.210: E/ActivityManager(671): Load: 10.51 / 11.1 / 10.96
    03-20 16:37:56.210: E/ActivityManager(671): CPU usage from 7914ms to -1ms ago:
    03-20 16:37:56.210: E/ActivityManager(671):   2% 16693/de.fpprogs.stk.lenkrad: 1.1% user + 0.8% kernel / faults: 157 minor 1 major
    03-20 16:37:56.210: E/ActivityManager(671):   1.3% 5318/dhd_dpc: 0% user + 1.3% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   1.1% 63/gs_wq: 0% user + 1.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   1.1% 671/system_server: 0.5% user + 0.6% kernel / faults: 3 minor
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 4842/com.bacastudio.BeautifulBattery: 0.1% user + 0% kernel / faults: 76 minor
    03-20 16:37:56.210: E/ActivityManager(671):   0.5% 1708/compassd: 0.3% user + 0.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.2% 4/events/0: 0% user + 0.2% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.2% 67/kondemand/0: 0% user + 0.2% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.2% 79/aps_wq: 0% user + 0.2% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.2% 609/adbd: 0.1% user + 0.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.2% 5775/logcat: 0.2% user + 0% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 3/ksoftirqd/0: 0% user + 0.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 5/khelper: 0% user + 0.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0% 59/synaptics_wq: 0% user + 0% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 597/rild: 0.1% user + 0% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 605/port-bridge: 0% user + 0.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 749/com.android.systemui: 0.1% user + 0% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.1% 772/com.android.phone: 0% user + 0.1% kernel
    03-20 16:37:56.210: E/ActivityManager(671): 9.1% TOTAL: 3.7% user + 4.8% kernel + 0.5% softirq
    03-20 16:37:56.210: E/ActivityManager(671): CPU usage from 663ms to 1225ms later:
    03-20 16:37:56.210: E/ActivityManager(671):   10% 671/system_server: 0% user + 10% kernel / faults: 1 minor 1 major
    03-20 16:37:56.210: E/ActivityManager(671):     8.7% 710/InputDispatcher: 0% user + 8.7% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   0.9% 749/com.android.systemui: 0.9% user + 0% kernel
    03-20 16:37:56.210: E/ActivityManager(671):     0.9% 749/ndroid.systemui: 0.9% user + 0% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   1.2% 5317/dhd_watchdog: 0% user + 1.2% kernel
    03-20 16:37:56.210: E/ActivityManager(671):   1.2% 5318/dhd_dpc: 0% user + 1.2% kernel
    03-20 16:37:56.210: E/ActivityManager(671): 14% TOTAL: 3.5% user + 10% kernel
    03-20 16:37:57.990: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:37:58.130: E/InputDispatcher(671): channel '40772d10 de.fpprogs.stk.lenkrad/de.fpprogs.stk.lenkrad.STKLenkradActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
    03-20 16:37:58.130: E/InputDispatcher(671): channel '40772d10 de.fpprogs.stk.lenkrad/de.fpprogs.stk.lenkrad.STKLenkradActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    03-20 16:37:58.140: E/Sensors(671): GsSensor: line +82 ~~~handle===0~~en==1~~!n
    03-20 16:37:58.150: E/Sensors(671): GsSensor::setDelay: line +112 ~~~handle===0~~ns==1224054832~~!n
    03-20 16:37:58.150: E/Sensors(671): GsSensor::setDelay: line +112 ~~~handle===0~~ns==-1475225119~~!n
    03-20 16:37:58.770: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    03-20 16:38:00.070: E/Sensors(671): ProximitySensor: unknown event (type=0, code=0)
    
    Also wie Unicate warsceinlich richtig bemerkte, dass ich meinen Router warscheinlich überlaste. Kennt jemand vlt. eine Möglichkeit nur z.B. 30 mal in der Sekunde den Wert zu senden?

    Mein aktueller Code ist:

    PHP:
    Code entfernt
    Danke im Vorraus!!!:thumbup:
     
    Zuletzt von einem Moderator bearbeitet: 29.04.2012
  10. Unicate, 21.03.2012 #10
    Unicate

    Unicate Android-Experte

    Beiträge:
    473
    Erhaltene Danke:
    57
    Registriert seit:
    09.08.2010
    Erhöhe halt die Wartezeit bis zum senden eines neuen Pakets.

    Hier mal eine Übersicht was deine Activity alles beinhalten sollte:

    • Member für die Sensordaten erstellen
    • Sensorlistener an/aus schalten (onResume/onPause)
    • im listener (onSensorChanged()) den Member aktualisieren
    • im onResume einen Thread starten, der deine Daten alle X ms-sekunden verschickt
    PHP:
    class YourActivity extends Activity {
        
        private static final 
    long TIME_BETWEEN_SEND_PACKAGE 20;
        
        private 
    Thread _packetSender null;
        
        private 
    DeineSensorDaten _data;
        @
    Override
        
    protected void onResume() {
            
    super.onResume();
            
    // TODO: sensor updates starten        
            // hier musst du jetzt deine sensoren starten
            
            
            
    if(null == _packetSender) {
                
    _packetSender = new Thread(new Runnable() {
                    public 
    void run() {
                        
    boolean end false;
                        while(!
    end) {
                            try {
                                
    Thread.sleep(TIME_BETWEEN_SEND_PACKAGE);
                                
    sendData(_data);
                            } catch (
    InterruptedException e) {
                                
    end true;
                            }

                        }

                    }

                });
            }
            
    _packetSender.start();
        }
        
        @
    Override
        
    protected void onPause() {
            
    super.onPause();
            
    _packetSender.interrupt();
            
    _packetSender null;
            
    // TODO remove sensorlistener
            // hier musst du die sensoren stoppen ;)
        
    }
    }
    Und wenn 20 ms zu schnell sind, dann schick das eben nicht so oft.

    Code:
    TIME_BETWEEN_SEND_PACKAGE = 1000(ms)/30(pakete/sec)
    
    Falls das nicht reicht, oder dir das zu langsam ist, was dann möglich ist, solltest du UDP verwenden (Stichwort: Java DatagramSocket)

    Tip: Miss doch mal die Round trip time (Zeit eines Paketes vom Client=>Server=>Client) und nimm dann etwa das doppelte der Zeit als Wartezeit. Wenn die RTT zu hoch ist => UDP
     
    Zuletzt bearbeitet: 21.03.2012
    Linux4ever bedankt sich.
  11. Linux4ever, 21.03.2012 #11
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    Danke für deine Antwort!!!:w00t00: :thumbsup:

    Habe nicht glech verstanden, wie ich das mit dem Sensor mache, habe hier: accelerometer - Android: I want to shake it! - Stack Overflow
    aber Antwort gefunden -->(für evtl. Nachleser, die ein ähnliches Problem haben:winki:)

    Bin gerade am ausprobieren....

    Gebe dir dann Rückmeldung, ob es funktioniert hat.

    EDIT: Kannst du mir vlt. sagen, wie das mit dem Member funktioniert? Ich habe noch nicht so viel Ahnung mit Androidprogrammierung und verzweifle gerade an diesem Member, da ich nicht weiß, wie ich ihn machen soll.

    Viele Grüße, L4e
     
    Zuletzt bearbeitet: 21.03.2012
  12. Unicate, 21.03.2012 #12
    Unicate

    Unicate Android-Experte

    Beiträge:
    473
    Erhaltene Danke:
    57
    Registriert seit:
    09.08.2010
    Mit Member meine ich lediglich die Membervariable "_data" in meinem Codeschnipsel.
     
    Linux4ever bedankt sich.
  13. Linux4ever, 21.03.2012 #13
    Linux4ever

    Linux4ever Threadstarter Erfahrener Benutzer

    Beiträge:
    161
    Erhaltene Danke:
    27
    Registriert seit:
    16.01.2012
    Ach so...:blushing:

    Und den Rest was noch im onChanged stand in eine neue Methode sendData oder? OK, dann hab ich alles verstanden!:biggrin:

    EDIT: PERFEKT!!!:thumbup::thumbsup::thumbup: Endlich funktioniert es halbwegs. Ab und zu noch ein Absturz und etwas schwierig zu fahren, da STK nur beim lenken 1 oder 0 kennt (links lenken oder nicht lenken, rechts lenken...) und man eine dynamische Lenkung durch das Kippen gewöhnt ist. Aber es ist ja erst einmal nur eine BETA. Ich mache jetzt mal ein paar Einstellungen dazu und veröffentliche dann hier mal die .apk. Soll ich euch für die freundliche Unterstützung erwähnen?
     
    Zuletzt bearbeitet: 21.03.2012

Diese Seite empfehlen