Comments (8)
Hi, are you requesting SMS permission with simple_permissions?
from flutter_sms.
@babariviere - nope, I'm just trying to get READ/WRITE access to external storage.
from flutter_sms.
Do you have any log?
from flutter_sms.
Sure, I'll fire that branch back up now
from flutter_sms.
So, what's interesting is that when I implemented simple_permissions, I'd already allowed the sms
permissions so they were saved for the app and it didn't ask again; my live-reloads and even full launches of the app were fine until I uninstalled the app entirely and sms
needed to request perms again.
At this point, the app boots OK, and then sms
requests permissions and the android native dialog appears asking for access to phone - when I click allow, the app crashes with the following (notice it's actually simple_permissions
crashing even though that code hasn't been called directly yet):
[{"event":"app.started","params":{"appId":"59ea5f7b-2c74-4fd1-818e-26fed2f76323"}}]
[ +40 ms] I/SimplePermission(23176): Requesting permission status : 0
[ ] D/AndroidRuntime(23176): Shutting down VM
[ ] E/AndroidRuntime(23176): FATAL EXCEPTION: main
[ ] E/AndroidRuntime(23176): Process: com.example.app.host, PID: 23176
[ ] E/AndroidRuntime(23176): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=6, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.example.app.host/com.example.app.host.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference
[ ] E/AndroidRuntime(23176): at android.app.ActivityThread.deliverResults(ActivityThread.java:4360)
[ ] E/AndroidRuntime(23176): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402)
[ ] E/AndroidRuntime(23176): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
[ ] E/AndroidRuntime(23176): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
[ ] E/AndroidRuntime(23176): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
[ ] E/AndroidRuntime(23176): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
[ ] E/AndroidRuntime(23176): at android.os.Handler.dispatchMessage(Handler.java:106)
[ ] E/AndroidRuntime(23176): at android.os.Looper.loop(Looper.java:193)
[ ] E/AndroidRuntime(23176): at android.app.ActivityThread.main(ActivityThread.java:6669)
[ ] E/AndroidRuntime(23176): at java.lang.reflect.Method.invoke(Native Method)
[ ] E/AndroidRuntime(23176): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
[ ] E/AndroidRuntime(23176): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
[ ] E/AndroidRuntime(23176): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference
[ ] E/AndroidRuntime(23176): at com.ethras.simplepermissions.SimplePermissionsPlugin.onRequestPermissionsResult(SimplePermissionsPlugin.java:172)
[ ] E/AndroidRuntime(23176): at io.flutter.app.FlutterPluginRegistry.onRequestPermissionsResult(FlutterPluginRegistry.java:191)
[ ] E/AndroidRuntime(23176): at io.flutter.app.FlutterActivityDelegate.onRequestPermissionsResult(FlutterActivityDelegate.java:125)
[ ] E/AndroidRuntime(23176): at io.flutter.app.FlutterActivity.onRequestPermissionsResult(FlutterActivity.java:133)
[ ] E/AndroidRuntime(23176): at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7608)
[ ] E/AndroidRuntime(23176): at android.app.Activity.dispatchActivityResult(Activity.java:7458)
[ ] E/AndroidRuntime(23176): at android.app.ActivityThread.deliverResults(ActivityThread.java:4353)
[ ] E/AndroidRuntime(23176): ... 11 more
[ +30 ms] I/Process (23176): Sending signal. PID: 23176 SIG: 9
from flutter_sms.
I'm thinking the sms
plugin's native code is overwriting the simple_permissions
channel perhaps?
from flutter_sms.
Yes I think as we have 2 different listener for permission, it cannot choose which one to use
from flutter_sms.
I wonder how much work it would be to make use of simple permissions to request permissions in sms
to avoid a conflict
from flutter_sms.
Related Issues (20)
- What about dual sim android if I want to send message from selected sim... HOT 5
- how to listen and read a futur sms HOT 12
- logo design contribution HOT 16
- Contact lookup appears to be failing (maybe just on M+?) HOT 3
- Error when trying to send message with no money on account HOT 4
- Send SMS Permisson Error HOT 10
- Complete rewrite in Kotlin HOT 4
- toString is not getting called on error objects present in print statement HOT 3
- Can this library create arbitrary SMS messages? HOT 35
- Update for Dart 2. HOT 1
- "Sent" messages are not being saved to phone when written directly [feature/smsdb] HOT 6
- We need integration tests
- Potential compatibility issues. HOT 6
- SMS deletion HOT 15
- Cannot send using 2nd sim slot HOT 6
- How to determine if message failed in sending? HOT 4
- First access error HOT 1
- Need update the plugin to dart sdk 2.1 HOT 5
- SMS is sent but it's not stored in the Database HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_sms.