Comments (1)
In Android applications (API version> 23) you can not request more than one set of permissions at a time, you can request one or more permissions, but only in the same request. In a 'Flutter' application when you have multiple 'Channels' to communicate with the platform code, and those 'Channels' request different sets of permissions, they will request everything at the same time, and that's when the error is thrown.
We have two options to handle it:
1- When the 'flutter_sms' package is loaded for the first time, we could request all the permissions that we will need, even if not all the functionalities of the package are required, or:
2- Putting in a queue all the permission requests and execute them one by one as they are required.
My approach was the second one. Now the app doesn't crash when requesting permissions to the user.
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
- Seems to conflict with flutter_simple_permissions HOT 8
- 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.