Skip to content

Commit

Permalink
Merge pull request TeamAmaze#1799 from TranceLove/bugfix/issue1795
Browse files Browse the repository at this point in the history
Fallback to webview URL if Google Play is not available
  • Loading branch information
TranceLove authored Dec 27, 2019
2 parents 87e1f78 + 468d747 commit b982512
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.amaze.filemanager.fragments;

import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
Expand Down Expand Up @@ -129,8 +130,13 @@ public void onClick(View v) {
break;
case R.id.linear_layout_get_cloud:
Intent cloudPluginIntent = new Intent(Intent.ACTION_VIEW);
cloudPluginIntent.setData(Uri.parse("market://details?id=com.filemanager.amazecloud"));
startActivity(cloudPluginIntent);
cloudPluginIntent.setData(Uri.parse(getString(R.string.cloud_plugin_google_play_uri)));
try {
startActivity(cloudPluginIntent);
} catch (ActivityNotFoundException ifGooglePlayIsNotInstalled) {
cloudPluginIntent.setData(Uri.parse(getString(R.string.cloud_plugin_google_play_web_uri)));
startActivity(cloudPluginIntent);
}
break;
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -647,5 +647,7 @@
<string name="ssh_connect_failed_host_key_changed_prompt">IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n\nSomeone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the host key has just been changed. The fingerprint for the public key sent by the remote host does not match the one stored in Amaze.\n\nYou may proceed with updating host fingerprint or cancel updating SSH connection settings.</string>
<string name="update_host_key">Update Host Key</string>
<string name="cancel_recommended">Cancel (Recommended)</string>
<string name="cloud_plugin_google_play_uri" translatable="false">market://details?id=com.filemanager.amazecloud</string>
<string name="cloud_plugin_google_play_web_uri" translatable="false">https://play.google.com/store/apps/details?id=com.filemanager.amazecloud</string>
</resources>

0 comments on commit b982512

Please sign in to comment.