Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion sdk/src/main/java/com/deploygate/sdk/DeployGateClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.content.pm.Signature;
import android.content.pm.SigningInfo;
import android.os.Build;
import android.util.Log;

import com.deploygate.sdk.internal.Logger;

Expand Down Expand Up @@ -56,7 +57,16 @@ class DeployGateClient {
this.versionCode = info.versionCode;
}

this.featuresFlag = info.applicationInfo.metaData.getInt("com.deploygate.features", 0);
if (info.applicationInfo.metaData == null) {
// LG_G3 (OS 5.0, the build number is unknown)

this.featuresFlag = 0;

Log.w(Logger.TAG, "New features of DeployGate SDK may not be available on this device.");
Log.w(Logger.TAG, "This may happen on a few device when you use ContentProvider to initialize DeployGate SDK, then please initialize DeployGateSDK manually instead.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good message 👍

} else {
this.featuresFlag = info.applicationInfo.metaData.getInt("com.deploygate.features", 0);
}
} else {
this.isInstalled = false;
this.versionCode = 0;
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/deploygate/sdk/internal/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Locale;

public class Logger {
private static final String TAG = "DeployGateSDK";
public static final String TAG = "DeployGateSDK";

public static void d(
String format,
Expand Down