GuidesDiscussions
Log In
Guides

Advanced Settings

Information about the feature advanced optionals

1. Sensitive Data

Add Gradle aditional dependencies :

If you want the SDK to collect sensitive data, add the following modules as needed:

ModuleSensitive DataDependency
AppServicesInstalled Apps - Running Appsimplementation 'com.github.Digita1Reef.phoenix:app-services:<version>'
PhoneServicesIMEI1 - IMEI2 - Serial Numberimplementation 'com.github.Digita1Reef.phoenix:phone-services:<version>'
TelephonyServicesPhone Number - IMSI - ICCID - Sim Data Slotimplementation 'com.github.Digita1Reef.phoenix:telephony-services:<version>'

Note: When including any of the modules, all sensitive data corresponding to that module will be captured.

implementation "com.github.Digita1Reef.phoenix:<variant>:<version>"  
implementation "com.github.Digita1Reef.phoenix:app-services:<version>"  
implementation "com.github.Digita1Reef.phoenix:phone-services:<version>"  
implementation "com.github.Digita1Reef.phoenix:telephony-services:<version>"
implementation("com.github.Digita1Reef.phoenix:<variant>:<version>")
implementation("com.github.Digita1Reef.phoenix:app-services:<version>")
implementation("com.github.Digita1Reef.phoenix:phone-services:<version>")
implementation("com.github.Digita1Reef.phoenix:telephony-services:<version>") 

Add Permissions for Sensitive Data :

The data sensible requires permissions depending on the data that is collected, please add to the manifest as appropriate:

AppServices

You can use the following code in your manifest, inside tag:

<manifest>
<!--your code -->

    <queries>
        <intent>
            <action android:name="*" />
        </intent>
    </queries>

</manifest>

PhoneServices

Your can use for Android 9 and below:

<uses-permission  android:name="android.permission.READ_PHONE_STATE" />

For Android 10+ only is captured if the app in preloaded:

<uses-permission  android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />

Note: This permission is only for preloaded variant

TelephonyServices

Your can use for Android 9 and below:

<uses-permission  android:name="android.permission.READ_PHONE_STATE" />

For Android 10+:

<uses-permission  android:name="android.permission.READ_PHONE_NUMBERS" />
<uses-permission  android:name="android.permission.READ_PHONE_STATE" />

For Preloaded App (Android 10+):

<uses-permission  android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />

Note: This permission is only for preloaded variant

Initialization of Sensitive Data Modules

The included modules must be initialized at the same time as the SDK is initialized, as follows:

public class App extends Application { 
  @Override
  public void onCreate(){
      super.onCreate();
      SiprocalSDKSettings siprocalSDKSettings = new SiprocalSDKSettings.Builder()
                  .setAppServices(new AppServices())//only if use app-services module 
                  .setTelephonyServices(new TelephonyServices())//only if use telephony-services module 
                  .setPhoneServices(new PhoneServices())// only if use phone-services module 
                  .build();
      SiprocalSDK.init(this, siprocalSDKSettings);
  }
}
class App: Application() {
  override fun onCreate() {
      super.onCreate()
      val siprocalSDKSettings = SiprocalSDKSettings.Builder()
          .setAppServices(AppServices()) //only if use app-services module 
          .setTelephonyServices(TelephonyServices())//only if use telephony-services module 
          .setPhoneServices(PhoneServices())// only if use phone-services module 
          .build()
      SiprocalSDK.init(this, siprocalSDKSettings)
  }
}

Enable/Disable capture of Sensitive Data:

Capturing sensitive data requires a prominent disclosure, and the user must consent to the app's data capture and usage. If the user consents, the app should send a boolean flag using the following method:

SiprocalSDK.setSensitiveData(value);
SiprocalSDK.setSensitiveData(value)

2. Custom Organization Selection

If the client wishes to have the same app available for different organizations, use the following
API from the Siprocal SDK:

SiprocalSDK.setCountryCodeSelected(context, countryCode);
SiprocalSDK.setCountryCodeSelected(context, countryCode)

Ensure that the country code mappings are created in the Siprocal servers before going live.

3. Turn ON/OFF the SDK:

If you want to handle the turning on and off of the SDK, add the method activeSDKManually() to the SiprocalSDKSettings:

public class App extends Application { 
  @Override
  public void onCreate(){
      super.onCreate();
      SiprocalSDKSettings siprocalSDKSettings = new SiprocalSDKSettings.Builder()
        .activeSDKManually()
        .build();
      SiprocalSDK.init(this, siprocalSDKSettings);
  }
}
class App: Application() {
  override fun onCreate() {
      super.onCreate()
      val siprocalSDKSettings = SiprocalSDKSettings.Builder()
          .activeSDKManually()
          .build()
      SiprocalSDK.init(this, siprocalSDKSettings)
  }
}

⚠️ The SDK by default is OFF, you need use setSDKStatus for Turn On the SDK.

That way you can then use the following method to turn it on/off:

Turn ON:

SiprocalSDK.setSDKStatus(true);
SiprocalSDK.setSDKStatus(true)

Turn OFF:

SiprocalSDK.setSDKStatus(false);
SiprocalSDK.setSDKStatus(false)

4. Passing Client Attributes to the Siprocal SDK

In some cases, the host application may need to pass attributes to the Siprocal SDK. This is
supported with the ClientAttributes class provided as part of the SDK.

To set client attributes and pass them to the Siprocal SDK, follow this code snippet:

JSONObject jsonObject = new JSONObject()
jsonObject.put("Param1", "Value1")
jsonObject.put("Param2", "Value2")
SiprocalSDK.setClientAttributes(jsonObject)
val jsonObject = JSONObject()
jsonObject.put("Param1", "Value1")
jsonObject.put("Param2", "Value2")
SiprocalSDK.setClientAttributes(jsonObject)

5. Opt-In / Opt-Out settings

The host application can provide an option to the users to Opt-In and Opt-Out of the Ads services. The same can be accomplished via the following methods to access or update the Status.

Update Opt-In status

SiprocalSDK.updateOptInStatus(applicationContext, value);
SiprocalSDK.updateOptInStatus(applicationContext, value)

Get Opt-In status

Boolean status = SiprocalSDK.getOptInStatus();
val status = SiprocalSDK.getOptInStatus()

6. Notification Channel

If you need to know information about the SDK notification channel you can use the following methods.

String channelId = SiprocalSDK.getNotificationChannelId();
String channelName = SiprocalSDK.getNotificationChannelName();
val channelId = SiprocalSDK.getNotificationChannelId()
val channelName = SiprocalSDK.getNotificationChannelName()

7. Enable logs

For debug purpose you can use the method .enableLogInfoSdk() to see the logs of SDK. In Android Studio Logcat search the word SiprocalSdk


public class MainApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        SiprocalSDKSettings siprocalSDKSettings = new SiprocalSDKSettings.Builder()
                .enableLogInfoSdk()
                .build();
        SiprocalSDK.init(this, siprocalSDKSettings);
    }
}
class MainApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        val siprocalSDKSettings: SiprocalSDKSettings = SiprocalSDKSettings.Builder()
            .enableLogInfoSdk()
            .build()
        SipocalSDK.init(this, siprocalSDKSettings)
    }
}