I have a few issues I'd like to share with you guys.
First one concerns the error that's in the title. FirstRun.java:82
refers to alert.show();
and FirstRun.java:63
to alertDialog.show();
The behaviour I'm observing goes as:
- The first alertDialog appears for a few seconds
- The application closes (not a force close)
- When I start to reboot the app, a blank screen is displayed (see following issues), meaning that my second activity is running. I'm using SharedPrefs to see whether or not one activity should be launched.
Complete logcat:
32444-32444/carpedujourproductions.quickpronote E/WindowManager: Activity carpedujourproductions.quickpronote.FirstRun has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{967f7300 V.E..... R.....ID 0,0-729,594} that was originally added here
android.view.WindowLeaked: Activity carpedujourproductions.quickpronote.FirstRun has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{967f7300 V.E..... R.....ID 0,0-729,594} that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:345)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:239)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.Dialog.show(Dialog.java:281)
at carpedujourproductions.quickpronote.FirstRun.onCreate(FirstRun.java:63)
at android.app.Activity.performCreate(Activity.java:5207)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2281)
at android.app.ActivityThread.access$600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1263)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5124)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:110)
at dalvik.system.NativeStart.main(Native Method)
32444-32444/carpedujourproductions.quickpronote E/WindowManager: Activity carpedujourproductions.quickpronote.FirstRun has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{968738b8 V.E..... R......D 0,0-729,585} that was originally added here
android.view.WindowLeaked: Activity carpedujourproductions.quickpronote.FirstRun has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{968738b8 V.E..... R......D 0,0-729,585} that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:345)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:239)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.Dialog.show(Dialog.java:281)
at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
at carpedujourproductions.quickpronote.FirstRun.onCreate(FirstRun.java:82)
at android.app.Activity.performCreate(Activity.java:5207)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2281)
at android.app.ActivityThread.access$600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1263)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5124)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:110)
at dalvik.system.NativeStart.main(Native Method)
Another thing:
SharedPrefs are doing strange things to me. After launching the app the first time, settings seem to have been saved and a (non-empty) file exists in /data/data/carpedujourproductions.quickpronote/shared_prefs/
though it can't be read by any of my root file explorers (ES; Solid)
Lastly:
I'm having a bit of a trouble to handle conditions. If you look at my MainActivity.java
, Android Studio tells me the strings urlt
& url
are never used. How could I write them so that they would follow the order that is displayed on the file? (read etab_sel
--> determine and write value to urlt
--> read user_is
--> determine and write value to url
--> execute JS code with url
as one of the variable.
BIG BIG thanks to anyone who can provide answsers on any of these. The three may be related somehow though.