* add new module for referrer api * add dependency * rm boiler * return the result * end connection when finished * add js types
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export type GooglePlayReferrerInfo = {
|
||||
installReferrer: string
|
||||
clickTimestamp: number
|
||||
installTimestamp: number
|
||||
}
|
||||
|
||||
export type ExpoGooglePlayReferrerModule = {
|
||||
getReferrerInfoAsync(): Promise<GooglePlayReferrerInfo>
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import {requireNativeModule} from 'expo-modules-core'
|
||||
|
||||
import {ExpoGooglePlayReferrerModule} from './ExpoGooglePlayReferrer.types'
|
||||
|
||||
export const BackgroundNotificationHandler =
|
||||
requireNativeModule<ExpoGooglePlayReferrerModule>('ExpoGooglePlayReferrer')
|
||||
@@ -0,0 +1,11 @@
|
||||
import {
|
||||
ExpoGooglePlayReferrerModule,
|
||||
GooglePlayReferrerInfo,
|
||||
} from './ExpoGooglePlayReferrer.types'
|
||||
|
||||
export const GooglePlayReferrerModule = {
|
||||
getReferrerInfoAsync(): Promise<GooglePlayReferrerInfo> {
|
||||
console.error('getReferrerInfoAsync is only available on Android')
|
||||
return Promise.reject('getReferrerInfoAsync is only available on Android')
|
||||
},
|
||||
} as ExpoGooglePlayReferrerModule
|
||||
Reference in New Issue
Block a user