Skip to content

Commit 1746874

Browse files
committed
update README
1 parent 9e91424 commit 1746874

File tree

1 file changed

+72
-15
lines changed

1 file changed

+72
-15
lines changed

README.md

Lines changed: 72 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本
7373
* [Google Play Services advertising identifier](#ad-gps-adid)
7474
* [Amazon advertising identifier](#ad-amazon-adid)
7575
* [Adjust device identifier](#ad-adid)
76-
* [Pre-installed trackers](#ad-pre-installed-trackers)
76+
* [Preinstalled apps](#ad-preinstalled-apps)
7777
* [Offline mode](#ad-offline-mode)
7878
* [Disable tracking](#ad-disable-tracking)
7979
* [Event buffering](#ad-event-buffering)
@@ -83,6 +83,7 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本
8383
* [Disable third-party sharing](#ad-disable-third-party-sharing)
8484
* [Enable third-party sharing](#ad-enable-third-party-sharing)
8585
* [Measurement consent](#ad-measurement-consent)
86+
* [Data residency](#ad-data-residency)
8687

8788
### Testing and troubleshooting
8889
* [Debug information in iOS](#tt-debug-ios)
@@ -946,28 +947,76 @@ String adid = Adjust.getAdid();
946947

947948
Information about the adid is only available after our backend tracks the app install. It is not possible to access the adid value before the SDK has been initialized and the installation of your app has been successfully tracked.
948949

949-
### <a id="ad-pre-installed-trackers"></a>Pre-installed trackers
950+
### <a id="ad-preinstalled-apps"></a>Preinstalled apps
950951

951-
To use the Adjust SDK to recognize users whose devices came with your app pre-installed, follow these steps:
952+
You can use the Adjust SDK to recognize users whose devices had your app preinstalled during manufacturing. Adjust offers two solutions: one which uses the system payload, and one which uses a default tracker.
952953

953-
1. Create a new tracker in your [dashboard].
954-
2. Set the default tracker of your `AdjustConfig`:
954+
In general, we recommend using the system payload solution. However, there are certain use cases which may require the tracker. First check the available [implementation methods](https://help.adjust.com/en/article/pre-install-tracking#Implementation_methods) and your preinstall partner’s preferred method. If you are unsure which solution to implement, reach out to [email protected]
955955

956-
```cs
957-
AdjustConfig adjustConfig = new AdjustConfig(appToken, environment);
956+
#### Use the system payload
957+
958+
- The Content Provider, System Properties, or File System method is supported from SDK v4.23.0 and above.
959+
960+
- The System Installer Receiver method is supported from SDK v4.27.0 and above.
961+
962+
Enable the Adjust SDK to recognise preinstalled apps by calling `setPreinstallTrackingEnabled` with the parameter `true` after creating the config object:
963+
964+
965+
```csharp
966+
adjustConfig.setPreinstallTrackingEnabled(true);
967+
```
968+
969+
Depending upon your implmentation method, you may need to make a change to your `AndroidManifest.xml` file. Find the required code change using the table below.
970+
971+
<table>
972+
<tr>
973+
<td>
974+
<b>Method</b>
975+
</td>
976+
<td>
977+
<b>AndroidManifest.xml change</b>
978+
</td>
979+
</tr>
980+
<tr>
981+
<td>Content Provider</td>
982+
<td>Add permission:</br>
983+
984+
```
985+
<uses-permission android:name="com.adjust.preinstall.READ_PERMISSION"/>
986+
```
987+
</td>
988+
</tr>
989+
<tr>
990+
<td>System Installer Receiver</td>
991+
<td>Declare receiver:</br>
992+
993+
```
994+
<receiver android:name="com.adjust.sdk.AdjustPreinstallReferrerReceiver">
995+
<intent-filter>
996+
<action android:name="com.attribution.SYSTEM_INSTALLER_REFERRER" />
997+
</intent-filter>
998+
</receiver>
999+
```
1000+
</td>
1001+
</tr>
1002+
</table>
1003+
1004+
#### Use a default tracker
1005+
1006+
- Create a new tracker in your [dashboard].
1007+
- Open your app delegate and set the default tracker of your config:
1008+
1009+
```csharp
9581010
adjustConfig.setDefaultTracker("{TrackerToken}");
959-
Adjust.start(adjustConfig);
9601011
```
9611012

962-
Replace `{TrackerToken}` with the tracker token you created in step 2. E.g. `{abc123}`
963-
964-
Although the dashboard displays a tracker URL (including `http://app.adjust.com/`), in your source code you should only enter the six or seven-character token and not the entire URL.
1013+
- Replace `{TrackerToken}` with the tracker token you created in step one. Please note that the dashboard displays a tracker URL (including `http://app.adjust.com/`). In your source code, you should specify only the six or seven-character token and not the entire URL.
9651014

966-
3. Build and run your app. You should see a line like the following in the log output:
1015+
- Build and run your app. You should see a line like the following in your LogCat:
9671016

968-
```
969-
Default tracker: 'abc123'
970-
```
1017+
```
1018+
Default tracker: 'abc123'
1019+
```
9711020

9721021
### <a id="ad-offline-mode"></a>Offline mode
9731022

@@ -1078,6 +1127,14 @@ Adjust.trackMeasurementConsent(true);
10781127

10791128
Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.
10801129

1130+
### <a id="ad-data-residency"></a>Data residency
1131+
1132+
In order to enable data residency feature, make sure to make a call to `setUrlStrategy` method of the `AdjustConfig` instance with one of the following constants:
1133+
1134+
```csharp
1135+
adjustConfig.setUrlStrategy(AdjustConfig.AdjustDataResidencyEU); // for EU data residency region
1136+
```
1137+
10811138
## Testing and troubleshooting
10821139

10831140
### <a id="tt-debug-ios"></a>Debug information in iOS

0 commit comments

Comments
 (0)