versionName is 2.31, 2.4, or 3.0. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.zxing.client.android"
- android:versionName="3.2"
- android:versionCode="45">
+ android:versionName="3.21 beta 1"
+ android:versionCode="46">
<!-- We require Cupcake (Android 1.5) or later, but are really targeting Donut. -->
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="4"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/>
<uses-permission android:name="android.permission.VIBRATE"/>
- <uses-permission android:name="android.permission.FLASHLIGHT"/>
+ <uses-permission android:name="android.permission.FLASHLIGHT"/>
</manifest>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<h3><center>What's new in this version</center></h3>
+<p>New in version 3.21:</p>
+<ul>
+ <li>Fixed a bug with detecting camera resolutions on some devices.</li>
+</ul>
<p>New in version 3.2:</p>
<ul>
+ <li>Added a Google Shopper button when scanning products.</li>
<li>Allowed devices without autofocus to see Barcode Scanner in the Market.</li>
<li>New Finnish, Swedish, Dutch, and Czech translations.</li>
- <li>Added a Google Shopper button when scanning products.</li>
<li>Fixed a possible crash on unsupported hardware.</li>
<li>Better layouts on QVGA devices like the HTC Tattoo.</li>
<li>Added the ability to email your scan history.</li>
int lastVersion = prefs.getInt(PreferencesActivity.KEY_HELP_VERSION_SHOWN, 0);
if (currentVersion > lastVersion) {
prefs.edit().putInt(PreferencesActivity.KEY_HELP_VERSION_SHOWN, currentVersion).commit();
- Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
- intent.setClassName(this, HelpActivity.class.getName());
+ Intent intent = new Intent(this, HelpActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
+ // Show the default page on a clean install, and the what's new page on an upgrade.
+ String page = (lastVersion == 0) ? HelpActivity.DEFAULT_PAGE : HelpActivity.WHATS_NEW_PAGE;
+ intent.putExtra(HelpActivity.REQUESTED_PAGE_KEY, page);
startActivity(intent);
return true;
}
private static final String TAG = HelpActivity.class.getName();
private static final String[] BUGGY_MODEL_SUBSTRINGS = {"Behold II", "Pulse"};
- private static final Uri BUGGY_URI = Uri.parse("http://code.google.com/p/zxing/wiki/FrequentlyAskedQuestions");
- private static final String DEFAULT_URL = "file:///android_asset/html/index.html";
+ private static final Uri BUGGY_URI =
+ Uri.parse("http://code.google.com/p/zxing/wiki/FrequentlyAskedQuestions");
+
+ // Use this key and one of the values below when launching this activity via intent. If not
+ // present, the default page will be loaded.
+ public static final String REQUESTED_PAGE_KEY = "requested_page_key";
+ public static final String DEFAULT_PAGE = "index.html";
+ public static final String WHATS_NEW_PAGE = "whatsnew.html";
+ private static final String BASE_URL = "file:///android_asset/html/";
private WebView webView;
private Button backButton;
}
};
- private final DialogInterface.OnClickListener groupsListener = new DialogInterface.OnClickListener() {
+ private final DialogInterface.OnClickListener groupsListener =
+ new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogInterface, int i) {
Intent intent = new Intent(Intent.ACTION_VIEW, BUGGY_URI);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
HelpActivity.this.startActivity(intent);
}
};
webView = (WebView)findViewById(R.id.help_contents);
webView.setWebViewClient(new HelpClient());
+
+ Intent intent = getIntent();
if (icicle != null) {
webView.restoreState(icicle);
+ } else if (intent != null) {
+ String page = intent.getStringExtra(REQUESTED_PAGE_KEY);
+ if (page != null && page.length() > 0) {
+ webView.loadUrl(BASE_URL + page);
+ } else {
+ webView.loadUrl(BASE_URL + DEFAULT_PAGE);
+ }
} else {
- webView.loadUrl(DEFAULT_URL);
+ webView.loadUrl(BASE_URL + DEFAULT_PAGE);
}
backButton = (Button)findViewById(R.id.back_button);
backButton.setOnClickListener(backListener);
-
Button doneButton = (Button)findViewById(R.id.done_button);
doneButton.setOnClickListener(doneListener);
}