Showing
2 changed files
with
8 additions
and
4 deletions
| ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' |
| 2 | 2 | ||
| 3 | ext { | 3 | ext { |
| 4 | PUBLISH_GROUP_ID = 'ly.warp' | 4 | PUBLISH_GROUP_ID = 'ly.warp' |
| 5 | - PUBLISH_VERSION = '4.5.4.6rc6' | 5 | + PUBLISH_VERSION = '4.5.4.6rc7' |
| 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
| 7 | } | 7 | } |
| 8 | 8 | ... | ... |
| ... | @@ -35,6 +35,7 @@ import android.content.pm.PackageInfo; | ... | @@ -35,6 +35,7 @@ import android.content.pm.PackageInfo; |
| 35 | import android.content.pm.PackageManager.NameNotFoundException; | 35 | import android.content.pm.PackageManager.NameNotFoundException; |
| 36 | import android.database.Cursor; | 36 | import android.database.Cursor; |
| 37 | import android.net.Uri; | 37 | import android.net.Uri; |
| 38 | +import android.text.TextUtils; | ||
| 38 | import android.util.Log; | 39 | import android.util.Log; |
| 39 | 40 | ||
| 40 | import androidx.appcompat.app.AlertDialog; | 41 | import androidx.appcompat.app.AlertDialog; |
| ... | @@ -158,20 +159,23 @@ public enum Warply { | ... | @@ -158,20 +159,23 @@ public enum Warply { |
| 158 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); | 159 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); |
| 159 | // return; | 160 | // return; |
| 160 | } | 161 | } |
| 161 | - if (mContext.get() == null) { | 162 | + if (mContext != null && mContext.get() == null) { |
| 162 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); | 163 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); |
| 163 | // return; | 164 | // return; |
| 164 | } | 165 | } |
| 166 | + | ||
| 167 | + if (mContext != null && mContext.get() != null) { | ||
| 165 | String apiKey = WarplyProperty.getAppUuid(mContext.get()); | 168 | String apiKey = WarplyProperty.getAppUuid(mContext.get()); |
| 166 | - if (apiKey == null) { | 169 | + if (TextUtils.isEmpty(apiKey)) { |
| 167 | WarpUtils.log("Warply application UUID has not been set in the Manifest"); | 170 | WarpUtils.log("Warply application UUID has not been set in the Manifest"); |
| 168 | // return; | 171 | // return; |
| 169 | } | 172 | } |
| 170 | - if ((apiKey.length() != 32) && (apiKey.length() != 36)) { | 173 | + if (!TextUtils.isEmpty(apiKey) && (apiKey.length() != 32) && (apiKey.length() != 36)) { |
| 171 | WarpUtils.log("Warply application UUID has not been set correclty in the Manifest, key got: " + apiKey); | 174 | WarpUtils.log("Warply application UUID has not been set correclty in the Manifest, key got: " + apiKey); |
| 172 | // return; | 175 | // return; |
| 173 | } | 176 | } |
| 174 | } | 177 | } |
| 178 | + } | ||
| 175 | 179 | ||
| 176 | /** | 180 | /** |
| 177 | * Method used to check if the Warply INSTANCE is initialized | 181 | * Method used to check if the Warply INSTANCE is initialized | ... | ... |
-
Please register or login to post a comment