<Preference android:title="@string/prefs_recommend" android:key="recommend" />
<Preference android:title="@string/prefs_feedback" android:key="feedback" />
<Preference android:title="@string/prefs_imprint" android:key="imprint" />
-
- <Preference android:id="@+id/about_app"
- android:title="@string/about_title"
+
+ <Preference android:id="@+id/about_app"
+ android:title="@string/about_title"
android:key="about_app" />
<Preference android:id="@+id/beta_link"
android:title="Download latest beta version"
android:key="beta_link" />
- </PreferenceCategory>
+ <Preference android:id="@+id/changelog_link"
+ android:title="Changelog beta version"
+ android:key="changelog_link" />
+ </PreferenceCategory>
</PreferenceScreen>
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
- if (latestVersion == -1){
+ if (latestVersion == -1) {
Toast.makeText(getApplicationContext(), "No information available!", Toast.LENGTH_SHORT).show();
}
- if (latestVersion > currentVersion){
- String betaLinkWeb = (String) getText(R.string.beta_link) + latestVersion + ".apk";
- if (betaLinkWeb != null && betaLinkWeb.length() > 0) {
- Uri uriUrl = Uri.parse(betaLinkWeb);
- Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
- startActivity(intent);
- return true;
- }
- } else {
- Toast.makeText(getApplicationContext(), "No new version available!", Toast.LENGTH_SHORT).show();
+ if (latestVersion > currentVersion) {
+ String betaLinkWeb = (String) getText(R.string.beta_link) + latestVersion + ".apk";
+ if (betaLinkWeb != null && betaLinkWeb.length() > 0) {
+ Uri uriUrl = Uri.parse(betaLinkWeb);
+ Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
+ startActivity(intent);
return true;
}
+ } else {
+ Toast.makeText(getApplicationContext(), "No new version available!", Toast.LENGTH_SHORT).show();
+ return true;
+ }
+ return true;
+ }
+ });
+ }
+
+ /* Link to Beta apks */
+ Preference pChangelogLink = findPreference("changelog_link");
+ if (pChangelogLink != null){
+ pChangelogLink.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ String betaLinkWeb = getString(R.string.changelog);
+ if (betaLinkWeb != null && betaLinkWeb.length() > 0) {
+ Uri uriUrl = Uri.parse(betaLinkWeb);
+ Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
+ startActivity(intent);
+ return true;
+ }
return true;
}
});