Facebook dialog fails and stops the activity - android

I'm using the Facebook SDK on Android to post an update to the user's feed. I was able to get it to work when I did not have the Facebook client installed. Now, even after removing the Facebook app, when I try to authorize or open the feed dialog the activity is abrupty killed.
I don't get any message telling me that the app has crashed or anything. It's just destroyed. The only message is Mono telling me that the thread 0x0 has been prematurely finalized, which is odd. Also, there's this odd "Not supported in this case." message from webcore.
I'm using the NativeActivity class. I don't use it directly but I extend it in my activity. Here's the logcat from around where things go wrong:
I/PixelWorldEngine( 6796): Authorizing for Facebook...
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webview.db, flag = 6, cannot stat file, error message: No such file or directory
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webview.db, mode: delete, disk free size: 35 M, handle: 0x801450
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webviewCache.db, flag = 6, cannot stat file, error message: No such file or directory
D/Database( 6796): dbopen(): path = /data/data/com.ri.BubblingUpLite/databases/webviewCache.db, mode: delete, disk free size: 35 M, handle: 0x7ff128
D/skia ( 6796): htcFlashPlugin::htcFlashPlugin
W/webcore ( 6796): Not supported in this case.
I/PixelWorld-glue( 6796): WindowFocusChanged: 0x333288 -- 0
D/SensorService( 120): disable: connection.get() = 0x9f5c20
D/SensorService( 120): disable: get sensor name = BMA150 3-axis Accelerometer
D/SensorService( 120): SensorDevice::activate: handle = 0x0, enabled = 0x0
D/Sensors ( 120): Enable akm: en = 0
D/SensorService( 120): noteStopSensor: uid = 0x274d, handle = 0x0
D/SensorService( 120): pid=6796, uid=10061
D/SensorService( 120): Active sensors:
D/SensorService( 120): CM3602 Light sensor (handle=0x00000004, connections=1)
W/webcore ( 6796): Not supported in this case.
W/mono ( 6796): Thread 0x0 may have been prematurely finalized
D/SensorGUI( 120): ~SensorChannel: mSendFd = 255, mReceiveFd = -1
D/AudioPolicyService( 72): stopOutput() tid 2223
D/AudioPolicyService( 72): releaseOutput() tid 2223
D/AudioPolicyService( 72): releaseOutput() tid 2223
I/ActivityManager( 120): Process com.ri.BubblingUpLite (pid 6796) has died.
I/WindowManager( 120): WIN DEATH: Window{407e9548 com.ri.BubblingUpLite/com.ri.PixelWorldEngine.GameActivity paused=false}

I think it's an Android bug which seems to manifest on HTC devices.
See http://code.google.com/p/android/issues/detail?id=33612

Related

Foursquare API: Android key hash does not match the allowed key hashes specified in the app's settings

I'm trying to create Android application based on Fousquare API. I need to connect to foursquare account. I generated keys as told in instructions: github - foursquare-android-oauth But result is "Connecting failed". Client id and client secret are in app's settings. What's wrong?
Logcat:
I/ActivityManager( 1355): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10100000 cmp=com.foursquare.android.sample/.MainActivity } from pid 1507
D/WindowManagerImpl( 1355): addView, new view, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#40d5af98
W/dalvikvm( 1507): disableGcForExternalAlloc: true
W/dalvikvm( 1507): disableGcForExternalAlloc: false
D/SensorService( 1355): enable: get sensor name = BMA150 3-axis Accelerometer
D/Sensors ( 1355): Enable akm: en = 1
D/SensorService( 1355): SensorDevice::activate--: handle = 0x0, enabled = 0x1
D/SensorService( 1355): enable: sensor->activate return value = 0x0
D/SensorService( 1355): enable: calling mActiveSensors.add(handle, rec) = (0x0, 0x991fc8)
D/SensorService( 1355): enable: mActiveConnections.indexOf(connection) = 0x0
D/SensorService( 1355): pid=1355, uid=1000
D/AK8975 ( 1260): Compass Start
V/WindowManager( 1355): Starting animation in AppWindowToken{408c6f78 token=HistoryRecord{409ded10 com.htc.launcher/.Launcher}} # 27969582
V/WindowManager( 1355): Finished animation in AppWindowToken{408c6f78 token=HistoryRecord{409ded10 com.htc.launcher/.Launcher}} # 27969582
V/WindowManager( 1355): Starting animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27969582
V/WindowManager( 1355): Finished animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27969582
D/AK8975 ( 1260): Ignore M_Sensor: (y, p, r) = ( 139, 0, 3), Status = 0
D/ATRecorder(19226): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader#4053d0e0
D/WindowManagerImpl(19226): addView, new view, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView#40538ca8
D/WindowManagerImpl( 1355): finishRemoveViewLocked, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#40d5af98
I/ActivityManager( 1355): Displayed com.foursquare.android.sample/.MainActivity: +210ms
V/ActivityManager( 1355): Checking to restart com.foursquare.android.sample.MainActivity: changed=0x0, handles=0x0
V/ActivityManager( 1355): oldConfig={ scale=1.0 imsi=250/1 loc=ru_RU touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=61 skin=default fontsize=3}
V/ActivityManager( 1355): newConfig={ scale=1.0 imsi=250/1 loc=ru_RU touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=61 skin=default fontsize=3}
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/green/brightness string=0,len=1
V/NotificationService( 1355): Charging...
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/green/blink string=0,len=1
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/green/off_timer string=0 0,len=3
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/amber/brightness string=1,len=1
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/amber/blink string=0,len=1
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/amber/off_timer string=0 0,len=3
V/NotificationService( 1355): Turn off Charm Ind LED
W/InputManagerService( 1355): [unbindCurrentClientLocked] Disable input method client.
W/InputManagerService( 1355): [startInputLocked] Enable input method client.
D/BatteryService( 1355): SendIntentforPowersaver
D/BatteryService( 1355): Current powersaver status == NORMAL_STATUS
D/WifiService( 1355): [smart wifi] mSmartWiFiStatus: 0 mBatteryLevel: 88 mWifiConnected: true
D/WifiService( 1355): [smart wifi] ACTION_BATTERY_CHANGED pluggedType: 2
D/StatusBarPolicy( 1507): plugged = true, health = 2, level = 88, mPluggedBatteryLevel = 87, mLowBatteryWarningLevel2 = 25, mshowLowChargingWarning2 = true
E/MyHTC ( 1643): [ImmediateModeProxyMgr] Failed to connect; wait some amount of time before trying again.
W/System.err( 1643): java.net.SocketTimeoutException: Connection timed out
W/System.err( 1643): at org.apache.harmony.luni.platform.OSNetworkSystem.connect(Native Method)
W/System.err( 1643): at dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:357)
W/System.err( 1643): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)
W/System.err( 1643): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:440)
W/System.err( 1643): at java.net.Socket.connect(Socket.java:1013)
W/System.err( 1643): at com.htc.handsetlib.proxy.ImmediateModeProxy.connect(ImmediateModeProxy.java:195)
W/System.err( 1643): at com.htc.cs.service.ImmediateModeProxyMgr._connectToImcOrStatusServer(ImmediateModeProxyMgr.java:134)
W/System.err( 1643): at com.htc.cs.service.ImmediateModeProxyMgr.onIntent(ImmediateModeProxyMgr.java:198)
W/System.err( 1643): at com.htc.cs.service.ImmediateModeService$PushHandler.handleMessage(ImmediateModeService.java:708)
W/System.err( 1643): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 1643): at android.os.Looper.loop(Looper.java:150)
W/System.err( 1643): at android.os.HandlerThread.run(HandlerThread.java:60)
D/MyHTC ( 1643): [ImmediateModeProxyMgr] _connectToImcOrStatusServer(): Fail IMC reconnect time = 172000
D/View (19226): onTouchEvent: viewFlags: 0x18004001
D/View (19226): onTouchEvent: isFocusable: true, isFocusableInTouchMode: false, isFocused: false; focusTaken: false
I/ActivityManager( 1355): Starting activity: Intent { act=android.intent.action.VIEW dat=foursquareauth://authorize?client_id=AP5RF0GZVCLPHHQ5HLHD5KQSYG03XIQUTKV1LXFCEQHPYMKS&v=20130509&androidKeyHash=60%3AA4%3AD9%3A06%3A0E%3AD2%3A27%3A56%3A00%3A57%3AF6%3A5D%3AE0%3AB7%3A65%3A39%3AC2%3AA9%3A64%3A34 cmp=com.joelapenna.foursquared/.OauthWebViewActivity } from pid 19226
E/ResourceType( 1355): Style contains key with bad entry: 0x01010397
E/ResourceType( 1355): Style contains key with bad entry: 0x0101039c
D/WindowManagerImpl( 1355): addView, new view, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#40dce998
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/ActivityManager( 1355): Start proc com.joelapenna.foursquared for activity com.joelapenna.foursquared/.OauthWebViewActivity: pid=19512 uid=10077 gids={3003, 1015}
V/WindowManager( 1355): Starting animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27971452
V/WindowManager( 1355): Starting animation in AppWindowToken{40d58910 token=HistoryRecord{40b2cf48 com.joelapenna.foursquared/.OauthWebViewActivity}} # 27971452
V/WindowManager( 1355): Finished animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27971464
V/WindowManager( 1355): Finished animation in AppWindowToken{40d58910 token=HistoryRecord{40b2cf48 com.joelapenna.foursquared/.OauthWebViewActivity}} # 27971464
D/dalvikvm(19512): GC_CONCURRENT freed 139K, 44% free 3202K/5639K, external 0K/0K, paused 3ms+2ms
D/dalvikvm(19512): GC_CONCURRENT freed 96K, 41% free 3529K/5959K, external 0K/0K, paused 2ms+2ms
I/dalvikvm(19512): Could not find method android.os.StrictMode$ThreadPolicy$Builder.detectCustomSlowCalls, referenced from method com.joelapenna.foursquared.Foursquared.d
W/dalvikvm(19512): VFY: unable to resolve virtual method 1630: Landroid/os/StrictMode$ThreadPolicy$Builder;.detectCustomSlowCalls ()Landroid/os/StrictMode$ThreadPolicy$Builder;
D/dalvikvm(19512): VFY: replacing opcode 0x6e at 0x0011
D/dalvikvm(19512): VFY: dead code 0x0014-003f in Lcom/joelapenna/foursquared/Foursquared;.d ()V
I/ActivityThread(19512): Pub com.joelapenna.foursquared: com.joelapenna.foursquared.providers.GlobalSearchProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.db.ConversationsContentProvider: com.joelapenna.foursquared.db.ConversationsContentProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.VenueQuerySuggestionsProvider: com.joelapenna.foursquared.providers.VenueQuerySuggestionsProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.AppSearchSuggestionProvider: com.joelapenna.foursquared.providers.AppSearchSuggestionProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.foursquarebridgeprovider: com.joelapenna.foursquared.providers.FoursquareBridgeProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.FriendsSearchSuggestionProvider: com.joelapenna.foursquared.providers.FriendsSearchSuggestionProvider
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/dalvikvm(19512): Could not find method android.os.StrictMode$VmPolicy$Builder.detectLeakedClosableObjects, referenced from method com.foursquare.core.h.z.a
W/dalvikvm(19512): VFY: unable to resolve virtual method 1638: Landroid/os/StrictMode$VmPolicy$Builder;.detectLeakedClosableObjects ()Landroid/os/StrictMode$VmPolicy$Builder;
D/dalvikvm(19512): VFY: replacing opcode 0x6e at 0x0025
D/dalvikvm(19512): VFY: dead code 0x0028-0038 in Lcom/foursquare/core/h/z;.a ()V
follow this link:
https://developer.foursquare.com/overview/auth
it's much more informative and explains the process great.
by the way it would be greate if you could paste the exact error and give some more information about what you did....theres not enough info to help you.
Maybe you didn't set the INTERNET PERMISSION in the Android manifest:
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>

Android porting init issue

I have successfully ported android for sabre-sdp board,and it is booting till init process after that it is showing (init:untrackedpid xxxx).I have all the log from booting process to end and also ihave collected logcat logs also . please go through ,if you find any solution help me out.
Thanks in advance for your support
Logcat LOGS
------------------------------------------------------------------
root#android:/ # logcat
--------- beginning of /dev/log/main
D/ ( 2351): init_sensors
D/ ( 2351): find sensor name mma845x
D/ ( 2351): input device 'mma845x' opened, fd = 8
E/installd( 2348): Could not create directories; exiting.
I/DEBUG ( 2342): debuggerd: May 13 2013 18:03:14
D/ ( 2351): find sensor name mag3110
D/ ( 2351): input device 'mag3110' opened, fd = 10
D/MagDaemon( 2351): magnetic sensor calibrate daemon start
D/MagCalibrated( 2351): fl_calib = 1
D/MagDaemon( 2351): magnetic calibrate daemon set threshold 100.000000
E/keystore( 2349): chdir: /data/misc/keystore: No such file or directory
--------- beginning of /dev/log/system
I/Vold ( 2340): Vold 2.1 (the revenge) firing up
D/Vold ( 2340): Volume udisk state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 2340): Volume extsd state changing -1 (Initializing) -> 0 (No-Media)
I/Netd ( 2341): Netd 1.0 starting
D/Vold ( 2340): Volume extsd state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 2340): Volume extsd state changing 2 (Pending) -> 1 (Idle-Unmounted)
E/DirectVolume( 2340): Invalid 'PARTN' value
E/DirectVolume( 2340): Invalid 'PARTN' value
D/MDnsDS ( 2341): MDnsSdListener::Hander starting up
D/MDnsDS ( 2341): MDnsSdListener starting to monitor
D/MDnsDS ( 2341): Going to poll with pollCount 1
I/mediaserver( 2346): ServiceManager: 0x41992ce0
I/AudioFlinger( 2346): Using default 3000 mSec as standby time.
I/CameraService( 2346): CameraService started (pid=2346)
I/FslCameraHAL( 2346): Face Back Camera is ov5640_mipi, orient is 0
I/FslCameraHAL( 2346): Face Front Camera is uvc,ov5642_camera,ov5640_camera, orient is 0
D/AndroidRuntime( 2344):
D/AndroidRuntime( 2344): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 2344): CheckJNI is ON
I/AndroidRuntime( 2344): JNI options: '-Xjniopts:warnonly'
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/core.jar (/data/dalvik-cache/system#framework#core.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/core.jar'
I/SurfaceFlinger( 2343): SurfaceFlinger is starting
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/core-junit.jar (/data/dalvik-cache/system#framework#core-junit.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/core-junit.jar'
I/SurfaceFlinger( 2343): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/bouncycastle.jar (/data/dalvik-cache/system#framework#bouncycastle.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/bouncycastle.jar'
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/ext.jar (/data/dalvik-cache/system#framework#ext.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/ext.jar'
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/framework.jar (/data/dalvik-cache/system#framework#framework.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/framework.jar'
D/dalvikvm( 2344): Unable to stat classpath element '/system/framework/telephony-common.jar'
D/dalvikvm( 2344): Unable to stat classpath element '/system/framework/mms-common.jar'
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/android.policy.jar (/data/dalvik-cache/system#framework#android.policy.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/android.policy.jar'
W/imx6.gralloc( 2343): 32bpp setting of Framebuffer catched!
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/services.jar (/data/dalvik-cache/system#framework#services.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/services.jar'
E/dalvikvm( 2344): Could not stat dex cache directory '/data/dalvik-cache': No such file or directory
I/dalvikvm( 2344): Unable to open or create cache for /system/framework/apache-xml.jar (/data/dalvik-cache/system#framework#apache-xml.jar#classes.dex)
D/dalvikvm( 2344): Unable to process classpath element '/system/framework/apache-xml.jar'
E/dalvikvm( 2344): No valid entries found in bootclasspath '/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar'
E/dalvikvm( 2344): VM aborting
F/libc ( 2344): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 2344 (zygote)
Had the same issue. This happens when the data partition didnt get flash properly. Watch out for indications like:
dd: writing to ‘/dev/mmcblk0’: No space left on device
or
[65561.466071] EXT4-fs (mmcblk0p4): bad geometry: block count 1653768 exceeds size of device (1639176 blocks)
[65602.323558] EXT4-fs (mmcblk0p4): bad geometry: block count 1653768 exceeds size of device (1639176 blocks)
Getting a larger SDCard would be a better idea.

Can't play mp4 video in my Android app

I very want to play mp4 video in my android app. I even wrote a bit of code for it:
String sourceUrl = "http://tvstream.cn.ru/storage/1kanal/20120530/"
+ "1kanal-20120530-01-14-00-20120530-03-16-00.mp4";
final VideoView videoView = (VideoView) findViewById(R.id.videoView);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
final MediaController mediaController = new MediaController(this);
mediaController.setMediaPlayer(videoView);
videoView.setMediaController(mediaController);
videoView.setVideoURI(Uri.parse(sourceUrl));
videoView.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
videoView.requestFocus();
videoView.start();
mediaController.show();
}
});
But nothing works :( When I launch my app in emulator (Android 2.3.3) I've got weird stacktrace with some common error codes:
After few hours off googling and experiments I decided to try to launch my app on real device and watch logcat:
D/test.tv.activity.PlayerActivity( 3428): Player source: http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 320x430
I/Launcher( 260): onWindowFocusChanged(false)
D/Launcher( 260): setWallpaperDimension() called
D/Launcher( 260): USE_NON_SCROLLABLE_IMAGE_WALLPAPER is true
I/ActivityManager( 163): Start proc org.reactivephone for broadcast org.reactivephone/ru.yandex.common.clid.ClidBroadcastReceiver: pid=3448 uid=10073 gids={1015, 3003}
I/ActivityManager( 163): No longer want com.sec.android.provider.badge (pid 2310): hidden #16
I/MediaPlayer( 3428): uri is:http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
I/MediaPlayer( 3428): path is null
D/MediaPlayer( 3428): Couldn't open file on client side, trying server side
D/Launcher( 260): It's image wallpaper. suggestDesiredDimensions(-1,-1)
I/ActivityManager( 163): Displayed test.tv/.activity.PlayerActivity: +943ms
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 320x430
W/dalvikvm( 3406): threadid=5: spin on suspend #1 threadid=22 (pcf=0)
W/dalvikvm( 3406): threadid=5: spin on suspend resolved in 1154 msec
W/SearchableInfo( 163): Invalid searchable metadata for org.reactivephone/.ui.RegionForm: Search label must be a resource reference.
I/ActivityManager( 163): Start proc com.google.android.googlequicksearchbox for broadcast com.google.android.googlequicksearchbox/.SourceUpdateReceiver: pid=3457 uid=10027 gids={3003}
I/WindowOrientationListener( 163): orientation 295.6932 gives new rotation = 2
I/OrientationDebug( 163): [pwm] in MyOrientationListener.onOrientationChanged() rotation=3 mFancyRotationAnimation=0 now call mWindowManager.setRotation()
I/OrientationDebug( 163): [wms] in setRotation() rotation=3 alwaysSendConfiguration=false animFlags=0
I/OrientationDebug( 163): [wms] in setRotation() now call setRotationUnchecked()
I/WindowManager( 163): Setting rotation to 3, animFlags=0
I/ActivityManager( 163): Config changed: { scale=1.0 imsi=250/1 loc=ru_RU touch=3 keys=1/1/2 nav=1/1 orien=2 layout=18 uiMode=17 seq=7}
D/PhoneApp( 241): updateProximitySensorMode: lock already released.
I/ActivityThread( 3457): Pub com.google.android.googlequicksearchbox.shortcuts: com.google.android.googlequicksearchbox.WebHistoryProvider
I/ActivityThread( 3457): Pub com.google.android.googlequicksearchbox.google: com.google.android.googlequicksearchbox.google.GoogleSuggestionProvider
I/ActivityManager( 163): No longer want com.sec.android.widgetapp.clockweather.clockwidget (pid 1214): hidden #16
D/Finsky ( 3406): [1] 2.run: Loaded library for account: [Y091GklnFtI4Ab1gmLOw-nJkJXQ]
D/Finsky ( 3406): [1] 2.run: Finished loading 1 libraries.
W/dalvikvm( 3406): VFY: unable to resolve instance field 78
D/DfeApi ( 3406): [1] DfeApiContext.getSmallestScreenWidthDp: smallestScreenWidthDp does not exist, using pre-ics hack.
E/QCvdec ( 95): Setparameter: unknown param 2130706451
W/TimedEventQueue( 95): Event 3 was not found in the queue, already cancelled?
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
W/QCvdec ( 95): ======================================================================
W/QCvdec ( 95): Open Max Statistics
W/QCvdec ( 95): ======================================================================
W/QCvdec ( 95): empty this buffer rate = NaN
W/QCvdec ( 95): empty this buffer total time = 0
W/QCvdec ( 95): empty this buffer count = 0
W/QCvdec ( 95): ======================================================================
D/test.tv.activity.PlayerActivity( 3428): Player source: http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 480x270
I/MediaPlayer( 3428): uri is:http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
I/MediaPlayer( 3428): path is null
D/MediaPlayer( 3428): Couldn't open file on client side, trying server side
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 480x270
D/WifiService( 163): [mPersistState] : On
D/BatteryService( 163): update start
D/BatteryService( 163): update start
D/BatteryService( 163): update start
E/QCvdec ( 95): Setparameter: unknown param 2130706451
I/VideoView( 3428): start()
D/WifiService( 163): [mPersistState] : On
D/WifiService( 163): [mPersistState] : On
D/WifiWatchdogService( 163): (android.server.ServerThread) wntk (1c:af:f7:2e:7f:c8) does not require the watchdog
E/QCvdec ( 95): Unsupported profile, level, or widht, height
E/QCvdec ( 95): Unsupported clip
E/QCvdec ( 95): Unsupported profile, level, or widht, height
E/QCvdec ( 95): Unsupported clip
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
E/QCvdec ( 95): Empty this buffer in Invalid State
E/OMXCodec( 95): [OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)
E/OMXCodec( 95): [OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)
E/OMXCodec( 95): read : mState[9] is wrong...
E/MediaPlayer( 3428): error (1, -2147483648)
E/OMXCodec( 95): [OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 335x270
I/VideoView( 3428): start()
E/MediaPlayer( 3428): start called in state 0
E/MediaPlayer( 3428): error (-38, 0)
E/MediaPlayer( 3428): Error (1,-2147483648)
D/VideoView( 3428): Error: 1,-2147483648
E/MediaPlayer( 3428): Error (-38,0)
D/VideoView( 3428): Error: -38,0
D/PowerManagerService( 163): reactivateScreenLocksLocked mProxIgnoredBecauseScreenTurnedOff=false
I/PowerManagerService( 163): Ulight 1->3|0
W/InputManagerService( 163): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#40873ab8
I/PowerManagerService( 163): Light Animator Finished curIntValue=141
D/Finsky ( 3406): [1] 5.onFinished: Installation state replication succeeded.
D/BatteryService( 163): update start
D/BatteryService( 163): update start
D/BatteryService( 163): update start
I try to find something about "OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)", but didn't find nothing interesting. About "Couldn't open file on client side, trying server side" problem stackoverflow has many answers, but no one helped.
When I launch this app on ICS (in emulator) I've got similar errors:
06-01 10:22:14.674: I/NuCachedSource2(37): ERROR_END_OF_STREAM
06-01 10:22:15.375: I/OMXCodec(37): [OMX.google.h264.decoder] AVC profile = 100 (High), level = 30
06-01 10:22:15.384: I/OMXCodec(37): [OMX.google.h264.decoder] video dimensions are 320 x 240
06-01 10:22:15.384: I/OMXCodec(37): [OMX.google.h264.decoder] Crop rect is 320 x 240 # (0, 0)
06-01 10:22:16.253: W/NetworkManagementSocketTagger(89): setKernelCountSet(10013, 0) failed with errno -2
06-01 10:22:16.374: I/Launcher(553): setLoadOnResume
06-01 10:22:16.584: D/MediaPlayer(602): getMetadata
06-01 10:22:16.614: I/NuCachedSource2(37): new range: offset= 0
06-01 10:22:16.694: I/ChromiumHTTPDataSource(37): connect to http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4 #0
06-01 10:22:16.834: E/SoftAVC(37): Decoder failed: -2
06-01 10:22:16.844: E/OMXCodec(37): [OMX.google.h264.decoder] ERROR(0x80001001, -1007)
06-01 10:22:16.884: D/AudioSink(37): bufferCount (4) is too small and increased to 12
As I know, Android supports playback of video decoded with h264 (http://developer.android.com/guide/appendix/media-formats.html). So, can anyone tell me what I do wrong.
Probably your file is using an unsupported profile, notice that official media formats page only lists Baseline Profile as supported for H.264 AVC.
Try transcoding the video specifying Baseline Profile as suggested in this stackoverflow question, i.e. if your container is MP4 run:
ffmpeg -i yourfile.mp4 -c:v libx264 -profile:v baseline -level 1 yourfile_BaselineProfile.mp4
If this works it's not a issue in your code, you just have to use supported formats.
Try this
File clip=new File(Environment.getExternalStorageDirectory(),
"test.mp4");
if (clip.exists()) {
video=(VideoView)findViewById(R.id.video);
video.setVideoPath(clip.getAbsolutePath());
ctlr=new MediaController(this);
ctlr.setMediaPlayer(video);
video.setMediaController(ctlr);
video.requestFocus();
video.start();
VideoView classes does not allow playing MP4 file format videos. Please go through this link for Android Media Formats. Try checking your video with Daroon Player

Android tablet booting issue (Sanei n80)

I bought Sanei N80 android tablet two months back(android 2.3).I tried to root using z4root app.It stuck in the middle so i switched off and switched on the tablet.Now the tablet is not booting up stays in the splash screen (refer attached screenshot1.png).
I also tried to reboot it using recovery mode, again its stuck and displaying warning icon with android image (refer attached screenshot2.png). I am pasting the logs for reference.
Kindly please please please help.I don't know how to proceed.
Log, while normal booting.
D/AndroidRuntime( 1309): >>>>>> AndroidRuntime START
com.android.internal.os.ZygoteInit <<<<<< D/AndroidRuntime( 1309):
CheckJNI is OFF D/dalvikvm( 1309): creating instr width table
D/dalvikvm( 1309): DexOpt: incorrect opt magic number (0xff ff ff ff)
D/dalvikvm( 1309): ODEX file is stale or bad; removing and retrying
(/data/dalvik-cache/system#framework#framework.jar#classes.dex)
D/dalvikvm( 1309): Zip inflate: partial write (will retry): (4056 of
32768) E/dalvikvm( 1309): Zip inflate: write failed: No space left on
device E/dalvikvm( 1309): Unable to extract+optimize DEX from
'/system/framework/framework.jar' D/dalvikvm( 1309): Unable to process
classpath element '/system/framework/framework.jar' E/JNIHelp ( 1309):
Native registration unable to find class 'android/debug/JNITest'
E/AndroidRuntime( 1309): Unable to register all android natives
I/ServiceManager( 79): service 'media.camera' died I/ServiceManager(
79): service 'media.audio_flinger' died I/ServiceManager( 79): service
'media.player' died I/ServiceManager( 79): service
'media.audio_policy' died I/Netd ( 1311): Netd 1.0 starting I/ (
1310): ServiceManager: 0xacb0 E/AudioHardware( 1310): Can't load
libsecril-client.so D/AudioHardwareInterface( 1310): setMode(NORMAL)
I/CameraService( 1310): CameraService started (pid=1310)
I/AudioFlinger( 1310): AudioFlinger's thread 0xc7b8 ready to run
D/AudioHardware( 1310): AudioStreamOutALSA::setParameters() routing=2
D/AudioHardware( 1310): ### setVoiceVolume_l
Thanks in advance

Android download large files

I'm trying to download a large .zip file from a web server but I have a weird behaviour, the description is:
I'm executing the code in the device emulator, API level 3 (version 1.5) with an SD card of 512MB. I start the device with "Wipe data user"
The length of the size from conexion.getContentLength() is 7012725
The server address is localhost (10.0.2.2), but I've tried with an external server and the behaviour is the same. I've double checked that I can download the file through a web browser.
I have these permisions in the manifest file:
-
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
The error:
It starts downloading the file, I can see the text 10, 20, 30, 40, 50 and then it stops at 60.
After a while, the emulator reboots itself.
Workarounds:
This issue in stackoverflow is working in the device, not in my case.
About this wifi lock issue what I've done is add this permission "android.permission.WAKE_LOCK" and then this piece of code, but with exactly the same behaviour:
WifiManager.WifiLock wifilock;
WifiManager manager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wifilock = manager.createWifiLock("wifilock");
wifilock.acquire();
...
wifilock.release();
Here is the code, that it's being executing in a separate thread:
private void downloadData(){
try{
Log.v(TAG, "downloading data");
URL url = new URL("http://10.0.2.2/1.zip");
URLConnection connection = url.openConnection();
connection.connect();
int lenghtOfFile = connection.getContentLength();
Log.v(TAG, "lenghtOfFile = "+lenghtOfFile);
InputStream is = url.openStream();
File testDirectory = new File(Environment.getExternalStorageDirectory()+"/testDirectory/");
if(!testDirectory.exists()){
testDirectory.mkdir();
}
FileOutputStream fos = new FileOutputStream(testDirectory+"/files.zip");
byte data[] = new byte[1024];
int count = 0;
long total = 0;
int progress = 0;
while ((count=is.read(data)) != -1)
{
total += count;
int progress_temp = (int)total*100/lenghtOfFile;
if(progress_temp%10 == 0 && progress != progress_temp){
progress = progress_temp;
Log.v(TAG, "total = "+progress);
}
fos.write(data, 0, count);
}
is.close();
fos.close();
Log.v(TAG, "downloading finished");
}catch(Exception e){
Log.v(TAG, "exception in downloadData");
e.printStackTrace();
}
}
Any clue?
Thank you very much.
Update with more log description:
Hi Chris, I've tried to discover what
was going on at first with this log in
the Eclipse environment. Here are a
little bit more detail about what is
happening (time - action), note that
I've changed the file to download for
another one in orther to do more
tests, but the results are quite the
same:
00:00 It starts downloading:
V/iPhoto ( 853): downloading data
V/iPhoto ( 853): lenghtOfFile = 7732809
V/iPhoto ( 853): total = 10
V/iPhoto ( 853): total = 20
V/iPhoto ( 853): total = 30
V/iPhoto ( 853): total = 40
V/iPhoto ( 853): total = 50 (round 00:05)
-> Here it stops and the DDMS disconnects the device immediately
03:40 It finish the download (not always) and the device reboots on its own:
I/Process ( 595): Sending signal. PID: 595 SIG: 3
I/dalvikvm( 595): threadid=7: reacting to signal 3
D/dalvikvm( 722): GC freed 2193 objects / 135808 bytes in 176 sec
V/iPhoto ( 853): total = 60
I/dalvikvm( 595): Wrote stack trace to '/data/anr/traces.txt'
I/ActivityManager( 595): Process com.google.android.apps.maps:FriendService (pid 778) has died.
I/ActivityManager( 595): Process com.android.mms (pid 732) has died.
V/iPhoto ( 853): total = 70
V/iPhoto ( 853): total = 80
V/iPhoto ( 853): total = 90
V/iPhoto ( 853): total = 100
V/iPhoto ( 853): downloading finished
V/iPhoto ( 853): thread finish loading
I/Process ( 595): Sending signal. PID: 595 SIG: 9
I/ActivityThread( 757): Removing dead content provider: settings
I/ActivityThread( 748): Removing dead content provider: settings
I/ActivityThread( 722): Removing dead content provider: settings
I/ActivityThread( 700): Removing dead content provider: settings
I/ServiceManager( 549): service 'package' died
... services dying...
I/ServiceManager( 549): service 'wifi' died
E/installd( 557): eof
E/installd( 557): failed to read size
I/installd( 557): closing connection
D/qemud ( 560): fdhandler_event: disconnect on fd 11
D/qemud ( 560): fdhandler_event: disconnect on fd 12
E/vold ( 550): Framework disconnected
I/Zygote ( 554): Exit zygote because system server (595) has terminated
I/ServiceManager( 549): service 'simphonebook' died
I/ServiceManager( 549): service 'isms' died
I/ServiceManager( 549): service 'iphonesubinfo' died
I/ServiceManager( 549): service 'phone' died
D/AndroidRuntime( 949):
D/AndroidRuntime( 949): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
... and starting ...
Could anyone try my code and to download a zip file with size round 8MB? Does it works for you?
I've just tried this code in a real device and it works perfectly. There must be something weird in the emulator.
The "emulator rebooting itself" does not sound good. I would recommend you start up logcat on the dev machine and log to a file... ie, on a linux dev machine something like
adb logcat | tee logfile
Then look at the logfile and see what you can learn about why it rebooted.

Categories

Resources