cubeacon / android-cubeacon-sample

Android Cubeacon Sample Project
12 stars 10 forks source link

Need to invoke getDataBackground #15

Open prabowo24 opened 8 years ago

prabowo24 commented 8 years ago

Hi,

i have problem with sdk which is always asking to invoke getDataBackground() in CBApp. i have following the guide but seems the trouble is still there.

here the error from the android monitor. 07-03 18:04:36.250 15487-15487/com.mapmall.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mapmall.app, PID: 15487 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mapmall.app/com.mapmall.app.TutorialTwo}: java.lang.IllegalStateException: Invoke CBApp#newInstance()#getDataInBackground() first before scanning! at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5292) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Invoke CBApp#newInstance()#getDataInBackground() first before scanning! at com.eyro.cubeacon.CBApp.createService(CBApp.java:384) at com.eyro.cubeacon.activity.CBAppCompatActivity.onCreate(CBAppCompatActivity.java:24) at com.mapmall.app.TutorialTwo.onCreate(TutorialTwo.java:15) at android.app.Activity.performCreate(Activity.java:5264) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)  at android.app.ActivityThread.access$800(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5292)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)  at dalvik.system.NativeStart.main(Native Method) 

alann-maulana commented 8 years ago

Hi @prabowo24,

By seeing adb log message, you must Invoke CBApp#newInstance()#getDataInBackground() first before scanning!. You can check at sample project file that implement getDataInBackground within splash screen.

Regards.

scarings commented 8 years ago

not working, i download this project and get same error.