Zbar : startPreview failed in galaxy S3 - android

I have used ZBAR library to scan bar code in my Application.
And I got this error log while opening camera on Samsung Galaxy S3 :
java.lang.RuntimeException: startPreview failed
at android.hardware.Camera.startPreview(Native Method)
at com.SGID.MainApp.ScanningFragment.engageCamera(ScanningFragment.java:184)
at com.SGID.MainApp.ScanningFragment.access$10(ScanningFragment.java:154)
at com.SGID.MainApp.ScanningFragment$4.run(ScanningFragment.java:111)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.SGID.MainApp/com.SGID.MainApp.AllTabsActivity}
: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.SGID.MainApp.ParametersFragment.onCreateView(ParametersFragment.java:78)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1478)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1877)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1167)
at android.app.Activity.performStart(Activity.java:5216)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2073)
... 11 more
EDIT :
Getting error at this line :
CameraPreview mPreview = new CameraPreview(getActivity(), mCamera, previewCb,
autoFocusCB);
Can Anyone help me to resolve this error??
Thanks in advance..

Related

How to diplay image from firebase using only its name

FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference gsReference = storage.getReferenceFromUrl("gs://bacpoche-5ecb0.appspot.com/natio/agr-svt-2009-6-cr.jpg");
Glide.with(this )
.using(new FirebaseImageLoader())
.load(gsReference)
.into(t);
But it shows "Unfortunately YourApp has stopped".
I already have internet permission in manifest file. Below is the Error
The moniteur//E/
AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aitelred.redouane.tstv7/com.aitelred.redouane.tstv7.MainActivity}: java.lang.IllegalArgumentException: The supplied bucketname is not available to this project.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: The supplied bucketname is not available to this project.
at com.google.android.gms.common.internal.zzac.zzb(Unknown Source)
at com.google.firebase.storage.FirebaseStorage.zzz(Unknown Source)
at com.google.firebase.storage.FirebaseStorage.getReferenceFromUrl(Unknown Source)
at com.aitelred.redouane.tstv7.MainActivity.onCreate(MainActivity.java:49)
at android.app.Activity.performCreate(Activity.java:4466)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

App crashes when instantiating HelpStackSDK

We tried integrating HelpStack by following steps given on GitHub, but we kept getting the following errors:
04-03 13:54:22.054 4638-4638/com.playerline.android E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.playerline.android/com.tenmiles.helpstack.activities.HomeActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4448)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.tenmiles.helpstack.activities.HSActivityParent.onCreate(HSActivityParent.java:48)
at com.tenmiles.helpstack.activities.HomeActivity.onCreate(HomeActivity.java:46)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4448)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
I'm guessing it has something to do with the App Theme, which in our case is is Theme.AppCompat.NoActionBar.

Unable to start activity NullPointerException-onActivityCreated

My App crash rarely
i want to get off this bug for ever.
this is the log that users Report
i tried so long on this but nothing helps
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.xxx/com.xxx.xxx.Master_}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2072)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2097)
at android.app.ActivityThread.access$600(ActivityThread.java:136)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4787)
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:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.xxx.xxx.HomeFragment.onActivityCreated(HomeFragment.java:140)
at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1508)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:958)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1895)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:566)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1163)
at android.app.Activity.performStart(Activity.java:5018)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2045)
... 11 more

Android voice recording crashes (straight from Docs)

I've taken the code from Android's own Audio Capture documentation and ran it to achieve just what the docs say. As is, the code crashes when I click the "Start Recording" button and the crash says the following:
FATAL EXCEPTION: main
java.lang.IllegalStateException
at android.media.MediaRecorder.start(Native Method)
**at com.om.shout_o_meter.MainActivity.startRecording(MainActivity.java:130)
at com.om.shout_o_meter.MainActivity.onRecord(MainActivity.java:111)
at com.om.shout_o_meter.MainActivity.access$0(MainActivity.java:109)
at com.om.shout_o_meter.MainActivity$1.onClick(MainActivity.java:38)
at android.view.View.performClick(View.java:4211)
at android.view.View$PerformClick.run(View.java:17267)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
If I place AudioRecordTest() at the very beginning of the startRecording() method, the crash ceases until I finish the first recording and then press "Start Recording" again, the crash reappears with the following message:
FATAL EXCEPTION: main
java.lang.NullPointerException
at com.om.shout_o_meter.MainActivity.stopRecording(MainActivity.java:135)
at com.om.shout_o_meter.MainActivity.onRecord(MainActivity.java:113)
at com.om.shout_o_meter.MainActivity.access$0(MainActivity.java:109)
at com.om.shout_o_meter.MainActivity$1.onClick(MainActivity.java:38)
at android.view.View.performClick(View.java:4211)
at android.view.View$PerformClick.run(View.java:17267)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
The code I'm using is the exact same code as that of the docs (linked above), and the "MainActivity" file that the exception is pointing to can be found here: http://pastie.org/8682455
Any clue? what baffles me is that the code is pasted as is, straight from the docs, and still it fails..
Thanks

android error IllegalArgumentException

I can't find following error in my code. It looks like the problem is in the asynctask onpostexecute.
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:672)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:368)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:160)
at android.app.Dialog.dismissDialog(Dialog.java:319)
at android.app.Dialog.dismiss(Dialog.java:302)
at www.mobilezar.mn.Advertisements$InitialLoading.onPostExecute(Advertisements.java:216)
at www.mobilezar.mn.Advertisements$InitialLoading.onPostExecute(Advertisements.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)

Categories

Resources