Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
71482400
Unverified
Commit
71482400
authored
May 21, 2019
by
Sebastian Roth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup iOS version for phone service status & document.
parent
d06ed39e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ios/Classes/strategies/PhonePermissionStrategy.m
+0
-6
lib/src/permission_handler.dart
+8
-1
No files found.
ios/Classes/strategies/PhonePermissionStrategy.m
View file @
71482400
...
...
@@ -36,8 +36,6 @@
* Returns YES if the device can place a phone call
*/
// Check if the device can place a phone call
if
([[
UIApplication
sharedApplication
]
canOpenURL
:[
NSURL
URLWithString
:
@"tel://"
]])
{
// Device supports phone calls, lets confirm it can place one right now
CTTelephonyNetworkInfo
*
netInfo
=
[[
CTTelephonyNetworkInfo
alloc
]
init
];
CTCarrier
*
carrier
=
[
netInfo
subscriberCellularProvider
];
...
...
@@ -49,10 +47,6 @@
// Device can place a phone call
return
YES
;
}
}
else
{
// Device does not support phone calls
return
NO
;
}
}
@end
lib/src/permission_handler.dart
View file @
71482400
...
...
@@ -42,13 +42,20 @@ class PermissionHandler {
/// Returns a [Future] containing the current service status for the supplied [PermissionGroup].
///
/// Notes about specific PermissionGroups:
/// - **PermissionGroup.phone** on Android:
/// - **PermissionGroup.phone**
/// - Android:
/// - The method will return [ServiceStatus.notApplicable] when:
/// 1. the device lacks the TELEPHONY feature
/// 1. TelephonyManager.getPhoneType() returns PHONE_TYPE_NONE
/// 1. when no Intents can be resolved to handle the `tel:` scheme
/// - The method will return [ServiceStatus.disabled] when:
/// 1. the SIM card is missing
/// - iOS:
/// - The method will return [ServiceStatus.notApplicable] when:
/// 1. the native code can not find a handler for the `tel:` scheme
/// - The method will return [ServiceStatus.disabled] when:
/// 1. the mobile network code (MNC) is either 0 or 65535. See
/// https://stackoverflow.com/a/11595365 for details
/// - **PLEASE NOTE that this is still not a perfect indication** of the
/// devices' capability to place & connect phone calls
/// as it also depends on the network condition.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment