Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Add runtime permission to allow write_settings permission #238

Open
shobhitagarwal1612 opened this issue Apr 4, 2019 · 9 comments · May be fixed by #332
Open

Add runtime permission to allow write_settings permission #238

shobhitagarwal1612 opened this issue Apr 4, 2019 · 9 comments · May be fixed by #332
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@shobhitagarwal1612
Copy link
Contributor

Software and hardware versions

Android 6.0.1

Problem description

My guess is that this is a regression caused while adding runtime permissions.

Steps to reproduce the problem

Attempt to send a form in Android 6.0

Expected behavior

A prompt should appear to allow the write settings permissions when the below method is attempted to call

Other information

04-04 22:00:28.950 16350-16350/org.odk.share E/WifiHospotConnector: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at org.odk.share.network.WifiHospotConnector.toggleHotspot(WifiHospotConnector.java:139)
        at org.odk.share.network.WifiHospotConnector.enableHotspot(WifiHospotConnector.java:129)
        at org.odk.share.activities.SendActivity.initiateHotspot(SendActivity.java:196)
        at org.odk.share.activities.SendActivity.startHotspot(SendActivity.java:165)
        at org.odk.share.activities.SendActivity.toggleHotspot(SendActivity.java:493)
        at org.odk.share.activities.SendActivity.checkLocationPermission(SendActivity.java:466)
        at org.odk.share.activities.SendActivity.onResume(SendActivity.java:305)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259)
        at android.app.Activity.performResume(Activity.java:6361)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
        at android.app.ActivityThread.access$900(ActivityThread.java:150)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.SecurityException: org.odk.share was not granted  this permission: android.permission.WRITE_SETTINGS.
        at android.os.Parcel.readException(Parcel.java:1620)
        at android.os.Parcel.readException(Parcel.java:1573)
        at android.net.wifi.IWifiManager$Stub$Proxy.setWifiApEnabled(IWifiManager.java:1456)
        at android.net.wifi.WifiManager.setWifiApEnabled(WifiManager.java:1543)
        at java.lang.reflect.Method.invoke(Native Method) 
        at org.odk.share.network.WifiHospotConnector.toggleHotspot(WifiHospotConnector.java:139) 
        at org.odk.share.network.WifiHospotConnector.enableHotspot(WifiHospotConnector.java:129) 
        at org.odk.share.activities.SendActivity.initiateHotspot(SendActivity.java:196) 
        at org.odk.share.activities.SendActivity.startHotspot(SendActivity.java:165) 
        at org.odk.share.activities.SendActivity.toggleHotspot(SendActivity.java:493) 
        at org.odk.share.activities.SendActivity.checkLocationPermission(SendActivity.java:466) 
        at org.odk.share.activities.SendActivity.onResume(SendActivity.java:305) 
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259) 
        at android.app.Activity.performResume(Activity.java:6361) 
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092) 
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481) 
        at android.app.ActivityThread.access$900(ActivityThread.java:150) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:148) 
        at android.app.ActivityThread.main(ActivityThread.java:5417) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
@shobhitagarwal1612 shobhitagarwal1612 added bug Something isn't working good first issue Good for newcomers labels Apr 4, 2019
@SaumiaSinghal
Copy link
Contributor

Hie @shobhitagarwal1612! I would like to work on this issue.

@SaumiaSinghal
Copy link
Contributor

@opendatakit-bot claim

@getodk-bot
Copy link
Member

Welcome to Open Data Kit, @SaumiaSinghal! We just sent you an invite to collaborate on this repository at https://github.com/opendatakit/skunkworks-crow/invitations. Please accept this invite in order to claim this issue and begin a fun and rewarding experience contributing to Open Data Kit!

Here are some tips to get you off to a good start:

  • Please read the README.md and CONTRIBUTING.md in this repo. Those two documents have much of what you need to get started.
  • Join the ODK developer Slack to get help, chat about this issue, and meet the other developers.
  • Sign up and introduce yourself on the ODK community forum to meet the broader ODK community.

See you on the other side (that is, the pull request side)!

@getodk-bot
Copy link
Member

getodk-bot commented Jan 23, 2020

Hello @SaumiaSinghal, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 15 days.

You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@virajpatel2411
Copy link

@opendatakit-bot claim

@getodk-bot
Copy link
Member

Welcome to Open Data Kit, @virajpatel2411! We just sent you an invite to collaborate on this repository at https://github.com/opendatakit/skunkworks-crow/invitations. Please accept this invite in order to claim this issue and begin a fun and rewarding experience contributing to Open Data Kit!

Here are some tips to get you off to a good start:

  • Please read the README.md and CONTRIBUTING.md in this repo. Those two documents have much of what you need to get started.
  • Join the ODK developer Slack to get help, chat about this issue, and meet the other developers.
  • Sign up and introduce yourself on the ODK community forum to meet the broader ODK community.

See you on the other side (that is, the pull request side)!

@SaumiaSinghal
Copy link
Contributor

Hie @virajpatel2411! I have worked on this issue and submitted a PR for the same. I am waiting a review from the maintainers. Would you mind working on other issue? Thanks!

@virajpatel2411
Copy link

Okayy. I thought you were unassigned.

@getodk-bot
Copy link
Member

getodk-bot commented Mar 9, 2020

Hello @virajpatel2411, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 15 days.

You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants