Skip to content

Commit

Permalink
[Release] Version 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pallab Maiti authored Jul 13, 2022
2 parents c713a0c + c418a0e commit b9aee38
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 12 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ All notable changes to this project will be documented in this file.
- A new header `anonymousId` is added to the request to `data-plane` along with `writeKey` to handle sticky-session at the server.
### Changed
- Package name is changed from `com.rudderlabs.android.sdk.core` to `com.rudderstack.android.sdk.core`.
- New field `userId` is supported to make it more compliant under `context->traits` for `identify` and all successive calls. Old filed for developer identification i.e. `id` is still supported.
- New field `userId` is supported to make it more compliant under `context->traits` for `identify` and all successive calls. Old filed for developer identification i.e. `id` is still supported.

## Version - 1.6.0 - 2022-07-11

## Changed
- Removed Bluetooth permission from the Core SDK and from now the bluetooth status would be collected and sent as a part of the payload only if bluetooth permission is included in the SDK, so that from now bluetooth permission is not necessarily needed to make use of the SDK.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ allprojects {

```groovy
implementation 'com.rudderstack.android.sdk:core:1.5.2'
implementation 'com.rudderstack.android.sdk:core:1.6.0'
```

## Initializing ```RudderClient```
Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName '1.5.2'
versionName '1.6.0'
consumerProguardFiles 'proguard-consumer-rules.pro'
}

Expand Down Expand Up @@ -54,7 +54,7 @@ dependencies {

ext {
PUBLISH_GROUP_ID = 'com.rudderstack.android.sdk'
PUBLISH_VERSION = '1.5.2'
PUBLISH_VERSION = '1.6.0'
PUBLISH_ARTIFACT_ID = 'core'
}

Expand Down
1 change: 0 additions & 1 deletion core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.rudderstack.android.sdk.core">

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" android:required="false"/>
<uses-permission android:name="android.permission.BLUETOOTH" android:required="false"/>
<uses-permission android:name="android.permission.INTERNET"/>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ class Constants {
// whether we should record screen views automatically
static final boolean RECORD_SCREEN_VIEWS = false;
// current version of the library
static final String RUDDER_LIBRARY_VERSION = "1.5.2";
static final String RUDDER_LIBRARY_VERSION = "1.6.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ class RudderLibraryInfo {
@SerializedName("name")
private String name = BuildConfig.LIBRARY_PACKAGE_NAME;
@SerializedName("version")
private String version = "1.5.2";
private String version = "1.6.0";
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.rudderstack.android.sdk.core;

import static android.Manifest.permission.BLUETOOTH;
import static android.content.Context.TELEPHONY_SERVICE;
import static com.rudderstack.android.sdk.core.util.Utils.isTv;

import android.annotation.SuppressLint;
import android.app.Application;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.wifi.WifiManager;
import android.provider.Settings;
import android.telephony.TelephonyManager;
Expand All @@ -18,10 +21,11 @@ class RudderNetwork {
@SerializedName("wifi")
private boolean isWifiEnabled = false;
@SerializedName("bluetooth")
private boolean isBluetoothEnabled = false;
private Boolean isBluetoothEnabled;
@SerializedName("cellular")
private boolean isCellularEnabled = false;

@SuppressLint("MissingPermission")
RudderNetwork(Application application) {
try {
// carrier name
Expand All @@ -35,10 +39,20 @@ class RudderNetwork {
isWifiEnabled = wifi != null && wifi.isWifiEnabled();

// bluetooth
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
isBluetoothEnabled = bluetoothAdapter != null
&& bluetoothAdapter.isEnabled()
&& bluetoothAdapter.getState() == BluetoothAdapter.STATE_ON;
try {
Context context = application.getApplicationContext();
if (context.checkCallingOrSelfPermission(BLUETOOTH) == PackageManager.PERMISSION_GRANTED) {
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
isBluetoothEnabled = bluetoothAdapter != null
&& bluetoothAdapter.isEnabled()
&& bluetoothAdapter.getState() == BluetoothAdapter.STATE_ON;
} else {
RudderLogger.logWarn("RudderNetwork: Cannot check bluetooth status as permission is absent");
}
} catch (Exception e) {
RudderLogger.logError("RudderNetwork: Exception during bluetooth permission check");
}


// cellular status
TelephonyManager tm = (TelephonyManager) application.getSystemService(Context.TELEPHONY_SERVICE);
Expand Down
1 change: 1 addition & 0 deletions sample-kotlin/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />

<application
android:name=".MainApplication"
Expand Down

0 comments on commit b9aee38

Please sign in to comment.