I changed rom to smartisan and im trying to fix the whatsapp crash.
here is a logcat. any help will be super nice
Code:
I/ActivityManager( 589): Start proc com.whatsapp for activity com.whatsapp/.Main: pid=15856 uid=10063 gids={50063, 1015, 3003, 1006, 1028}
D/WindowManager( 589): 1st smartisan anim frame is drawn, mIsEnterSmartisanTransition = true
D/WindowManager( 589): onFirstSmartisanTransitionFrameIsDrawn: readyToFlip
D/WindowManager( 589): resumeFinishDrawingWindow: mPendingShowWins = []
D/WindowManager( 589): finishDrawingWindow(2): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null, mIsFirstFrameDrawn = true, mIsAppWindowDrawn = false
D/WindowManager( 589): finishDrawingWindow(1): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null
D/WindowManager( 589): onAppWinShown: win = Window{4286e590 u0 Starting com.whatsapp}, mIsInSmartisanTransition = true, mIsEnterSmartisanTransition = true
D/WindowManager( 589): TRY_HIDE_TRANSIT_ANIM: mIsInSmartisanTransition = true, mIsSmartisanAnimationEnded = false, mIsEnterSmartisanTransition = true, mIsAppWindowDrawn = true
D/WindowManager( 589): finishDrawingWindow(2): win = Window{427740f0 u0 SurfaceView}, win.mAttachedWindow = Window{426d7d70 u0 com.smartisanos.launcher/com.smartisanos.launcher.Launcher}, mIsFirstFrameDrawn = true, mIsAppWindowDrawn = true
D/WindowManager( 589): finishDrawingWindow(1): win = Window{427740f0 u0 SurfaceView}, win.mAttachedWindow = Window{426d7d70 u0 com.smartisanos.launcher/com.smartisanos.launcher.Launcher}
D/WindowManager( 589): finishDrawingWindow(2): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null, mIsFirstFrameDrawn = true, mIsAppWindowDrawn = true
D/WindowManager( 589): finishDrawingWindow(1): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null
E/AndroidRuntime(15856): FATAL EXCEPTION: main
E/AndroidRuntime(15856): java.lang.VerifyError: com/c
E/AndroidRuntime(15856): at com.whatsapp.App.onCreate(App.java:2489)
E/AndroidRuntime(15856): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java)
E/AndroidRuntime(15856): at android.app.ActivityThread.handleBindApplication(ActivityThread.java)
E/AndroidRuntime(15856): at android.app.ActivityThread.access$1300(ActivityThread.java)
E/AndroidRuntime(15856): at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
E/AndroidRuntime(15856): at android.os.Handler.dispatchMessage(Handler.java)
E/AndroidRuntime(15856): at android.os.Looper.loop(Looper.java)
E/AndroidRuntime(15856): at android.app.ActivityThread.main(ActivityThread.java)
E/AndroidRuntime(15856): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(15856): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(15856): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
E/AndroidRuntime(15856): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
E/AndroidRuntime(15856): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 589): Force finishing activity com.whatsapp/.Main
I/ActivityManager( 589): Process com.whatsapp (pid 15856) has died.
I/ActivityManager( 589): Start proc com.whatsapp for activity com.whatsapp/.Main: pid=15856 uid=10063 gids={50063, 1015, 3003, 1006, 1028}
D/WindowManager( 589): 1st smartisan anim frame is drawn, mIsEnterSmartisanTransition = true
D/WindowManager( 589): onFirstSmartisanTransitionFrameIsDrawn: readyToFlip
D/WindowManager( 589): resumeFinishDrawingWindow: mPendingShowWins = []
D/WindowManager( 589): finishDrawingWindow(2): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null, mIsFirstFrameDrawn = true, mIsAppWindowDrawn = false
D/WindowManager( 589): finishDrawingWindow(1): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null
D/WindowManager( 589): onAppWinShown: win = Window{4286e590 u0 Starting com.whatsapp}, mIsInSmartisanTransition = true, mIsEnterSmartisanTransition = true
D/WindowManager( 589): TRY_HIDE_TRANSIT_ANIM: mIsInSmartisanTransition = true, mIsSmartisanAnimationEnded = false, mIsEnterSmartisanTransition = true, mIsAppWindowDrawn = true
D/WindowManager( 589): finishDrawingWindow(2): win = Window{427740f0 u0 SurfaceView}, win.mAttachedWindow = Window{426d7d70 u0 com.smartisanos.launcher/com.smartisanos.launcher.Launcher}, mIsFirstFrameDrawn = true, mIsAppWindowDrawn = true
D/WindowManager( 589): finishDrawingWindow(1): win = Window{427740f0 u0 SurfaceView}, win.mAttachedWindow = Window{426d7d70 u0 com.smartisanos.launcher/com.smartisanos.launcher.Launcher}
D/WindowManager( 589): finishDrawingWindow(2): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null, mIsFirstFrameDrawn = true, mIsAppWindowDrawn = true
D/WindowManager( 589): finishDrawingWindow(1): win = Window{4286e590 u0 Starting com.whatsapp}, win.mAttachedWindow = null
E/AndroidRuntime(15856): FATAL EXCEPTION: main
E/AndroidRuntime(15856): java.lang.VerifyError: com/c
E/AndroidRuntime(15856): at com.whatsapp.App.onCreate(App.java:2489)
E/AndroidRuntime(15856): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java)
E/AndroidRuntime(15856): at android.app.ActivityThread.handleBindApplication(ActivityThread.java)
E/AndroidRuntime(15856): at android.app.ActivityThread.access$1300(ActivityThread.java)
E/AndroidRuntime(15856): at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
E/AndroidRuntime(15856): at android.os.Handler.dispatchMessage(Handler.java)
E/AndroidRuntime(15856): at android.os.Looper.loop(Looper.java)
E/AndroidRuntime(15856): at android.app.ActivityThread.main(ActivityThread.java)
E/AndroidRuntime(15856): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(15856): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(15856): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
E/AndroidRuntime(15856): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
E/AndroidRuntime(15856): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 589): Force finishing activity com.whatsapp/.Main
I/ActivityManager( 589): Process com.whatsapp (pid 15856) has died.
Related
Basically, I'd just managed to get this tablet to pick up my dmzmusic a2dp adapter, then I went to sleep and turned off Bluetooth.
I rebooted it in the morning because,hey, why not.
I open up quick settings and toggle Bluetooth on.. and it doesn't turn on. It doesn't even search for devices, nothing's connected to it as Bluetooth doesn't turn on.
I leaves it for a while and get the same result..
Then I take a logcat using play store app catlog and come crying for help like a baby. Is there anyone who can help me?
Code:
build.board: grouper
build.bootloader: 3.41
build.brand: Google
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: grouper
build.display: pa_grouper-userdebug 4.2.2 JDQ39 eng.aaronpoweruser.20130325.010739 test-keys
build.fingerprint: google/nakasi/grouper:4.2/JOP40C/527662:user/release-keys
build.hardware: grouper
build.host: build1
build.id: JDQ39
build.manufacturer: Asus
build.model: Nexus 7
build.product: nakasi
build.radio: unknown
build.serial: 015d32201437f207
build.tags: test-keys
build.time: 1364173682000
build.type: userdebug
build.user: aaronpoweruser
version.codename: REL
version.incremental: eng.aaronpoweruser.20130325.010739
version.release: 4.2.2
version.sdk_int: 17
04-05 14:54:29.304 D/dalvikvm(6145): Trying to load lib libjavacore.so 0x0
04-05 14:54:29.314 D/dalvikvm(6145): Added shared lib libjavacore.so 0x0
04-05 14:54:29.334 D/dalvikvm(6145): Trying to load lib libnativehelper.so 0x0
04-05 14:54:29.334 D/dalvikvm(6145): Added shared lib libnativehelper.so 0x0
04-05 14:54:29.474 D/AndroidRuntime(6151):
04-05 14:54:29.474 D/AndroidRuntime(6151): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
04-05 14:54:29.474 D/AndroidRuntime(6151): CheckJNI is OFF
04-05 14:54:29.484 D/dalvikvm(6151): Trying to load lib libjavacore.so 0x0
04-05 14:54:29.494 D/dalvikvm(6151): Added shared lib libjavacore.so 0x0
04-05 14:54:29.494 D/dalvikvm(6151): Trying to load lib libnativehelper.so 0x0
04-05 14:54:29.494 D/dalvikvm(6151): Added shared lib libnativehelper.so 0x0
04-05 14:54:29.524 D/AndroidRuntime(6145): Calling main entry com.android.commands.am.Am
04-05 14:54:29.524 D/dalvikvm(6145): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods
04-05 14:54:29.794 D/AndroidRuntime(6164):
04-05 14:54:29.794 D/AndroidRuntime(6164): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
04-05 14:54:29.794 D/AndroidRuntime(6164): CheckJNI is OFF
04-05 14:54:29.864 D/dalvikvm(6164): Trying to load lib libjavacore.so 0x0
04-05 14:54:29.864 D/AndroidRuntime(6179):
04-05 14:54:29.864 D/AndroidRuntime(6179): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
04-05 14:54:29.864 D/AndroidRuntime(6179): CheckJNI is OFF
04-05 14:54:29.864 D/dalvikvm(6164): Added shared lib libjavacore.so 0x0
04-05 14:54:29.894 D/dalvikvm(6179): Trying to load lib libjavacore.so 0x0
04-05 14:54:29.904 D/dalvikvm(6179): Added shared lib libjavacore.so 0x0
04-05 14:54:29.914 D/dalvikvm(6179): Trying to load lib libnativehelper.so 0x0
04-05 14:54:29.914 D/dalvikvm(6179): Added shared lib libnativehelper.so 0x0
04-05 14:54:29.984 V/PhoneStatusBar(606): setLightsOn(true)
04-05 14:54:30.084 D/dalvikvm(6164): Trying to load lib libnativehelper.so 0x0
04-05 14:54:30.084 D/dalvikvm(6164): Added shared lib libnativehelper.so 0x0
04-05 14:54:30.144 D/AndroidRuntime(6151): Calling main entry com.android.commands.am.Am
04-05 14:54:30.154 D/dalvikvm(6151): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods
04-05 14:54:30.204 D/AndroidRuntime(6145): Shutting down VM
04-05 14:54:30.344 D/AndroidRuntime(6179): Calling main entry com.android.commands.am.Am
04-05 14:54:30.344 D/dalvikvm(6179): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods
04-05 14:54:30.374 W/IInputConnectionWrapper(5796): beginBatchEdit on inactive InputConnection
04-05 14:54:30.374 W/IInputConnectionWrapper(5796): endBatchEdit on inactive InputConnection
04-05 14:54:30.384 D/AndroidRuntime(6164): Calling main entry com.android.commands.am.Am
04-05 14:54:30.384 D/dalvikvm(6164): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods
04-05 14:54:30.454 D/AndroidRuntime(6151): Shutting down VM
04-05 14:54:30.564 D/AndroidRuntime(6179): Shutting down VM
04-05 14:54:30.644 D/AndroidRuntime(6164): Shutting down VM
04-05 14:54:30.834 D/TypingSpeedManager(717): month = 3, day = 5
04-05 14:54:35.474 I/ActivityManager(483): START u0 {act=android.settings.SETTINGS flg=0x14000000 cmp=com.android.settings/.Settings} from pid 606
04-05 14:54:35.674 I/dalvikvm-heap(483): Grow heap (frag case) to 21.133MB for 1048592-byte allocation
04-05 14:54:35.864 V/PhoneStatusBar(606): setLightsOn(true)
04-05 14:54:35.904 W/WindowManager(483): Rebuild removed 11 windows but added 10
04-05 14:54:35.914 W/WindowManager(483): This window was lost: Window{41120128 u0 Please wait EXITING}
04-05 14:54:35.914 W/WindowManager(483): mDisplayId=0 mSession=Session{411f9310 5796:u0a10139} [email protected]
04-05 14:54:35.914 W/WindowManager(483): mOwnerUid=10139 mShowToOwnerOnly=true
04-05 14:54:35.914 W/WindowManager(483): mAttrs=WM.LayoutParams{(0,0)(wrapxwrap) gr=#11 sim=#120 ty=2 fl=#8020002 pfl=0x8 fmt=-2 wanim=0x1030002}
04-05 14:54:35.914 W/WindowManager(483): Requested w=301 h=225 mLayoutSeq=1586
04-05 14:54:35.914 W/WindowManager(483): mBaseLayer=21000 mSubLayer=0 mAnimLayer=21060+0=21060 mLastLayer=21065
04-05 14:54:35.914 W/WindowManager(483): mToken=AppWindowToken{418e2058 token=Token{41782560 ActivityRecord{41108ab0 u0 com.nolanlawson.logcat/.ShowRecordLogDialogActivity}}}
04-05 14:54:35.914 W/WindowManager(483): mRootToken=AppWindowToken{418e2058 token=Token{41782560 ActivityRecord{41108ab0 u0 com.nolanlawson.logcat/.ShowRecordLogDialogActivity}}}
04-05 14:54:35.914 W/WindowManager(483): mAppToken=AppWindowToken{418e2058 token=Token{41782560 ActivityRecord{41108ab0 u0 com.nolanlawson.logcat/.ShowRecordLogDialogActivity}}}
04-05 14:54:35.914 W/WindowManager(483): mViewVisibility=0x0 mHaveFrame=true mObscured=false
04-05 14:54:35.914 W/WindowManager(483): mSeq=0 mSystemUiVisibility=0x0
04-05 14:54:35.914 W/WindowManager(483): mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
04-05 14:54:35.914 W/WindowManager(483): mConfiguration={1.0 ?mcc?mnc en_GB ldltr sw600dp w600dp h880dp 213dpi lrg port finger -keyb/v/h -nav/h s.9 themeResource=null}
04-05 14:54:35.914 W/WindowManager(483): mHasSurface=true mShownFrame=[249.0,506.0][550.0,731.0] isReadyForDisplay()=false
04-05 14:54:35.914 W/WindowManager(483): mFrame=[249,506][550,731] last=[249,506][550,731]
04-05 14:54:35.914 W/WindowManager(483): mSystemDecorRect=[0,0][301,225] last=[0,0][301,225]
04-05 14:54:35.914 W/WindowManager(483): Frames: containing=[0,33][800,1205] parent=[0,33][800,1205] display=[0,33][800,1205]
04-05 14:54:35.914 W/WindowManager(483): content=[249,506][550,731] visible=[249,506][550,731]
04-05 14:54:35.914 W/WindowManager(483): Cur insets: content=[0,0][0,0] visible=[0,0][0,0]
04-05 14:54:35.914 W/WindowManager(483): Lst insets: content=[0,0][0,0] visible=[0,0][0,0]
04-05 14:54:35.914 W/WindowManager(483): WindowStateAnimator{416d0d20 Please wait}:
04-05 14:54:35.914 W/WindowManager(483): mAnimating=false mLocalAnimating=false mAnimationIsEntrance=true mAnimation=null
04-05 14:54:35.914 W/WindowManager(483): mSurface=Surface(name=Please wait, identity=317)
04-05 14:54:35.914 W/WindowManager(483): mDrawState=HAS_DRAWN mLastHidden=true
04-05 14:54:35.914 W/WindowManager(483): Surface: shown=false layer=21065 alpha=1.0 rect=(249.0,506.0) 301.0 x 225.0
04-05 14:54:35.914 W/WindowManager(483): mExiting=true mRemoveOnExit=true mDestroying=false mRemoved=false
04-05 14:54:35.914 W/WindowManager(483): Current app token list:
04-05 14:54:35.914 V/WindowManager(483): #8: Token{4192b0e0 ActivityRecord{4172b268 u0 com.android.settings/.Settings}}
04-05 14:54:35.914 V/WindowManager(483): #7: Token{41250c60 ActivityRecord{41250b20 u0 com.nolanlawson.logcat/.LogcatActivity}}
04-05 14:54:35.914 V/WindowManager(483): #6: Token{416291b8 ActivityRecord{4110f2c0 u0 com.teslacoilsw.launcher/com.android.launcher2.Launcher}}
04-05 14:54:35.914 V/WindowManager(483): #5: Token{41896ed8 ActivityRecord{4123c6f0 u0 com.android.systemui/.recent.RecentsActivity}}
04-05 14:54:35.914 V/WindowManager(483): #4: Token{41aacd18 ActivityRecord{410f6b58 u0 com.android.vending/com.google.android.finsky.activities.PostPurchaseDialog}}
04-05 14:54:35.914 V/WindowManager(483): #3: Token{4185c210 ActivityRecord{4124c250 u0 com.android.vending/com.google.android.finsky.activities.MainActivity}}
04-05 14:54:35.914 V/WindowManager(483): #2: Token{41105cf0 ActivityRecord{41960c70 u0 com.android.chrome/com.google.android.apps.chrome.Main}}
04-05 14:54:35.914 V/WindowManager(483): #1: Token{41659780 ActivityRecord{420aac08 u0 com.android.vending/.AssetBrowserActivity}}
04-05 14:54:35.914 V/WindowManager(483): #0: Token{41251808 ActivityRecord{41279e98 u0 com.google.android.googlequicksearchbox/.SearchActivity}}
04-05 14:54:35.914 W/WindowManager(483): Final window list:
04-05 14:54:35.914 V/WindowManager(483): #0: Window{4179df50 u0 SearchPanel}
04-05 14:54:35.914 V/WindowManager(483): #1: Window{41110bc0 u0 NavigationBar}
04-05 14:54:35.914 V/WindowManager(483): #2: Window{4162c6c0 u0 StatusBar}
04-05 14:54:35.914 V/WindowManager(483): #3: Window{4130e3f0 u0 Keyguard}
04-05 14:54:35.914 V/WindowManager(483): #4: Window{4122e838 u0 Toast}
04-05 14:54:35.914 V/WindowManager(483): #5: Window{417d52c0 u0 InputMethod}
04-05 14:54:35.914 V/WindowManager(483): #6: Window{4122c040 u0 Starting com.android.settings}
04-05 14:54:35.914 V/WindowManager(483): #7: Window{412b1870 u0 com.nolanlawson.logcat/com.nolanlawson.logcat.LogcatActivity}
04-05 14:54:35.914 V/WindowManager(483): #8: Window{411feb78 u0 com.teslacoilsw.launcher/com.android.launcher2.Launcher}
04-05 14:54:35.914 V/WindowManager(483): #9: Window{41277a10 u0 com.android.systemui/com.android.systemui.recent.RecentsActivity}
04-05 14:54:35.914 V/WindowManager(483): #10: Window{4122be18 u0 com.android.vending/com.google.android.finsky.activities.PostPurchaseDialog}
04-05 14:54:35.914 V/WindowManager(483): #11: Window{411ec250 u0 com.android.vending/com.google.android.finsky.activities.MainActivity}
04-05 14:54:35.914 V/WindowManager(483): #12: Window{413741b8 u0 com.android.chrome/com.google.android.apps.chrome.Main}
04-05 14:54:35.914 V/WindowManager(483): #13: Window{416beba8 u0 SurfaceView}
04-05 14:54:35.914 V/WindowManager(483): #14: Window{418f9ec8 u0 com.android.vending/com.android.vending.AssetBrowserActivity}
04-05 14:54:35.914 V/WindowManager(483): #15: Window{4124c0d0 u0 com.google.android.googlequicksearchbox/com.google.android.googlequicksearchbox.SearchActivity}
04-05 14:54:35.914 V/WindowManager(483): #16: Window{417681e0 u0 com.android.systemui.ImageWallpaper}
04-05 14:54:35.954 W/InputMethodManagerService(483): Focus gain on non-focused client [email protected] (uid=10139 pid=5796)
04-05 14:54:36.324 D/BluetoothManagerService(483): Message: 20
04-05 14:54:36.324 D/BluetoothManagerService(483): Added callback: [email protected]:true
04-05 14:54:36.324 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:36.334 D/BluetoothManagerService(483): Message: 30
04-05 14:54:36.334 E/BluetoothInputDevice(6047): Could not bind to Bluetooth HID Service
04-05 14:54:36.334 D/BluetoothPan(6047): BluetoothPan() call bindService
04-05 14:54:36.334 D/BluetoothManagerService(483): Message: 30
04-05 14:54:36.334 E/BluetoothPan(6047): Could not bind to Bluetooth HID Service
04-05 14:54:36.334 D/BluetoothPan(6047): BluetoothPan(), bindService called
04-05 14:54:36.334 W/ContextImpl(6047): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1425 android.content.ContextWrapper.bindService:473 android.bluetooth.BluetoothInputDevice.<init>:240 android.bluetooth.BluetoothAdapter.getProfileProxy:1161 com.android.settings.bluetooth.LocalBluetoothAdapter.getProfileProxy:94
04-05 14:54:36.334 W/ActivityManager(483): Unable to start service Intent { act=android.bluetooth.IBluetoothInputDevice } U=0: not found
04-05 14:54:36.334 W/ContextImpl(6047): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1425 android.content.ContextWrapper.bindService:473 android.bluetooth.BluetoothPan.<init>:141 android.bluetooth.BluetoothAdapter.getProfileProxy:1164 com.android.settings.bluetooth.PanProfile.<init>:73
04-05 14:54:36.334 W/ActivityManager(483): Unable to start service Intent { act=android.bluetooth.IBluetoothPan } U=0: not found
04-05 14:54:36.344 D/BluetoothManagerService(483): Message: 30
04-05 14:54:36.344 E/BluetoothPbap(6047): Could not bind to Bluetooth Pbap Service
04-05 14:54:36.344 D/LocalBluetoothProfileManager(6047): LocalBluetoothProfileManager construction complete
04-05 14:54:36.344 W/ContextImpl(6047): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1425 android.content.ContextWrapper.bindService:473 android.bluetooth.BluetoothPbap.<init>:161 com.android.settings.bluetooth.PbapServerProfile.<init>:68 com.android.settings.bluetooth.LocalBluetoothProfileManager.<init>:124
04-05 14:54:36.344 W/ActivityManager(483): Unable to start service Intent { act=android.bluetooth.IBluetoothPbap } U=0: not found
04-05 14:54:36.364 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:36.364 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:36.684 D/libEGL (6047): loaded /system/lib/egl/libEGL_tegra.so
04-05 14:54:36.864 D/libEGL (6047): loaded /system/lib/egl/libGLESv1_CM_tegra.so
04-05 14:54:36.894 D/libEGL (6047): loaded /system/lib/egl/libGLESv2_tegra.so
04-05 14:54:36.914 D/OpenGLRenderer(6047): Enabling debug mode 0
04-05 14:54:36.944 D/WifiService(483): setWifiEnabled: true pid=6047, uid=1000
04-05 14:54:36.984 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:37.274 I/Choreographer(6047): Skipped 50 frames! The application may be doing too much work on its main thread.
04-05 14:54:37.504 I/ActivityManager(483): Displayed com.android.settings/.Settings: +1s606ms
04-05 14:54:38.614 D/BluetoothManagerService(483): enable(): mBluetooth =null mBinding = false
04-05 14:54:38.614 D/BluetoothManagerService(483): Message: 1
04-05 14:54:38.614 D/BluetoothManagerService(483): MESSAGE_ENABLE: mBluetooth = null
04-05 14:54:38.614 E/BluetoothManagerService(483): Fail to bind to: android.bluetooth.IBluetooth
04-05 14:54:38.614 W/ActivityManager(483): Unable to start service Intent { act=android.bluetooth.IBluetooth } U=0: not found
04-05 14:54:39.744 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:39.744 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:39.744 D/LocalBluetoothManager(6047): setting foreground activity to non-null context
04-05 14:54:39.744 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:39.754 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:39.754 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:39.754 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:39.754 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:42.664 W/ThrottleService(483): unable to find stats for iface rmnet0
04-05 14:54:45.154 D/BluetoothManagerService(483): checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=0
04-05 14:54:45.154 D/BluetoothManagerService(483): enable(): mBluetooth =null mBinding = false
04-05 14:54:45.164 D/BluetoothManagerService(483): Message: 1
04-05 14:54:45.164 D/BluetoothManagerService(483): MESSAGE_ENABLE: mBluetooth = null
04-05 14:54:45.164 E/BluetoothManagerService(483): Fail to bind to: android.bluetooth.IBluetooth
04-05 14:54:45.164 W/ActivityManager(483): Unable to start service Intent { act=android.bluetooth.IBluetooth } U=0: not found
04-05 14:54:46.114 W/InputMethodManagerService(483): Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
04-05 14:54:47.914 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:47.914 D/LocalBluetoothManager(6047): setting foreground activity to null
04-05 14:54:47.974 V/PhoneStatusBar(606): setLightsOn(true)
04-05 14:54:50.314 I/ActivityManager(483): START u0 {act=android.settings.SETTINGS flg=0x14000000 cmp=com.android.settings/.Settings} from pid 606
04-05 14:54:50.734 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:50.834 D/WifiService(483): setWifiEnabled: true pid=6047, uid=1000
04-05 14:54:50.844 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:51.374 I/ActivityManager(483): Displayed com.android.settings/.Settings: +759ms
04-05 14:54:52.254 D/BluetoothManagerService(483): enable(): mBluetooth =null mBinding = false
04-05 14:54:52.254 D/BluetoothManagerService(483): Message: 1
04-05 14:54:52.254 D/BluetoothManagerService(483): MESSAGE_ENABLE: mBluetooth = null
04-05 14:54:52.254 E/BluetoothManagerService(483): Fail to bind to: android.bluetooth.IBluetooth
04-05 14:54:52.254 W/ActivityManager(483): Unable to start service Intent { act=android.bluetooth.IBluetooth } U=0: not found
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:53.664 D/LocalBluetoothManager(6047): setting foreground activity to non-null context
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:53.664 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:55.124 D/BluetoothAdapter(6047): 1099296520: getState() : mService = null. Returning STATE_OFF
04-05 14:54:55.124 D/LocalBluetoothManager(6047): setting foreground activity to null
04-05 14:54:55.174 V/PhoneStatusBar(606): setLightsOn(true)
Extra info:
Problems isolated, logcat useless apparently.
OK, so here is all the information I know so far.
1)
adb shell
am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
'Turning on bluetooth' box hangs.
Toggling on Bluetooth gives:
519 BluetoothManagerService 'Fail to bind to: android.bluetooth.iBluetooth
I have reflashed the ROM i was using, the apparently fixed 3.15 Paranoid Android march 4.2.2 stable build
Extra extra info:
PLEASE help me! I'm a patient guy, but I've been waiting nearly a month for an answer! (formerly, please delete -dismiss- ) Please!! Does this thread have some kind of aversion to people? I'll give whoever helps me an invisible cookie! :3
OK, the post date doesn't look it, but I've been waiting nearly a month for even a single reply.. can someone please help me? I'll give you anything... *weeps*
Im trying to start a simple app and i need to display on a SurfaceView the preview of the cam as soon as the App start.
i added the permission to the manifest:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
and my code:
Code:
import android.content.Context;
import android.hardware.Camera;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
public class MainActivity extends SurfaceView implements SurfaceHolder.Callback{
SurfaceView mSurfaceView;
private SurfaceHolder mHolder;
public Camera camera = null;
public MainActivity(Context context) {
super(context);
mSurfaceView = (SurfaceView) findViewById(R.id.surfaceView);
mHolder = mSurfaceView.getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
[user=439709]@override[/user]
public void surfaceCreated(SurfaceHolder holder) {
camera = Camera.open();
try{
camera.setPreviewDisplay(mHolder);
} catch(Exception e){
}
}
[user=439709]@override[/user]
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
Camera.Parameters params = camera.getParameters();
params.setPreviewSize(width,height);
camera.setParameters(params);
camera.startPreview();
}
[user=439709]@override[/user]
public void surfaceDestroyed(SurfaceHolder holder) {
camera.stopPreview();
camera = null;
}
}
Ive looked for many tutorial and all technically do the same or smiliart stuff. But the app crashes. I cant find a solution
LogCat
Code:
06-01 12:39:12.456 616-841/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.droidcam/.MainActivity bnds=[240,408][240,408]} from pid 861
06-01 12:39:12.596 616-841/system_process D/dalvikvm: GC_FOR_ALLOC freed 1352K, 16% free 11518K/13560K, paused 112ms, total 118ms
06-01 12:39:12.636 2744-2744/? D/dalvikvm: Late-enabling CheckJNI
06-01 12:39:12.646 616-881/system_process I/ActivityManager: Start proc com.example.droidcam for activity com.example.droidcam/.MainActivity: pid=2744 uid=10019 gids={50019, 1006, 1028}
06-01 12:39:12.746 2744-2744/com.example.droidcam E/Trace: error opening trace file: No such file or directory (2)
06-01 12:39:12.826 2744-2744/com.example.droidcam D/dalvikvm: newInstance failed: no <init>()
06-01 12:39:12.836 2744-2744/com.example.droidcam D/AndroidRuntime: Shutting down VM
06-01 12:39:12.836 2744-2744/com.example.droidcam W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x2b5d9930)
06-01 12:39:12.836 2744-2744/com.example.droidcam E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.droidcam/com.example.droidcam.MainActivity}: java.lang.InstantiationException: can't instantiate class com.example.droidcam.MainActivity; no empty constructor
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2223)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2357)
at android.app.ActivityThread.access$600(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5226)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.InstantiationException: can't instantiate class com.example.droidcam.MainActivity; no empty constructor
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2214)
... 11 more
06-01 12:39:12.836 616-1341/system_process W/ActivityManager: Force finishing activity com.example.droidcam/.MainActivity
06-01 12:39:12.986 616-650/system_process D/dalvikvm: GC_FOR_ALLOC freed 1696K, 24% free 10472K/13772K, paused 76ms, total 77ms
06-01 12:39:13.387 616-647/system_process W/ActivityManager: Activity pause timeout for ActivityRecord{2bd8aff0 u0 com.example.droidcam/.MainActivity}
06-01 12:39:18.952 2744-2744/? I/Process: Sending signal. PID: 2744 SIG: 9
06-01 12:39:18.952 616-943/system_process I/ActivityManager: Process com.example.droidcam (pid 2744) has died.
06-01 12:39:19.002 616-616/system_process W/InputMethodManagerService: Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
Please put your code into code tags.
EDIT: Thanks.
and Post/check logcats.
just saying it crashes is too vague.
out of ideas said:
and Post/check logcats.
just saying it crashes is too vague.
Click to expand...
Click to collapse
On Eclipse i know how to show the windows of the LogCat, but cant really find it here on Android Studio.
Im a bit newby about this sorry, coming from PHP using just Notepad.
Guess i found it, added log cat
I saw some tutorial like this, im not sure why it doesnt start.
Is it for te onCreate method missing? but i saw that for other works anyway like this
Btw i've also triyed an other way, but stills give me errors. i could upload that one too, different logcat.
Hope one of the two could be solved
Code:
import android.app.Activity;
import android.hardware.Camera;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import java.io.IOException;
public class MainActivity extends Activity implements SurfaceHolder.Callback{
/* VARIABILI PRIVATE */
private SurfaceView mSurfaceView;
private SurfaceHolder mSurfaceHolder;
private Camera mCamera;
/** Called when the activity is first created. */
[user=439709]@override[/user]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mSurfaceView = (SurfaceView)findViewById(R.id.surfaceView);
mSurfaceHolder = mSurfaceView.getHolder();
mSurfaceHolder.addCallback(this);
mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
[user=439709]@override[/user]
public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
Camera.Parameters params = mCamera.getParameters();
params.setPreviewSize(arg2, arg3);
mCamera.setParameters(params);
try {
//lancio la preview
mCamera.setPreviewDisplay(arg0);
mCamera.startPreview();
} catch (IOException e) {
//gestione errore
}
}
[user=439709]@override[/user]
public void surfaceCreated(SurfaceHolder holder) {
mCamera = Camera.open();
}
[user=439709]@override[/user]
public void surfaceDestroyed(SurfaceHolder holder) {
mCamera.stopPreview();
mCamera.release();
}
logcat
Code:
06-01 13:32:31.187 616-661/system_process I/ActivityManager: Start proc com.android.vending for service com.android.vending/com.google.android.finsky.services.ContentSyncService: pid=25552 uid=10005 gids={50005, 3003, 1015, 1028}
06-01 13:32:31.227 25552-25552/com.android.vending E/Trace: error opening trace file: No such file or directory (2)
06-01 13:32:31.387 616-841/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.droidcam/.MainActivity bnds=[240,408][240,408]} from pid 861
06-01 13:32:31.437 25566-25566/? D/dalvikvm: Late-enabling CheckJNI
06-01 13:32:31.447 616-1341/system_process I/ActivityManager: Start proc com.example.droidcam for activity com.example.droidcam/.MainActivity: pid=25566 uid=10019 gids={50019, 1006, 1028}
06-01 13:32:31.607 25566-25566/com.example.droidcam E/Trace: error opening trace file: No such file or directory (2)
06-01 13:32:31.787 25552-25552/com.android.vending D/Finsky: [1] FinskyApp.onCreate: Initializing network with DFE https://android.clients.google.com/fdfe/
06-01 13:32:31.987 25552-25552/com.android.vending D/Finsky: [1] DailyHygiene.goMakeHygieneIfDirty: No need to run daily hygiene.
06-01 13:32:32.037 25552-25552/com.android.vending W/Settings: Setting download_manager_max_bytes_over_mobile has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
06-01 13:32:32.037 25552-25552/com.android.vending W/Settings: Setting download_manager_recommended_max_bytes_over_mobile has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
06-01 13:32:32.178 616-881/system_process D/dalvikvm: GC_FOR_ALLOC freed 656K, 26% free 11321K/15124K, paused 82ms, total 86ms
06-01 13:32:32.238 25566-25566/com.example.droidcam D/libEGL: loaded /system/lib/egl/libEGL_adreno200.so
06-01 13:32:32.258 25566-25566/com.example.droidcam D/libEGL: loaded /system/lib/egl/libGLESv1_CM_adreno200.so
06-01 13:32:32.258 25566-25566/com.example.droidcam D/libEGL: loaded /system/lib/egl/libGLESv2_adreno200.so
06-01 13:32:32.268 25566-25566/com.example.droidcam I/Adreno200-EGL: <qeglDrvAPI_eglInitialize:294>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB.04.01.01.00.036_msm8960_JB_CL2644550_release_AU (CL2644550)
Build Date: 07/31/12 Tue
Local Branch:
Remote Branch: quic/master
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_JB.04.01.01.00.036 + NOTHING
06-01 13:32:32.318 25566-25566/com.example.droidcam D/OpenGLRenderer: Enabling debug mode 0
06-01 13:32:32.348 256-515/? I/AwesomePlayer: setDataSource_l(URL suppressed)
06-01 13:32:32.378 256-25622/? D/MediaExtractor: returning default extractor
06-01 13:32:32.388 256-515/? I/AwesomePlayer: setDataSource_l(URL suppressed)
06-01 13:32:32.408 256-25626/? D/MediaExtractor: returning default extractor
06-01 13:32:32.408 256-515/? I/CameraClient: Opening camera 0
06-01 13:32:32.408 256-515/? W/ServiceManager: Permission failure: com.sonyericsson.permission.CAMERA_EXTENDED from uid=10019 pid=25566
06-01 13:32:32.438 256-25630/? I/caladbolg: 3348999538 cald_camctrl.c (6713) 25630 P [SVR] -945967758 + Cald_CamCtrl_PowerUp
06-01 13:32:32.438 256-25630/? I/caladbolg: 3348999630 cald_camctrl.c (7484) 25630 P [SVR] -945967666 + Cald_CamCtrl_FSM_Func_PowerUp
06-01 13:32:32.438 256-25630/? I/caladbolg: 3349003170 cald_hal_qct.c (2789) 25630 P [HAL] -945964126 + Cald_Hal_Qct_If_PowerUp
06-01 13:32:32.438 256-25630/? I/caladbolg: 3349003323 cald_hal_qct.c (2847) 25630 P [HAL] -945963973 - Cald_Hal_Qct_If_PowerUp (0)
06-01 13:32:32.438 256-25630/? I/caladbolg: 3349004665 cald_camctrl.c (7563) 25630 P [SVR] -945962631 - Cald_CamCtrl_FSM_Func_PowerUp (0)
06-01 13:32:32.438 256-25630/? I/caladbolg: 3349004726 cald_camctrl.c (6720) 25630 P [SVR] -945962570 - Cald_CamCtrl_PowerUp (0)
06-01 13:32:32.448 256-25630/? E/caladbolg: 3349014431 cald_camctrl.c (11888) 25630 E [SVR] PreviewSize Invalid param: value[402x527]
06-01 13:32:32.458 25566-25566/com.example.droidcam D/AndroidRuntime: Shutting down VM
06-01 13:32:32.458 25566-25566/com.example.droidcam W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x2b5d9930)
06-01 13:32:32.488 25566-25566/com.example.droidcam E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1496)
at com.example.droidcam.MainActivity.surfaceChanged(MainActivity.java:41)
at android.view.SurfaceView.updateWindow(SurfaceView.java:580)
at android.view.SurfaceView.access$000(SurfaceView.java:86)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:174)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:680)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1842)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:532)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5226)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
at dalvik.system.NativeStart.main(Native Method)
06-01 13:32:32.498 616-943/system_process W/ActivityManager: Force finishing activity com.example.droidcam/.MainActivity
06-01 13:32:32.688 25552-25552/com.android.vending D/Finsky: [1] 2.run: Loaded library for account: [i1YaFxIWaZrcOQ26zxNX5K0RvvY]
06-01 13:32:32.688 25552-25552/com.android.vending D/Finsky: [1] 2.run: Finished loading 1 libraries.
06-01 13:32:32.908 25552-25552/com.android.vending D/Finsky: [1] 5.onFinished: Installation state replication succeeded.
06-01 13:32:33.018 616-647/system_process W/ActivityManager: Activity pause timeout for ActivityRecord{2b946870 u0 com.example.droidcam/.MainActivity}
In Android you normally do not use the constructor of an Activity for anything.
Use the onCreate method instead.
EDIT: The log says that the constructor must be empty.
nikwen said:
In Android you normally do not use the constructor of an Activity for anything.
Use the onCreate method instead.
EDIT: The log says that the constructor must be empty.
Click to expand...
Click to collapse
I thought about that (even if i saw video tutorial doing it) so i tried wht onCreate method and now it seams to give problem with the setParameters?
Ive uploaded the new code and logcats before
Ah. Check this: http://stackoverflow.com/questions/3890381/camera-setparameters-failed-in-android
nikwen said:
Ah. Check this: http://stackoverflow.com/questions/3890381/camera-setparameters-failed-in-android
Click to expand...
Click to collapse
i tryed that at th beggin, and didnt work, in fact i tried it again and still give me the same error apparently
While I'm still learning myself, it looks like you are getting a failed camera permission. And then it tries to pass in an invalid parameter to the camera.
deniel said:
I/CameraClient: Opening camera 0
06-01 13:32:32.408 256-515/? W/ServiceManager: Permission failure: com.sonyericsson.permission.CAMERA_EXTENDED from uid=10019 pid=25566
06-01 13:32:32.448 256-25630/? E/caladbolg: 3349014431 cald_camctrl.c (11888) 25630 E [SVR] PreviewSize Invalid param: value[402x527]
[/CODE]
Click to expand...
Click to collapse
Sent from a Toasted Devil
netwokz said:
While I'm still learning myself, it looks like you are getting a failed camera permission. And then it tries to pass in an invalid parameter to the camera.
Sent from a Toasted Devil
Click to expand...
Click to collapse
But cant understand which one and how should i do. it ryed the 2 ways everybody does
What phone are you trying this on? Have you tried it in an emulator?
After getting home and I was able to try your second piece of code. It looks like it is a problem with <CODE>params.setPreviewSize(arg2, arg3);</CODE>, it doesn't like the width and height arguments. I found THIS(second answer). and after plugging it into your code it was working for me. If you like I can show you the modified code, altho its real easy to plug in.
netwokz said:
After getting home and I was able to try your second piece of code. It looks like it is a problem with <CODE>params.setPreviewSize(arg2, arg3);</CODE>, it doesn't like the width and height arguments. I found THIS(second answer). and after plugging it into your code it was working for me. If you like I can show you the modified code, altho its real easy to plug in.
Click to expand...
Click to collapse
i tryed his first example and finally i get his "distoted" image. When i'll have time ill try the rets thnk u very much
ill try this:
Code:
Camera.Size getBestPreviewSize(int width, int height, Camera.Parameters parameters) {
Camera.Size result=null;
float dr = Float.MAX_VALUE;
float ratio = (float)width/(float)height;
for (Camera.Size size : parameters.getSupportedPreviewSizes()) {
float r = (float)size.width/(float)size.height;
if( Math.abs(r - ratio) < dr && size.width <= width && size.height <= height ) {
dr = Math.abs(r - ratio);
result = size;
}
}
return result;
}
Code:
ublic void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
// Now that the size is known, set up the camera parameters and begin
// the preview.
if (isPreviewRunning) {
mCamera.stopPreview();
}
Camera.Parameters parameters = mCamera.getParameters();
List<Size> sizes = parameters.getSupportedPreviewSizes();
Size optimalSize = getBestPreviewSize( w, h, parameters);
parameters.setPreviewSize(optimalSize.width, optimalSize.height);
mCamera.setParameters(parameters);
mCamera.startPreview();
isPreviewRunning =true;
}
im not sure abot the 3rd parameter of the getBestPreviewSize method which one is it. Like this is still distorted
Yeah, I could never fix the distortion back when I was trying my camera app. But I think I will tinker with it again. Keep this updated if you find anything, I will also.
Sent from a Toasted Devil
I want to send and receive LinkedHashmap between activities. Below is my CODE but the application aborts when I try to pass/retrieve the map. Could anyone please help?
============
Sending Activity
============
HTML:
package com.moodswings.moodchart;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.text.InputFilter;
import android.text.InputType;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.widget.*;
public class MainActivity extends Activity
{
ScrollView sv;
TableLayout myTableLayout;
Button submitButton;
Button resetButton;
LinkedHashMap<String, List<EditText>> dataMap = new LinkedHashMap<String, List<EditText>>();
[user=439709]@override[/user]
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
sv = new ScrollView(this);
myTableLayout = new TableLayout (this);
submitButton = new Button(this);
resetButton = new Button(this);
drawScreen();
addListenerOnButton();
}
public void drawScreen()
{
String[] fctrdList = {"Mood","Aggr","Axty"};//,"Depr","Obsv", "Sleep"};
myTableLayout.removeAllViews();
sv.removeAllViews();
//myTableLayout.setBackgroundResource(R.drawable.background);
// rows
TableRow hrsRow = new TableRow(this);
TableRow buttonRow = new TableRow(this);
// margins
hrsRow.setPadding( 20,10,20,10);
// the buttons table layout
// purpose : right align for both buttons
TableLayout buttonsLayout = new TableLayout(this);
buttonRow.setPadding(20,50,40,0);
// the submit and reset buttons
submitButton.setText( "Submit");
resetButton.setText( "Reset");
buttonRow.addView( submitButton);
buttonRow.addView(resetButton);
buttonRow.setGravity(Gravity.RIGHT);
buttonsLayout.addView(buttonRow);
myTableLayout.addView(buttonsLayout);
//=============================================================
// time
TextView hrsV = new TextView(this);
hrsV.setText( "[00-04] [04-08] [08-12] [12-16] [16-20] [20-00]" );
hrsV.setTextSize(10);
hrsV.setTextColor(Color.BLACK );
hrsV.setGravity(Gravity.CENTER_HORIZONTAL);
hrsRow.addView(hrsV);
hrsRow.setGravity(Gravity.CENTER);
// the hours tablelayout
TableLayout hrsTableLayout = new TableLayout(this);
hrsTableLayout.addView(hrsRow);
// add the hours layout to the main one
myTableLayout.addView(hrsTableLayout);
/// the input rows
for(int j = 0; j < fctrdList.length; j++)
{
inputRow(myTableLayout, fctrdList[j]);
}
//
sv.addView(myTableLayout);
// set the screen content to table layout's
setContentView(sv);
}
public void inputRow( TableLayout tl, String label )
{
TableRow inputRow = new TableRow(this);
TextView tv = new TextView(this);
List<EditText> dataList = new ArrayList<EditText>();
// some margin
inputRow.setPadding(10,0,10,0);
tv.setText(label);
tv.setTextSize(10);
inputRow.addView(tv);
for(int i = 0; i < 2; i++)
{
EditText edit = new EditText(this);
edit.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10);
edit.setWidth(50);
edit.setHeight(50);
edit.setFilters(new InputFilter[] {new InputFilter.LengthFilter(2)});
edit.setInputType(InputType.TYPE_CLASS_NUMBER);
//edit.setId( 1 );
edit.setGravity(Gravity.LEFT);
inputRow.addView(edit);
dataList.add(edit);
}
dataMap.put(label, dataList);
tl.addView(inputRow);
}
public void addListenerOnButton() {
submitButton.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View arg0) {
LinkedHashMap<String, List<String>> moodMap = new LinkedHashMap<String, List<String>>();
// populate List with EditText contents
for (LinkedHashMap.Entry<String, List<EditText>> entry : dataMap.entrySet()) {
List<EditText> edValues = entry.getValue();
//System.out.println("edValues size :" + edValues.size());
List<String> scaleList = new ArrayList<String>();
for(int a = 0; a < edValues.size(); a++)
{
EditText t = edValues.get(a);
String text = t.getText().toString();
//System.out.println("====== EditText :" + text);
scaleList.add(text);
}
moodMap.put(entry.getKey(), scaleList);
}
// =================
Bundle bundle = new Bundle();
bundle.putSerializable("factorsDataMap", moodMap);
Intent intent = new Intent(MainActivity.this, MoodSummary.class);
intent.putExtras(bundle);
startActivity(intent);
// =================
/*Intent intent = new Intent(MainActivity.this, MoodSummary.class);
intent.putExtra("map", moodMap);
startActivity(intent);*/
//==================
}
});
}
}
============
Second Activity
============
HTML:
package com.moodswings.moodchart;
import java.util.LinkedHashMap;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;
public class MoodSummary extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mood_summary);
System.out.println("HashMapTest");
LinkedHashMap<String, List<String>> moodLnkMap = new LinkedHashMap<String, List<String>>();
Bundle bundle = this.getIntent().getExtras();
if(bundle != null){
moodLnkMap = (LinkedHashMap<String, List<String>>) bundle.getSerializable("factorsDataMap");
if(moodLnkMap.size() != 0)
{
System.out.println("moodMap size: " + moodLnkMap.size());
}
else
{
System.out.println("moodMap size: 0");
}
}
}
}
========
The Logcat
========
HTML:
01-22 17:58:16.345: D/MediaScannerService(198): done scanning volume internal 01-22 17:58:17.024: D/dalvikvm(116): GC_EXTERNAL_ALLOC freed 11169 objects / 521416 bytes in 81ms 01-22 17:58:17.294: D/dalvikvm(116): GC_EXPLICIT freed 1737 objects / 96240 bytes in 63ms 01-22 17:58:17.404: D/PackageParser(58): Scanning package: /data/app/vmdl52647.tmp 01-22 17:58:17.655: I/PackageManager(58): Removing non-system package:com.moodswings.moodchart 01-22 17:58:17.655: I/ActivityManager(58): Force stopping package com.moodswings.moodchart uid=10038 01-22 17:58:17.795: D/PackageManager(58): Scanning package com.moodswings.moodchart 01-22 17:58:17.795: I/PackageManager(58): Package com.moodswings.moodchart codePath changed from /data/app/com.moodswings.moodchart-1.apk to /data/app/com.moodswings.moodchart-2.apk; Retaining data and using new 01-22 17:58:17.805: I/PackageManager(58): /data/app/com.moodswings.moodchart-2.apk changed; unpacking 01-22 17:58:17.815: D/installd(34): DexInv: --- BEGIN '/data/app/com.moodswings.moodchart-2.apk' --- 01-22 17:58:18.714: D/dalvikvm(257): DexOpt: load 112ms, verify 486ms, opt 28ms 01-22 17:58:18.784: D/installd(34): DexInv: --- END '/data/app/com.moodswings.moodchart-2.apk' (success) --- 01-22 17:58:18.784: W/PackageManager(58): Code path for pkg : com.moodswings.moodchart changing from /data/app/com.moodswings.moodchart-1.apk to /data/app/com.moodswings.moodchart-2.apk 01-22 17:58:18.794: W/PackageManager(58): Resource path for pkg : com.moodswings.moodchart changing from /data/app/com.moodswings.moodchart-1.apk to /data/app/com.moodswings.moodchart-2.apk 01-22 17:58:18.794: D/PackageManager(58): Activities: com.moodswings.moodchart.MainActivity com.moodswings.saqibchart.MoodSummary 01-22 17:58:18.804: I/ActivityManager(58): Force stopping package com.moodswings.moodchart uid=10038 01-22 17:58:18.924: I/installd(34): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected] 01-22 17:58:18.924: D/PackageManager(58): New package installed in /data/app/com.moodswings.moodchart-2.apk 01-22 17:58:19.046: I/ActivityManager(58): Force stopping package com.moodswings.moodchart uid=10038 01-22 17:58:19.205: I/ActivityManager(58): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=258 uid=10028 gids={} 01-22 17:58:19.295: W/RecognitionManagerService(58): no available voice recognition services found 01-22 17:58:19.475: I/ActivityThread(258): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider 01-22 17:58:19.505: D/dalvikvm(157): GC_EXPLICIT freed 4255 objects / 257880 bytes in 436ms 01-22 17:58:19.625: D/dalvikvm(58): GC_EXPLICIT freed 9153 objects / 569160 bytes in 116ms 01-22 17:58:19.675: I/installd(34): unlink /data/dalvik-cache/[email protected]@[email protected] 01-22 17:58:19.685: D/AndroidRuntime(205): Shutting down VM 01-22 17:58:19.695: D/jdwp(205): adbd disconnected 01-22 17:58:19.714: I/AndroidRuntime(205): NOTE: attach of thread 'Binder Thread #3' failed 01-22 17:58:20.214: D/AndroidRuntime(268): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 01-22 17:58:20.214: D/AndroidRuntime(268): CheckJNI is ON 01-22 17:58:20.344: D/AndroidRuntime(268): --- registering native functions --- 01-22 17:58:20.935: I/ActivityManager(58): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.moodswings.moodchart/.MainActivity } 01-22 17:58:21.075: D/AndroidRuntime(268): Shutting down VM 01-22 17:58:21.085: I/ActivityManager(58): Start proc com.moodswings.moodchart for activity com.moodswings.moodchart/.MainActivity: pid=274 uid=10038 gids={} 01-22 17:58:21.094: D/jdwp(268): adbd disconnected 01-22 17:58:21.165: I/dalvikvm(268): JNI: AttachCurrentThread (from ???.???) 01-22 17:58:21.165: I/AndroidRuntime(268): NOTE: attach of thread 'Binder Thread #3' failed 01-22 17:58:21.454: E/jdwp(274): Failed sending reply to debugger: Broken pipe 01-22 17:58:21.454: D/dalvikvm(274): Debugger has detached; object registry had 1 entries 01-22 17:58:21.914: I/ActivityManager(58): Displayed activity com.moodswings.moodchart/.MainActivity: 843 ms (total 20356 ms) 01-22 17:58:21.914: I/ActivityManager(58): Displayed activity com.android.launcher/com.android.launcher2.Launcher: 20358 ms (total 20358 ms) 01-22 17:58:32.785: D/KeyguardViewMediator(58): pokeWakelock(5000) 01-22 17:58:32.995: D/KeyguardViewMediator(58): pokeWakelock(5000) 01-22 17:58:33.354: I/ARMAssembler(58): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x273d28:0x273e34] in 495099 ns 01-22 17:58:33.424: I/ARMAssembler(58): generated scanline__00000177:03515104_00001001_00000000 [ 91 ipp] (114 ins) at [0x29a378:0x29a540] in 676141 ns 01-22 17:58:35.995: D/dalvikvm(106): GC_FOR_MALLOC freed 1450 objects / 218728 bytes in 51ms 01-22 17:58:36.644: W/KeyCharacterMap(106): No keyboard for id 0 01-22 17:58:36.644: W/KeyCharacterMap(106): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 01-22 17:58:36.845: D/dalvikvm(106): GC_EXTERNAL_ALLOC freed 1992 objects / 136528 bytes in 62ms 01-22 17:58:37.715: D/dalvikvm(106): GC_EXTERNAL_ALLOC freed 544 objects / 27840 bytes in 53ms 01-22 17:58:37.944: W/KeyCharacterMap(106): No keyboard for id 0 01-22 17:58:37.944: W/KeyCharacterMap(106): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 01-22 17:58:40.515: D/dalvikvm(106): GC_EXTERNAL_ALLOC freed 317 objects / 20448 bytes in 94ms 01-22 17:58:40.676: W/KeyCharacterMap(106): No keyboard for id 0 01-22 17:58:40.676: W/KeyCharacterMap(106): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 01-22 17:58:43.195: D/dalvikvm(106): GC_EXTERNAL_ALLOC freed 356 objects / 22976 bytes in 74ms 01-22 17:58:43.345: W/KeyCharacterMap(106): No keyboard for id 0 01-22 17:58:43.376: W/KeyCharacterMap(106): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 01-22 17:58:44.665: I/ActivityManager(58): Starting activity: Intent { cmp=com.moodswings.moodchart/.MoodSummary (has extras) } 01-22 17:58:44.665: D/AndroidRuntime(274): Shutting down VM 01-22 17:58:44.665: W/dalvikvm(274): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 01-22 17:58:44.685: E/AndroidRuntime(274): FATAL EXCEPTION: main 01-22 17:58:44.685: E/AndroidRuntime(274): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.moodswings.moodchart/com.moodswings.moodchart.MoodSummary}; have you declared this activity in your AndroidManifest.xml? 01-22 17:58:44.685: E/AndroidRuntime(274): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.app.Activity.startActivityForResult(Activity.java:2817) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.app.Activity.startActivity(Activity.java:2923) 01-22 17:58:44.685: E/AndroidRuntime(274): at com.moodswings.moodchart.MainActivity$1.onClick(MainActivity.java:172) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.view.View.performClick(View.java:2408) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.view.View$PerformClick.run(View.java:8816) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.os.Handler.handleCallback(Handler.java:587) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.os.Handler.dispatchMessage(Handler.java:92) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.os.Looper.loop(Looper.java:123) 01-22 17:58:44.685: E/AndroidRuntime(274): at android.app.ActivityThread.main(ActivityThread.java:4627) 01-22 17:58:44.685: E/AndroidRuntime(274): at java.lang.reflect.Method.invokeNative(Native Method) 01-22 17:58:44.685: E/AndroidRuntime(274): at java.lang.reflect.Method.invoke(Method.java:521) 01-22 17:58:44.685: E/AndroidRuntime(274): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 01-22 17:58:44.685: E/AndroidRuntime(274): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 01-22 17:58:44.685: E/AndroidRuntime(274): at dalvik.system.NativeStart.main(Native Method) 01-22 17:58:44.695: W/ActivityManager(58): Force finishing activity com.moodswings.moodchart/.MainActivity 01-22 17:58:45.215: W/ActivityManager(58): Activity pause timeout for HistoryRecord{4a1851c8 com.moodswings.moodchart/.MainActivity} 01-22 17:58:45.314: I/ARMAssembler(58): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x2f9820:0x2f98dc] in 534098 ns 01-22 17:58:48.934: I/Process(274): Sending signal. PID: 274 SIG: 9 01-22 17:58:48.954: I/ActivityManager(58): Process com.moodswings.moodchart (pid 274) has died. 01-22 17:58:48.954: I/WindowManager(58): WIN DEATH: Window{4a2a9f40 com.moodswings.moodchart/com.moodswings.moodchart.MainActivity paused=false} 01-22 17:58:49.036: W/InputManagerService(58): Got RemoteException sending setActive(false) notification to pid 274 uid 10038 01-22 17:58:56.324: W/ActivityManager(58): Activity destroy timeout for HistoryRecord{4a1851c8 com.moodswings.moodchart/.MainActivity} 01-22 17:59:00.075: W/Process(58): Unable to open /proc/274/status
Hi everybody,
I'm new to android coding, so I'm just making same small tests with the API.
Right now I have a problem using setPixels, it makes my app crash when I use it.
Here is the beginning of the onCreate :
Code:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fullscreen);
ImageView image = (ImageView) findViewById(R.id.sly);
Bitmap bMap = BitmapFactory.decodeResource(getResources(), R.drawable.pic793849);
final int bMapWidth = bMap.getWidth();
final int bMapHeight = bMap.getHeight();
int[] pixels = new int[bMapHeight*bMapWidth];
bMap.getPixels(pixels, 0, bMapWidth, 0, 0, bMapWidth, bMapHeight);
for(int i=0 ; i<bMapHeight; i++)
{
for(int j=0 ; j<bMapWidth; j++)
{
//pixels[ i + (j*bMapHeight)] ^= 77;
}
}
bMap.setPixels(pixels, 0, bMapWidth, 0, 0, bMapWidth, bMapHeight);
// image.setImageBitmap(bMap);
final View controlsView = findViewById(R.id.fullscreen_content_controls);
final View contentView = findViewById(R.id.fullscreen_content);
If I comment the setPixels line, the app runs fine, if I uncomment it, it crashed right away.
I don't get what I'm doing wrong, the bMap is allocated, the pixels too, I'm not out of bounds... any help would be appreciated !
here is the logCat :
06-12 10:25:19.770: W/ActivityThread(1074): Application com.example.moos is waiting for the debugger on port 8100...
06-12 10:25:19.810: I/System.out(1074): Sending WAIT chunk
06-12 10:25:20.280: I/dalvikvm(1074): Debugger is active
06-12 10:25:20.470: I/System.out(1074): Debugger has connected
06-12 10:25:20.480: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:20.690: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:20.890: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:21.090: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:21.290: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:21.500: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:21.700: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:21.900: I/System.out(1074): waiting for debugger to settle...
06-12 10:25:22.100: I/System.out(1074): debugger has settled (1363)
06-12 10:25:23.490: D/dalvikvm(1074): GC_FOR_ALLOC freed 37K, 4% free 3339K/3448K, paused 34ms, total 37ms
06-12 10:25:23.570: D/dalvikvm(1074): GC_FOR_ALLOC freed 36K, 4% free 3648K/3800K, paused 22ms, total 23ms
06-12 10:25:23.670: D/AndroidRuntime(1074): Shutting down VM
06-12 10:25:23.670: W/dalvikvm(1074): threadid=1: thread exiting with uncaught exception (group=0xb2aceba8)
06-12 10:25:23.760: E/AndroidRuntime(1074): FATAL EXCEPTION: main
06-12 10:25:23.760: E/AndroidRuntime(1074): Process: com.example.moos, PID: 1074
06-12 10:25:23.760: E/AndroidRuntime(1074): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.moos/com.example.moos.FullscreenActivity}: java.lang.IllegalStateException
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.ActivityThread.access$800(ActivityThread.java:135)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.os.Handler.dispatchMessage(Handler.java:102)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.os.Looper.loop(Looper.java:136)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.ActivityThread.main(ActivityThread.java:5017)
06-12 10:25:23.760: E/AndroidRuntime(1074): at java.lang.reflect.Method.invokeNative(Native Method)
06-12 10:25:23.760: E/AndroidRuntime(1074): at java.lang.reflect.Method.invoke(Method.java:515)
06-12 10:25:23.760: E/AndroidRuntime(1074): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-12 10:25:23.760: E/AndroidRuntime(1074): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-12 10:25:23.760: E/AndroidRuntime(1074): at dalvik.system.NativeStart.main(Native Method)
06-12 10:25:23.760: E/AndroidRuntime(1074): Caused by: java.lang.IllegalStateException
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.graphics.Bitmap.setPixels(Bitmap.java:1427)
06-12 10:25:23.760: E/AndroidRuntime(1074): at com.example.moos.FullscreenActivity.onCreate(FullscreenActivity.java:114)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.Activity.performCreate(Activity.java:5231)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
06-12 10:25:23.760: E/AndroidRuntime(1074): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
06-12 10:25:23.760: E/AndroidRuntime(1074): ... 11 more
Thanks in avance...
Caused by: IllegalStateException. http://developer.android.com/reference/android/graphics/Bitmap.html#setPixel(int, int, int) says: setPixel throws ISE
if the bitmap is not mutable. Conclusion: you need to make the bitmap mutable
Gesendet von meinem SM-N9005 mit Tapatalk
Thank you very much, it works.
I added those lines :
Code:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inMutable = true;
Bitmap bMap = BitmapFactory.decodeResource(getResources(), R.drawable.pic793849, options);
I have a strange problem that started recently where media I'm listening to/watching will randomly pause. It happens both when playing on my phone and when playing over bluetooth to my car or headphones. Sometimes it happens when my phone is sitting on the counter and I'm not touching it. I've had it happen in both Pocket Casts and Youtube Vanced, but those are the only two media apps I use regularly.
I was able to grab a logcat where I started a podcast and then it paused a second or two after it started. I've tried to read through it but I can't really make sense of it. Here are two sections I think might be relevant, but I'm not really sure what it means:
Code:
02-14 17:19:29.537 5612 5612 V MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
02-14 17:19:29.537 5612 5612 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
02-14 17:19:29.538 1119 2261 D NuPlayerDriver: reset(0xeab4a500) at state 4
02-14 17:19:29.539 1223 4542 I AS.AudioService: releasePlayer: 39 currentPackageName:com.android.chrome
02-14 17:19:29.539 1119 7508 W AMessage: failed to post message as target looper for handler 0 is gone.
02-14 17:19:29.539 1223 4542 I OpAudioMonitor: MDM,stop.
02-14 17:19:29.540 1119 7508 D NuPlayerDriver: notifyResetComplete(0xeab4a500)
and
Code:
02-14 17:19:32.091 3918 3918 D TouchInteractionService: onInputEvent# ev: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=614.0, y[0]=715.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=109664, downTime=109664, deviceId=6, source=0x1002, displayId=0 }
02-14 17:19:32.096 3918 3918 I Surface : opservice is null false
02-14 17:19:32.096 3894 3894 I Surface : opservice is null false
02-14 17:19:32.097 921 1000 I SurfaceFlinger: surface flinger receiver command 20001 .....
02-14 17:19:32.098 921 1000 I SurfaceFlinger: surface flinger receiver command 20001 .....
02-14 17:19:32.123 816 2840 I [email protected]_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE
02-14 17:19:32.159 4019 4019 D MediaBrowserCompat: Connecting to a MediaBrowserService.
02-14 17:19:32.162 566 566 E SELinux : avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1223 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
02-14 17:19:32.184 1223 4920 I MediaFocusControl: abandonAudioFocus() from uid/pid 10118/4019 [email protected][email protected]
02-14 17:19:32.197 566 566 E SELinux : avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1223 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
02-14 17:19:32.205 4019 14234 D AudioTrack: ClientUid 10118 AudioTrack::pause
02-14 17:19:32.207 1223 4920 I AS.AudioService: playerEvent: 63 event: 3 isMusicActive:true device:2 currentPackageName:au.com.shiftyjelly.pocketcasts
02-14 17:19:32.207 1223 4920 I OpAudioMonitor: MDM,stop.
02-14 17:19:32.207 1223 4920 I OpAudioMonitor: MDM,stop startTime:1581729563 endTime:1581729572
02-14 17:19:32.208 1223 4920 I OpAudioMonitor: MDM, playing,device:5 lapse:9
02-14 17:19:32.208 1223 4920 I OpAudioMonitor: MDM,device:2 lapse:9 packageName:au.com.shiftyjelly.pocketcasts
02-14 17:19:32.208 1223 4920 I OpAudioMonitor: MDM,stop remove start time for:au.com.shiftyjelly.pocketcasts
02-14 17:19:32.208 1223 1786 I OpAudioMonitor: logMdm run preserveOsData tag:audio_connect
I can't post a link to the full logcat because I'm a new user, but if anyone wants to look at it let me know.
If anyone has any ideas as to what would be causing this I'd love to hear!
Thanks!