Add the code to support a rating prompt (currently inactive)
This is just the general outline to see how it sounds and such. Currently this code is unreachable during normal use.
This commit is contained in:
parent
6a3697986b
commit
34ddb85bfe
|
@ -43,6 +43,9 @@
|
||||||
<string name="select_controller_message">Press any button on the controller to assign to port</string>
|
<string name="select_controller_message">Press any button on the controller to assign to port</string>
|
||||||
<string name="controller_already_in_use">This controller is already in use!</string>
|
<string name="controller_already_in_use">This controller is already in use!</string>
|
||||||
|
|
||||||
|
<string name="rating_title">Rate reicast</string>
|
||||||
|
<string name="rating_text">We are hard at work to bring the full Dreamcast experience to your Android device, so why not take a minute and tell us how you like it so far? We appreciate it!</string>
|
||||||
|
|
||||||
<string name="about_title">About reicast</string>
|
<string name="about_title">About reicast</string>
|
||||||
<string name="about_text">reicast is a dreamcast emulator\n\nVersion:</string>
|
<string name="about_text">reicast is a dreamcast emulator\n\nVersion:</string>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,10 @@ import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -155,6 +158,38 @@ public class FileBrowser extends Fragment {
|
||||||
if (!ImgBrowse) {
|
if (!ImgBrowse) {
|
||||||
navigate(sdcard);
|
navigate(sdcard);
|
||||||
} else {
|
} else {
|
||||||
|
if (0 == 1) {
|
||||||
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||||
|
parentActivity);
|
||||||
|
alertDialogBuilder.setTitle(getString(R.string.rating_title));
|
||||||
|
alertDialogBuilder
|
||||||
|
.setMessage(getString(R.string.rating_text))
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton("Rate It",
|
||||||
|
new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog,
|
||||||
|
int id) {
|
||||||
|
parentActivity.startActivity(new Intent(
|
||||||
|
Intent.ACTION_VIEW,
|
||||||
|
Uri.parse("market://details?id="
|
||||||
|
+ parentActivity
|
||||||
|
.getPackageName())));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton("Dismiss",
|
||||||
|
new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog,
|
||||||
|
int id) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// create alert dialog
|
||||||
|
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||||
|
|
||||||
|
// show it
|
||||||
|
alertDialog.show();
|
||||||
|
}
|
||||||
LocateGames mLocateGames = new LocateGames();
|
LocateGames mLocateGames = new LocateGames();
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
mLocateGames
|
mLocateGames
|
||||||
|
|
Loading…
Reference in New Issue