Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Fix for Android M NC
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaswenz committed Jun 2, 2015
1 parent 3f47a78 commit e55a375
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.hockeyapp.android</groupId>
<artifactId>HockeySDK</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.5.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>HockeySDK</name>

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/hockeyapp/android/utils/VersionHelper.java
Expand Up @@ -352,8 +352,9 @@ public static boolean isNewerThanLastUpdateTime(Context context, long timestamp)
public static String mapGoogleVersion(String version) {
if ((version == null) || (version.equalsIgnoreCase("L"))) {
return "5.0";
}
else {
} else if (version.equalsIgnoreCase("M")) {
return "6.0";
} else {
return version;
}
}
Expand Down

4 comments on commit e55a375

@markrietveld
Copy link

Choose a reason for hiding this comment

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

Can this be switched to using the API level instead (Build.VERSION.SDK_INT)? That way there wouldn't need to be an update to the HockeySDK for every new preview build of the Android OS

@matthiaswenz
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Mark,
thanks for the tip. Since we get the minimum required OS version as a string like "5.0" and not an API level from the HockeyApp API we would then have to maintain a mapping of versions to API levels and update this with every new (even minor) release.

@markrietveld
Copy link

Choose a reason for hiding this comment

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

Hi Matthias,
I see. If the data for API level isn't there in the API, what would you think of flipping the fallback behavior? For example: the SDK could consider a version letter to always be newer than a version number. It seems unlikely that a preview build will ever be too old. We test our app on preview builds, and the current behavior makes it harder for us to keep betas up to date every time a new Android version preview comes out

@matthiaswenz
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Mark,
I agree, just created #72 for this. Appreciate any feedback.
Unfortunately at least this time you will have to update the SDK one more time to get this fix once it's out.
Best,
Mat

Please sign in to comment.