expo-cellular 4.2.0 β 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### π‘ Others
|
|
12
12
|
|
|
13
|
+
## 4.3.0 β 2022-07-07
|
|
14
|
+
|
|
15
|
+
### π‘ Others
|
|
16
|
+
|
|
17
|
+
- Migrated Expo modules definitions to the new naming convention. ([#17193](https://github.com/expo/expo/pull/17193) by [@tsapeta](https://github.com/tsapeta))
|
|
18
|
+
|
|
13
19
|
## 4.2.0 β 2022-04-18
|
|
14
20
|
|
|
15
21
|
### β οΈ Notices
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '4.
|
|
6
|
+
version = '4.3.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -74,7 +74,7 @@ android {
|
|
|
74
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
75
75
|
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
76
76
|
versionCode 11
|
|
77
|
-
versionName '4.
|
|
77
|
+
versionName '4.3.0'
|
|
78
78
|
}
|
|
79
79
|
lintOptions {
|
|
80
80
|
abortOnError false
|
|
@@ -13,8 +13,8 @@ const val moduleName = "ExpoCellular"
|
|
|
13
13
|
|
|
14
14
|
class CellularModule : Module() {
|
|
15
15
|
override fun definition() = ModuleDefinition {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Name(moduleName)
|
|
17
|
+
Constants {
|
|
18
18
|
val telephonyManager = telephonyManager()
|
|
19
19
|
mapOf(
|
|
20
20
|
"allowsVoip" to SipManager.isVoipSupported(context),
|
|
@@ -25,7 +25,7 @@ class CellularModule : Module() {
|
|
|
25
25
|
)
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
AsyncFunction("getCellularGenerationAsync") {
|
|
29
29
|
try {
|
|
30
30
|
getCurrentGeneration()
|
|
31
31
|
} catch (e: SecurityException) {
|
|
@@ -34,23 +34,23 @@ class CellularModule : Module() {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
AsyncFunction("allowsVoipAsync") {
|
|
38
38
|
SipManager.isVoipSupported(context)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
AsyncFunction("getIsoCountryCodeAsync") {
|
|
42
42
|
telephonyManager()?.simCountryIso
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
AsyncFunction("getCarrierNameAsync") {
|
|
46
46
|
telephonyManager()?.simOperatorName
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
AsyncFunction("getMobileCountryCodeAsync") {
|
|
50
50
|
telephonyManager()?.simOperator?.substring(0, 3)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
AsyncFunction("getMobileNetworkCodeAsync") {
|
|
54
54
|
telephonyManager()?.simOperator?.substring(3)
|
|
55
55
|
}
|
|
56
56
|
}
|
package/ios/CellularModule.swift
CHANGED
|
@@ -3,33 +3,33 @@ import ExpoModulesCore
|
|
|
3
3
|
|
|
4
4
|
public class CellularModule: Module {
|
|
5
5
|
public func definition() -> ModuleDefinition {
|
|
6
|
-
|
|
6
|
+
Name("ExpoCellular")
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Constants {
|
|
9
9
|
Self.getCurrentCellularInfo()
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
AsyncFunction("getCellularGenerationAsync") { () -> Int in
|
|
13
13
|
Self.currentCellularGeneration().rawValue
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
AsyncFunction("allowsVoipAsync") { () -> Bool? in
|
|
17
17
|
Self.currentCarrier()?.allowsVOIP
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
AsyncFunction("getIsoCountryCodeAsync") { () -> String? in
|
|
21
21
|
Self.currentCarrier()?.isoCountryCode
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
AsyncFunction("getCarrierNameAsync") { () -> String? in
|
|
25
25
|
Self.currentCarrier()?.carrierName
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
AsyncFunction("getMobileCountryCodeAsync") { () -> String? in
|
|
29
29
|
Self.currentCarrier()?.mobileCountryCode
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
AsyncFunction("getMobileNetworkCodeAsync") { () -> String? in
|
|
33
33
|
Self.currentCarrier()?.mobileNetworkCode
|
|
34
34
|
}
|
|
35
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-cellular",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Provides information about the userβs cellular service provider",
|
|
5
5
|
"main": "build/Cellular.js",
|
|
6
6
|
"types": "build/Cellular.d.ts",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"expo": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "e893ff2b01e108cf246cec02318c0df9d6bc603c"
|
|
40
40
|
}
|
package/tsconfig.json
CHANGED