apps-sdk 1.0.51 → 1.0.52
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/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {getAdvertisingId, requestTrackingPermissionsAsync} from "expo-tracking-transparency";
|
|
2
2
|
import Storage from './Storage';
|
|
3
3
|
import Networking from './Networking';
|
|
4
4
|
import * as config from '../../config';
|
|
5
5
|
|
|
6
6
|
class TrackingTransparency {
|
|
7
7
|
async requestTrackingTransparencyPermission() {
|
|
8
|
+
console.log('requestTrackingTransparencyPermission');
|
|
8
9
|
let trackingResult = 'granted';
|
|
9
10
|
let trackingPermission = await Storage.getData('TRACKING_PERMISSION');
|
|
10
11
|
if (!trackingPermission || trackingPermission !== 'granted') {
|
|
11
|
-
const { status } = await
|
|
12
|
+
const { status } = await requestTrackingPermissionsAsync();
|
|
12
13
|
if (status === 'granted') {
|
|
13
14
|
Storage.storeData('TRACKING_PERMISSION', 'granted');
|
|
14
15
|
Networking.sendEvent('action', 'tracking_consent');
|
|
@@ -25,7 +26,7 @@ class TrackingTransparency {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
async getAdvertisingIdentifier() {
|
|
28
|
-
return
|
|
29
|
+
return getAdvertisingId();
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|