Open cgao97 opened 6 years ago
I think you should do ActivityName.class in there and not this.getClass().
Ideally, the addIgnoredActivity probably should get called in the application class, while setting up lollipin.
So if your activity is called MyActivity the you would do lockManager.getAppLock().addIgnoredActivity(MyActivity.class);
Hi guys, I got this message when I tried to add an ignored activity. Below is the code and error message.
LockManager lockManager = LockManager.getInstance(); lockManager.getAppLock().addIgnoredActivity(this.getClass());
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.omadahealth.lollipin.lib.managers.AppLock.addIgnoredActivity(java.lang.Class)' on a null object reference
Please help, thank you.