-
Notifications
You must be signed in to change notification settings - Fork 914
Added Camera Fragment #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app crashing on this line.
Here is the log:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.checkPermission(java.lang.String, int, int)' on a null object reference
at android.support.v4.content.ContextCompat.checkSelfPermission(ContextCompat.java:453)
at vn.mbm.phimp.me.Camera2$2.onLocationChanged(Camera2.java:171)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:281)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:210)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:226)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
--------- beginning of main
This might be because of Context in checkSelfPermission. Look in to it and update code. 👍
e1e0258 to
c70b3ed
Compare
|
@pa1pal please check, I fixed the error. |
|
Pls resolve the conflicts @dynamitechetan |
|
All conflicts fixed |
|
@dynamitechetan adding Camera fragment is a good contribution and you did great job 👍 . |
|
I included a small library to implement runtime permissions to reduce the code. Is it not working fine? |
|
Can you pls see the failing tests and fix them |
|
Done. |
Replaced Camera2 activity with a fragment.