@iternio/react-native-auto-play 0.2.0-alpha.3 → 0.2.0-alpha.6
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/android/build.gradle +2 -2
- package/android/src/automotive/AndroidManifest.xml +2 -0
- package/android/src/automotive/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidAutomotive.kt +22 -27
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/SignInWithGoogleActivity.kt +57 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/SignInTemplate.kt +58 -3
- package/android/src/main/res/drawable/google.xml +18 -0
- package/lib/types/SignInMethod.d.ts +18 -2
- package/lib/types/SignInMethod.js +1 -1
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
- package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp +79 -0
- package/nitrogen/generated/android/c++/JGoogleSignIn.hpp +85 -0
- package/nitrogen/generated/android/c++/JGoogleSignInAccount.hpp +86 -0
- package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +10 -1
- package/nitrogen/generated/android/c++/JSignInMethods.hpp +3 -3
- package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +10 -5
- package/nitrogen/generated/android/c++/JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.cpp +34 -0
- package/nitrogen/generated/android/c++/{JVariant_QrSignIn_PinSignIn_InputSignIn.hpp → JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp} +40 -20
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GoogleSignIn.kt +51 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GoogleSignInAccount.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/SignInMethods.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/SignInTemplateConfig.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_QrSignIn_PinSignIn_InputSignIn.kt → Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.kt} +23 -10
- package/nitrogen/generated/shared/c++/GoogleSignIn.hpp +102 -0
- package/nitrogen/generated/shared/c++/GoogleSignInAccount.hpp +112 -0
- package/nitrogen/generated/shared/c++/SignInMethods.hpp +1 -1
- package/nitrogen/generated/shared/c++/SignInTemplateConfig.hpp +8 -5
- package/package.json +1 -1
- package/src/types/SignInMethod.ts +20 -2
- package/nitrogen/generated/android/c++/JVariant_QrSignIn_PinSignIn_InputSignIn.cpp +0 -30
package/android/build.gradle
CHANGED
|
@@ -163,7 +163,7 @@ dependencies {
|
|
|
163
163
|
implementation "androidx.car.app:app-projected:1.7.0"
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
implementation 'com.google.android.gms:play-services-base:18.
|
|
167
|
-
implementation 'com.google.android.gms:play-services-auth:21.
|
|
166
|
+
implementation 'com.google.android.gms:play-services-base:18.10.0'
|
|
167
|
+
implementation 'com.google.android.gms:play-services-auth:21.5.0'
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -75,6 +75,8 @@
|
|
|
75
75
|
|
|
76
76
|
<service android:name="com.margelo.nitro.swe.iternio.reactnativeautoplay.HeadlessTaskService" />
|
|
77
77
|
|
|
78
|
+
<activity android:name="com.margelo.nitro.swe.iternio.reactnativeautoplay.SignInWithGoogleActivity" />
|
|
79
|
+
|
|
78
80
|
<provider
|
|
79
81
|
android:name="com.margelo.nitro.swe.iternio.reactnativeautoplay.ActivityRenderStateProvider"
|
|
80
82
|
android:authorities="${applicationId}.ActivityRenderStateProvider"
|
|
@@ -7,39 +7,33 @@ import android.car.CarAppFocusManager.OnAppFocusOwnershipCallback
|
|
|
7
7
|
import android.car.drivingstate.CarUxRestrictionsManager
|
|
8
8
|
import com.margelo.nitro.NitroModules
|
|
9
9
|
import java.util.concurrent.CopyOnWriteArrayList
|
|
10
|
+
import java.util.concurrent.atomic.AtomicReference
|
|
10
11
|
|
|
11
12
|
class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
private fun getCar(): Car {
|
|
15
|
-
if (!this::car.isInitialized) {
|
|
16
|
-
car = Car.createCar(NitroModules.applicationContext)
|
|
17
|
-
}
|
|
18
|
-
return car
|
|
19
|
-
}
|
|
13
|
+
private val car = Car.createCar(NitroModules.applicationContext)
|
|
20
14
|
|
|
21
15
|
private val onAppFocusOwnershipCallback = object : OnAppFocusOwnershipCallback {
|
|
22
16
|
override fun onAppFocusOwnershipGranted(appType: Int) {
|
|
23
|
-
isFocusOwned
|
|
17
|
+
isFocusOwned.set(true)
|
|
24
18
|
notifyAppFocusListeners()
|
|
25
19
|
}
|
|
26
20
|
|
|
27
21
|
override fun onAppFocusOwnershipLost(appType: Int) {
|
|
28
|
-
isFocusOwned
|
|
22
|
+
isFocusOwned.set(false)
|
|
29
23
|
notifyAppFocusListeners()
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
private val onAppFocusChangedListener = OnAppFocusChangedListener { appType, active ->
|
|
34
|
-
isFocusActive
|
|
28
|
+
isFocusActive.set(active)
|
|
35
29
|
|
|
36
|
-
val carAppFocusManager =
|
|
37
|
-
getCar().getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
30
|
+
val carAppFocusManager = car.getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
38
31
|
// docs say we should not get an event when we receive our own app focus
|
|
39
32
|
// but we still do get it. so we do a check here again if we own it or not
|
|
40
|
-
|
|
33
|
+
val isOwned = carAppFocusManager.isOwningFocus(
|
|
41
34
|
onAppFocusOwnershipCallback, appType
|
|
42
35
|
)
|
|
36
|
+
isFocusOwned.set(isOwned)
|
|
43
37
|
|
|
44
38
|
notifyAppFocusListeners()
|
|
45
39
|
}
|
|
@@ -47,7 +41,7 @@ class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
|
47
41
|
override fun registerCarUxRestrictionsListener(callback: (restrictions: ActiveCarUxRestrictions) -> Unit): () -> Unit {
|
|
48
42
|
if (uxRestrictionListeners.isEmpty()) {
|
|
49
43
|
val uxRestrictionManager =
|
|
50
|
-
|
|
44
|
+
car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE) as CarUxRestrictionsManager
|
|
51
45
|
|
|
52
46
|
uxRestrictionManager.registerListener {
|
|
53
47
|
notifyUxRestrictionListeners(it.toActiveCarUxRestrictions())
|
|
@@ -61,7 +55,7 @@ class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
|
61
55
|
|
|
62
56
|
if (uxRestrictionListeners.isEmpty()) {
|
|
63
57
|
val uxRestrictionManager =
|
|
64
|
-
|
|
58
|
+
car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE) as CarUxRestrictionsManager
|
|
65
59
|
|
|
66
60
|
uxRestrictionManager.unregisterListener()
|
|
67
61
|
}
|
|
@@ -70,15 +64,14 @@ class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
|
70
64
|
|
|
71
65
|
override fun getCarUxRestrictions(): ActiveCarUxRestrictions {
|
|
72
66
|
val uxRestrictionManager =
|
|
73
|
-
|
|
67
|
+
car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE) as CarUxRestrictionsManager
|
|
74
68
|
|
|
75
69
|
return uxRestrictionManager.currentCarUxRestrictions.toActiveCarUxRestrictions()
|
|
76
70
|
}
|
|
77
71
|
|
|
78
72
|
override fun registerAppFocusListener(callback: (state: AppFocusState) -> Unit): () -> Unit {
|
|
79
73
|
if (appFocusListeners.isEmpty()) {
|
|
80
|
-
val carAppFocusManager =
|
|
81
|
-
getCar().getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
74
|
+
val carAppFocusManager = car.getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
82
75
|
|
|
83
76
|
carAppFocusManager.addFocusListener(
|
|
84
77
|
onAppFocusChangedListener, CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION
|
|
@@ -92,7 +85,7 @@ class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
|
92
85
|
|
|
93
86
|
if (appFocusListeners.isEmpty()) {
|
|
94
87
|
val carAppFocusManager =
|
|
95
|
-
|
|
88
|
+
car.getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
96
89
|
|
|
97
90
|
carAppFocusManager.removeFocusListener(
|
|
98
91
|
onAppFocusChangedListener, CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION
|
|
@@ -102,16 +95,18 @@ class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
|
102
95
|
}
|
|
103
96
|
|
|
104
97
|
override fun getAppFocusState(): AppFocusState {
|
|
105
|
-
val carAppFocusManager =
|
|
106
|
-
|
|
98
|
+
val carAppFocusManager = car.getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
99
|
+
val isOwned = carAppFocusManager.isOwningFocus(
|
|
107
100
|
onAppFocusOwnershipCallback, CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION
|
|
108
101
|
)
|
|
109
102
|
|
|
110
|
-
|
|
103
|
+
isFocusOwned.set(isOwned)
|
|
104
|
+
|
|
105
|
+
return AppFocusState(isOwned, isFocusActive.get())
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
override fun requestAppFocus(): () -> Unit {
|
|
114
|
-
val carAppFocusManager =
|
|
109
|
+
val carAppFocusManager = car.getCarManager(Car.APP_FOCUS_SERVICE) as CarAppFocusManager
|
|
115
110
|
carAppFocusManager.requestAppFocus(
|
|
116
111
|
CarAppFocusManager.APP_FOCUS_TYPE_NAVIGATION, onAppFocusOwnershipCallback
|
|
117
112
|
)
|
|
@@ -124,15 +119,15 @@ class HybridAndroidAutomotive : HybridAndroidAutomotiveSpec() {
|
|
|
124
119
|
}
|
|
125
120
|
|
|
126
121
|
companion object {
|
|
127
|
-
private var isFocusOwned
|
|
128
|
-
private var isFocusActive
|
|
122
|
+
private var isFocusOwned = AtomicReference<Boolean?>(null)
|
|
123
|
+
private var isFocusActive = AtomicReference<Boolean?>(null)
|
|
129
124
|
|
|
130
125
|
private val uxRestrictionListeners =
|
|
131
126
|
CopyOnWriteArrayList<(ActiveCarUxRestrictions) -> Unit>()
|
|
132
127
|
private val appFocusListeners = CopyOnWriteArrayList<(AppFocusState) -> Unit>()
|
|
133
128
|
|
|
134
129
|
private fun notifyAppFocusListeners() {
|
|
135
|
-
val state = AppFocusState(isFocusOwned, isFocusActive)
|
|
130
|
+
val state = AppFocusState(isFocusOwned.get(), isFocusActive.get())
|
|
136
131
|
|
|
137
132
|
appFocusListeners.forEach {
|
|
138
133
|
it(state)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
package com.margelo.nitro.swe.iternio.reactnativeautoplay
|
|
2
|
+
|
|
3
|
+
import android.os.Binder
|
|
4
|
+
import android.os.Bundle
|
|
5
|
+
import android.os.IBinder
|
|
6
|
+
import androidx.activity.ComponentActivity
|
|
7
|
+
import androidx.activity.result.ActivityResult
|
|
8
|
+
import androidx.activity.result.contract.ActivityResultContracts
|
|
9
|
+
import com.google.android.gms.auth.api.signin.GoogleSignIn
|
|
10
|
+
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
|
|
11
|
+
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
|
|
12
|
+
import java.security.InvalidParameterException
|
|
13
|
+
import javax.annotation.Nullable
|
|
14
|
+
|
|
15
|
+
class SignInWithGoogleActivity : ComponentActivity() {
|
|
16
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
|
17
|
+
super.onCreate(savedInstanceState)
|
|
18
|
+
|
|
19
|
+
val signInCompleteCallback = intent.extras?.getBinder(BINDER_KEY) as OnSignInComplete?
|
|
20
|
+
|
|
21
|
+
val serverClientId = intent.extras?.getString("serverClientId")
|
|
22
|
+
?: throw InvalidParameterException("missing serverClientId parameter")
|
|
23
|
+
|
|
24
|
+
val activityResultLauncher = registerForActivityResult(
|
|
25
|
+
ActivityResultContracts.StartActivityForResult()
|
|
26
|
+
) { result: ActivityResult ->
|
|
27
|
+
val account = GoogleSignIn.getSignedInAccountFromIntent(
|
|
28
|
+
result.data
|
|
29
|
+
).result
|
|
30
|
+
signInCompleteCallback?.onSignInComplete(account)
|
|
31
|
+
finish()
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
val googleSignInClient = GoogleSignIn.getClient(
|
|
35
|
+
this,
|
|
36
|
+
GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
|
|
37
|
+
.requestServerAuthCode(serverClientId).requestEmail().build()
|
|
38
|
+
)
|
|
39
|
+
activityResultLauncher.launch(googleSignInClient.signInIntent)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Binder callback to provide to the sign in activity.
|
|
44
|
+
*/
|
|
45
|
+
abstract class OnSignInComplete : Binder(), IBinder {
|
|
46
|
+
/**
|
|
47
|
+
* Notifies that sign in flow completed.
|
|
48
|
+
*
|
|
49
|
+
* @param account the account signed in or `null` if there were issues signing in.
|
|
50
|
+
*/
|
|
51
|
+
abstract fun onSignInComplete(@Nullable account: GoogleSignInAccount?)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
const val BINDER_KEY = "SignInWithGoogleActivity"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
package com.margelo.nitro.swe.iternio.reactnativeautoplay.template
|
|
2
2
|
|
|
3
|
+
import android.content.Intent
|
|
3
4
|
import android.net.Uri
|
|
5
|
+
import android.os.Bundle
|
|
4
6
|
import androidx.car.app.CarContext
|
|
7
|
+
import androidx.car.app.model.Action
|
|
5
8
|
import androidx.car.app.model.ActionStrip
|
|
9
|
+
import androidx.car.app.model.CarIcon
|
|
6
10
|
import androidx.car.app.model.InputCallback
|
|
11
|
+
import androidx.car.app.model.ParkedOnlyOnClickListener
|
|
7
12
|
import androidx.car.app.model.Template
|
|
8
13
|
import androidx.car.app.model.signin.InputSignInMethod
|
|
9
14
|
import androidx.car.app.model.signin.InputSignInMethod.INPUT_TYPE_DEFAULT
|
|
10
15
|
import androidx.car.app.model.signin.InputSignInMethod.INPUT_TYPE_PASSWORD
|
|
11
16
|
import androidx.car.app.model.signin.PinSignInMethod
|
|
17
|
+
import androidx.car.app.model.signin.ProviderSignInMethod
|
|
12
18
|
import androidx.car.app.model.signin.QRCodeSignInMethod
|
|
13
19
|
import androidx.car.app.model.signin.SignInTemplate
|
|
20
|
+
import androidx.core.graphics.drawable.IconCompat
|
|
21
|
+
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
|
|
14
22
|
import com.margelo.nitro.swe.iternio.reactnativeautoplay.KeyboardType
|
|
15
23
|
import com.margelo.nitro.swe.iternio.reactnativeautoplay.NitroAction
|
|
16
24
|
import com.margelo.nitro.swe.iternio.reactnativeautoplay.NitroActionType
|
|
25
|
+
import com.margelo.nitro.swe.iternio.reactnativeautoplay.R
|
|
17
26
|
import com.margelo.nitro.swe.iternio.reactnativeautoplay.SignInTemplateConfig
|
|
27
|
+
import com.margelo.nitro.swe.iternio.reactnativeautoplay.SignInWithGoogleActivity
|
|
18
28
|
import com.margelo.nitro.swe.iternio.reactnativeautoplay.TextInputType
|
|
19
29
|
import java.security.InvalidParameterException
|
|
30
|
+
import androidx.core.net.toUri
|
|
20
31
|
|
|
21
32
|
class SignInTemplate(
|
|
22
33
|
context: CarContext, config: SignInTemplateConfig
|
|
@@ -55,17 +66,16 @@ class SignInTemplate(
|
|
|
55
66
|
val qrSignIn = config.signInMethod?.asFirstOrNull()
|
|
56
67
|
val pinSignIn = config.signInMethod?.asSecondOrNull()
|
|
57
68
|
val inputSignIn = config.signInMethod?.asThirdOrNull()
|
|
69
|
+
val googleSignIn = config.signInMethod?.asFourthOrNull()
|
|
58
70
|
|
|
59
71
|
val templateBuilder = when {
|
|
60
72
|
qrSignIn != null -> {
|
|
61
73
|
val url = qrSignIn.url
|
|
62
|
-
|
|
63
|
-
SignInTemplate.Builder(QRCodeSignInMethod(Uri.parse(url)))
|
|
74
|
+
SignInTemplate.Builder(QRCodeSignInMethod(url.toUri()))
|
|
64
75
|
}
|
|
65
76
|
|
|
66
77
|
pinSignIn != null -> {
|
|
67
78
|
val pin = pinSignIn.pin
|
|
68
|
-
?: throw InvalidParameterException("missing pin parameter")
|
|
69
79
|
SignInTemplate.Builder(PinSignInMethod(pin))
|
|
70
80
|
}
|
|
71
81
|
|
|
@@ -94,6 +104,51 @@ class SignInTemplate(
|
|
|
94
104
|
}.build())
|
|
95
105
|
}
|
|
96
106
|
|
|
107
|
+
googleSignIn != null -> {
|
|
108
|
+
val signInAction = Action.Builder().apply {
|
|
109
|
+
setTitle(googleSignIn.signInButtonText)
|
|
110
|
+
setIcon(
|
|
111
|
+
CarIcon.Builder(
|
|
112
|
+
IconCompat.createWithResource(
|
|
113
|
+
context, R.drawable.google
|
|
114
|
+
)
|
|
115
|
+
).build()
|
|
116
|
+
)
|
|
117
|
+
setOnClickListener(ParkedOnlyOnClickListener.create {
|
|
118
|
+
val extras = Bundle(1)
|
|
119
|
+
extras.putBinder(
|
|
120
|
+
SignInWithGoogleActivity.BINDER_KEY,
|
|
121
|
+
object : SignInWithGoogleActivity.OnSignInComplete() {
|
|
122
|
+
override fun onSignInComplete(account: GoogleSignInAccount?) {
|
|
123
|
+
if (account == null) {
|
|
124
|
+
googleSignIn.callback("Error signing in", null)
|
|
125
|
+
} else {
|
|
126
|
+
googleSignIn.callback(
|
|
127
|
+
null,
|
|
128
|
+
com.margelo.nitro.swe.iternio.reactnativeautoplay.GoogleSignInAccount(
|
|
129
|
+
serverAuthCode = account.serverAuthCode,
|
|
130
|
+
email = account.email,
|
|
131
|
+
id = account.id,
|
|
132
|
+
displayName = account.displayName,
|
|
133
|
+
photoUrl = account.photoUrl?.toString(),
|
|
134
|
+
idToken = account.idToken,
|
|
135
|
+
givenName = account.givenName,
|
|
136
|
+
familyName = account.familyName
|
|
137
|
+
)
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
extras.putString("serverClientId", googleSignIn.serverClientId)
|
|
143
|
+
context.startActivity(
|
|
144
|
+
Intent().setClass(context, SignInWithGoogleActivity::class.java)
|
|
145
|
+
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK).putExtras(extras)
|
|
146
|
+
)
|
|
147
|
+
})
|
|
148
|
+
}.build()
|
|
149
|
+
SignInTemplate.Builder(ProviderSignInMethod(signInAction))
|
|
150
|
+
}
|
|
151
|
+
|
|
97
152
|
else -> throw InvalidParameterException("missing SignInTemplate builder")
|
|
98
153
|
}
|
|
99
154
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
android:width="24dp"
|
|
3
|
+
android:height="24dp"
|
|
4
|
+
android:viewportWidth="24"
|
|
5
|
+
android:viewportHeight="24">
|
|
6
|
+
<path
|
|
7
|
+
android:pathData="M22.56,12.25c0,-0.78 -0.07,-1.53 -0.2,-2.25H12v4.26h5.92c-0.26,1.37 -1.04,2.53 -2.21,3.31v2.77h3.57c2.08,-1.92 3.28,-4.74 3.28,-8.09z"
|
|
8
|
+
android:fillColor="#4285F4"/>
|
|
9
|
+
<path
|
|
10
|
+
android:pathData="M12,23c2.97,0 5.46,-0.98 7.28,-2.66l-3.57,-2.77c-0.98,0.66 -2.23,1.06 -3.71,1.06 -2.86,0 -5.29,-1.93 -6.16,-4.53H2.18v2.84C3.99,20.53 7.7,23 12,23z"
|
|
11
|
+
android:fillColor="#34A853"/>
|
|
12
|
+
<path
|
|
13
|
+
android:pathData="M5.84,14.09c-0.22,-0.66 -0.35,-1.36 -0.35,-2.09s0.13,-1.43 0.35,-2.09V7.07H2.18C1.43,8.55 1,10.22 1,12s0.43,3.45 1.18,4.93l2.85,-2.22 0.81,-0.62z"
|
|
14
|
+
android:fillColor="#FBBC05"/>
|
|
15
|
+
<path
|
|
16
|
+
android:pathData="M12,5.38c1.62,0 3.06,0.56 4.21,1.64l3.15,-3.15C17.45,2.09 14.97,1 12,1 7.7,1 3.99,3.47 2.18,7.07l3.66,2.84c0.87,-2.6 3.3,-4.53 6.16,-4.53z"
|
|
17
|
+
android:fillColor="#EA4335"/>
|
|
18
|
+
</vector>
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
export declare enum SignInMethods {
|
|
2
2
|
QR = 0,
|
|
3
|
-
|
|
3
|
+
GOOGLE = 1,
|
|
4
4
|
PIN = 2,
|
|
5
5
|
INPUT = 3
|
|
6
6
|
}
|
|
7
|
+
export type GoogleSignInAccount = {
|
|
8
|
+
serverAuthCode?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
displayName?: string;
|
|
12
|
+
photoUrl?: string;
|
|
13
|
+
idToken?: string;
|
|
14
|
+
givenName?: string;
|
|
15
|
+
familyName?: string;
|
|
16
|
+
};
|
|
17
|
+
export type GoogleSignIn = {
|
|
18
|
+
method: SignInMethods.GOOGLE;
|
|
19
|
+
serverClientId: string;
|
|
20
|
+
callback: (error?: string, signInAccount?: GoogleSignInAccount) => void;
|
|
21
|
+
signInButtonText: string;
|
|
22
|
+
};
|
|
7
23
|
export type PinSignIn = {
|
|
8
24
|
method: SignInMethods.PIN;
|
|
9
25
|
/**
|
|
@@ -35,4 +51,4 @@ export type QrSignIn = {
|
|
|
35
51
|
method: SignInMethods.QR;
|
|
36
52
|
url: string;
|
|
37
53
|
};
|
|
38
|
-
export type SignInMethod = QrSignIn | PinSignIn | InputSignIn;
|
|
54
|
+
export type SignInMethod = QrSignIn | PinSignIn | InputSignIn | GoogleSignIn;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export var SignInMethods;
|
|
2
2
|
(function (SignInMethods) {
|
|
3
3
|
SignInMethods[SignInMethods["QR"] = 0] = "QR";
|
|
4
|
-
SignInMethods[SignInMethods["
|
|
4
|
+
SignInMethods[SignInMethods["GOOGLE"] = 1] = "GOOGLE";
|
|
5
5
|
SignInMethods[SignInMethods["PIN"] = 2] = "PIN";
|
|
6
6
|
SignInMethods[SignInMethods["INPUT"] = 3] = "INPUT";
|
|
7
7
|
})(SignInMethods || (SignInMethods = {}));
|
|
@@ -61,7 +61,7 @@ target_sources(
|
|
|
61
61
|
../nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp
|
|
62
62
|
../nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp
|
|
63
63
|
../nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp
|
|
64
|
-
../nitrogen/generated/android/c++/
|
|
64
|
+
../nitrogen/generated/android/c++/JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.cpp
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
# From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
#include "JHybridMessageTemplateSpec.hpp"
|
|
46
46
|
#include "JHybridSearchTemplateSpec.hpp"
|
|
47
47
|
#include "JHybridSignInTemplateSpec.hpp"
|
|
48
|
+
#include "JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp"
|
|
48
49
|
#include <NitroModules/DefaultConstructableObject.hpp>
|
|
49
50
|
|
|
50
51
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
@@ -86,6 +87,7 @@ int initialize(JavaVM* vm) {
|
|
|
86
87
|
margelo::nitro::swe::iternio::reactnativeautoplay::JHybridMessageTemplateSpec::registerNatives();
|
|
87
88
|
margelo::nitro::swe::iternio::reactnativeautoplay::JHybridSearchTemplateSpec::registerNatives();
|
|
88
89
|
margelo::nitro::swe::iternio::reactnativeautoplay::JHybridSignInTemplateSpec::registerNatives();
|
|
90
|
+
margelo::nitro::swe::iternio::reactnativeautoplay::JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx::registerNatives();
|
|
89
91
|
|
|
90
92
|
// Register Nitro Hybrid Objects
|
|
91
93
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <string>
|
|
14
|
+
#include <optional>
|
|
15
|
+
#include "GoogleSignInAccount.hpp"
|
|
16
|
+
#include <functional>
|
|
17
|
+
#include <NitroModules/JNICallable.hpp>
|
|
18
|
+
#include "JGoogleSignInAccount.hpp"
|
|
19
|
+
|
|
20
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
21
|
+
|
|
22
|
+
using namespace facebook;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Represents the Java/Kotlin callback `(error: String?, signInAccount: GoogleSignInAccount?) -> Unit`.
|
|
26
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
27
|
+
*/
|
|
28
|
+
struct JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_: public jni::JavaClass<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_> {
|
|
29
|
+
public:
|
|
30
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_;";
|
|
31
|
+
|
|
32
|
+
public:
|
|
33
|
+
/**
|
|
34
|
+
* Invokes the function this `JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_` instance holds through JNI.
|
|
35
|
+
*/
|
|
36
|
+
void invoke(const std::optional<std::string>& error, const std::optional<GoogleSignInAccount>& signInAccount) const {
|
|
37
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* error */, jni::alias_ref<JGoogleSignInAccount> /* signInAccount */)>("invoke");
|
|
38
|
+
method(self(), error.has_value() ? jni::make_jstring(error.value()) : nullptr, signInAccount.has_value() ? JGoogleSignInAccount::fromCpp(signInAccount.value()) : nullptr);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* An implementation of Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_ that is backed by a C++ implementation (using `std::function<...>`)
|
|
44
|
+
*/
|
|
45
|
+
class JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx final: public jni::HybridClass<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx, JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_> {
|
|
46
|
+
public:
|
|
47
|
+
static jni::local_ref<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_::javaobject> fromCpp(const std::function<void(const std::optional<std::string>& /* error */, const std::optional<GoogleSignInAccount>& /* signInAccount */)>& func) {
|
|
48
|
+
return JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx::newObjectCxxArgs(func);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
/**
|
|
53
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx` instance holds.
|
|
54
|
+
*/
|
|
55
|
+
void invoke_cxx(jni::alias_ref<jni::JString> error, jni::alias_ref<JGoogleSignInAccount> signInAccount) {
|
|
56
|
+
_func(error != nullptr ? std::make_optional(error->toStdString()) : std::nullopt, signInAccount != nullptr ? std::make_optional(signInAccount->toCpp()) : std::nullopt);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
[[nodiscard]]
|
|
61
|
+
inline const std::function<void(const std::optional<std::string>& /* error */, const std::optional<GoogleSignInAccount>& /* signInAccount */)>& getFunction() const {
|
|
62
|
+
return _func;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public:
|
|
66
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx;";
|
|
67
|
+
static void registerNatives() {
|
|
68
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx::invoke_cxx)});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
explicit JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx(const std::function<void(const std::optional<std::string>& /* error */, const std::optional<GoogleSignInAccount>& /* signInAccount */)>& func): _func(func) { }
|
|
73
|
+
|
|
74
|
+
private:
|
|
75
|
+
friend HybridBase;
|
|
76
|
+
std::function<void(const std::optional<std::string>& /* error */, const std::optional<GoogleSignInAccount>& /* signInAccount */)> _func;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JGoogleSignIn.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "GoogleSignIn.hpp"
|
|
12
|
+
|
|
13
|
+
#include "GoogleSignInAccount.hpp"
|
|
14
|
+
#include "JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp"
|
|
15
|
+
#include "JGoogleSignInAccount.hpp"
|
|
16
|
+
#include "JSignInMethods.hpp"
|
|
17
|
+
#include "SignInMethods.hpp"
|
|
18
|
+
#include <NitroModules/JNICallable.hpp>
|
|
19
|
+
#include <functional>
|
|
20
|
+
#include <optional>
|
|
21
|
+
#include <string>
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The C++ JNI bridge between the C++ struct "GoogleSignIn" and the the Kotlin data class "GoogleSignIn".
|
|
29
|
+
*/
|
|
30
|
+
struct JGoogleSignIn final: public jni::JavaClass<JGoogleSignIn> {
|
|
31
|
+
public:
|
|
32
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/GoogleSignIn;";
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
/**
|
|
36
|
+
* Convert this Java/Kotlin-based struct to the C++ struct GoogleSignIn by copying all values to C++.
|
|
37
|
+
*/
|
|
38
|
+
[[maybe_unused]]
|
|
39
|
+
[[nodiscard]]
|
|
40
|
+
GoogleSignIn toCpp() const {
|
|
41
|
+
static const auto clazz = javaClassStatic();
|
|
42
|
+
static const auto fieldMethod = clazz->getField<JSignInMethods>("method");
|
|
43
|
+
jni::local_ref<JSignInMethods> method = this->getFieldValue(fieldMethod);
|
|
44
|
+
static const auto fieldServerClientId = clazz->getField<jni::JString>("serverClientId");
|
|
45
|
+
jni::local_ref<jni::JString> serverClientId = this->getFieldValue(fieldServerClientId);
|
|
46
|
+
static const auto fieldCallback = clazz->getField<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_::javaobject>("callback");
|
|
47
|
+
jni::local_ref<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_::javaobject> callback = this->getFieldValue(fieldCallback);
|
|
48
|
+
static const auto fieldSignInButtonText = clazz->getField<jni::JString>("signInButtonText");
|
|
49
|
+
jni::local_ref<jni::JString> signInButtonText = this->getFieldValue(fieldSignInButtonText);
|
|
50
|
+
return GoogleSignIn(
|
|
51
|
+
method->toCpp(),
|
|
52
|
+
serverClientId->toStdString(),
|
|
53
|
+
[&]() -> std::function<void(const std::optional<std::string>& /* error */, const std::optional<GoogleSignInAccount>& /* signInAccount */)> {
|
|
54
|
+
if (callback->isInstanceOf(JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx::javaClassStatic())) [[likely]] {
|
|
55
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx::javaobject>(callback);
|
|
56
|
+
return downcast->cthis()->getFunction();
|
|
57
|
+
} else {
|
|
58
|
+
auto callbackRef = jni::make_global(callback);
|
|
59
|
+
return JNICallable<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_, void(std::optional<std::string>, std::optional<GoogleSignInAccount>)>(std::move(callbackRef));
|
|
60
|
+
}
|
|
61
|
+
}(),
|
|
62
|
+
signInButtonText->toStdString()
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public:
|
|
67
|
+
/**
|
|
68
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
69
|
+
*/
|
|
70
|
+
[[maybe_unused]]
|
|
71
|
+
static jni::local_ref<JGoogleSignIn::javaobject> fromCpp(const GoogleSignIn& value) {
|
|
72
|
+
using JSignature = JGoogleSignIn(jni::alias_ref<JSignInMethods>, jni::alias_ref<jni::JString>, jni::alias_ref<JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_::javaobject>, jni::alias_ref<jni::JString>);
|
|
73
|
+
static const auto clazz = javaClassStatic();
|
|
74
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
75
|
+
return create(
|
|
76
|
+
clazz,
|
|
77
|
+
JSignInMethods::fromCpp(value.method),
|
|
78
|
+
jni::make_jstring(value.serverClientId),
|
|
79
|
+
JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount__cxx::fromCpp(value.callback),
|
|
80
|
+
jni::make_jstring(value.signInButtonText)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JGoogleSignInAccount.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "GoogleSignInAccount.hpp"
|
|
12
|
+
|
|
13
|
+
#include <optional>
|
|
14
|
+
#include <string>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "GoogleSignInAccount" and the the Kotlin data class "GoogleSignInAccount".
|
|
22
|
+
*/
|
|
23
|
+
struct JGoogleSignInAccount final: public jni::JavaClass<JGoogleSignInAccount> {
|
|
24
|
+
public:
|
|
25
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/GoogleSignInAccount;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct GoogleSignInAccount by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
GoogleSignInAccount toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldServerAuthCode = clazz->getField<jni::JString>("serverAuthCode");
|
|
36
|
+
jni::local_ref<jni::JString> serverAuthCode = this->getFieldValue(fieldServerAuthCode);
|
|
37
|
+
static const auto fieldEmail = clazz->getField<jni::JString>("email");
|
|
38
|
+
jni::local_ref<jni::JString> email = this->getFieldValue(fieldEmail);
|
|
39
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
40
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
41
|
+
static const auto fieldDisplayName = clazz->getField<jni::JString>("displayName");
|
|
42
|
+
jni::local_ref<jni::JString> displayName = this->getFieldValue(fieldDisplayName);
|
|
43
|
+
static const auto fieldPhotoUrl = clazz->getField<jni::JString>("photoUrl");
|
|
44
|
+
jni::local_ref<jni::JString> photoUrl = this->getFieldValue(fieldPhotoUrl);
|
|
45
|
+
static const auto fieldIdToken = clazz->getField<jni::JString>("idToken");
|
|
46
|
+
jni::local_ref<jni::JString> idToken = this->getFieldValue(fieldIdToken);
|
|
47
|
+
static const auto fieldGivenName = clazz->getField<jni::JString>("givenName");
|
|
48
|
+
jni::local_ref<jni::JString> givenName = this->getFieldValue(fieldGivenName);
|
|
49
|
+
static const auto fieldFamilyName = clazz->getField<jni::JString>("familyName");
|
|
50
|
+
jni::local_ref<jni::JString> familyName = this->getFieldValue(fieldFamilyName);
|
|
51
|
+
return GoogleSignInAccount(
|
|
52
|
+
serverAuthCode != nullptr ? std::make_optional(serverAuthCode->toStdString()) : std::nullopt,
|
|
53
|
+
email != nullptr ? std::make_optional(email->toStdString()) : std::nullopt,
|
|
54
|
+
id != nullptr ? std::make_optional(id->toStdString()) : std::nullopt,
|
|
55
|
+
displayName != nullptr ? std::make_optional(displayName->toStdString()) : std::nullopt,
|
|
56
|
+
photoUrl != nullptr ? std::make_optional(photoUrl->toStdString()) : std::nullopt,
|
|
57
|
+
idToken != nullptr ? std::make_optional(idToken->toStdString()) : std::nullopt,
|
|
58
|
+
givenName != nullptr ? std::make_optional(givenName->toStdString()) : std::nullopt,
|
|
59
|
+
familyName != nullptr ? std::make_optional(familyName->toStdString()) : std::nullopt
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
/**
|
|
65
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
66
|
+
*/
|
|
67
|
+
[[maybe_unused]]
|
|
68
|
+
static jni::local_ref<JGoogleSignInAccount::javaobject> fromCpp(const GoogleSignInAccount& value) {
|
|
69
|
+
using JSignature = JGoogleSignInAccount(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>);
|
|
70
|
+
static const auto clazz = javaClassStatic();
|
|
71
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
72
|
+
return create(
|
|
73
|
+
clazz,
|
|
74
|
+
value.serverAuthCode.has_value() ? jni::make_jstring(value.serverAuthCode.value()) : nullptr,
|
|
75
|
+
value.email.has_value() ? jni::make_jstring(value.email.value()) : nullptr,
|
|
76
|
+
value.id.has_value() ? jni::make_jstring(value.id.value()) : nullptr,
|
|
77
|
+
value.displayName.has_value() ? jni::make_jstring(value.displayName.value()) : nullptr,
|
|
78
|
+
value.photoUrl.has_value() ? jni::make_jstring(value.photoUrl.value()) : nullptr,
|
|
79
|
+
value.idToken.has_value() ? jni::make_jstring(value.idToken.value()) : nullptr,
|
|
80
|
+
value.givenName.has_value() ? jni::make_jstring(value.givenName.value()) : nullptr,
|
|
81
|
+
value.familyName.has_value() ? jni::make_jstring(value.familyName.value()) : nullptr
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|