Option to clean up SDL config left from the old app version
This commit is contained in:
@@ -62,8 +62,8 @@ import java.io.BufferedReader;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
@Override
|
||||
@@ -664,6 +664,17 @@ public class MainActivity extends Activity {
|
||||
|
||||
};
|
||||
|
||||
public int getApplicationVersion()
|
||||
{
|
||||
try {
|
||||
PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
return packageInfo.versionCode;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
System.out.println("libSDL: Cannot get the version of our own package: " + e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public FrameLayout getVideoLayout() { return _videoLayout; }
|
||||
|
||||
static int NOTIFY_ID = 12367098; // Random ID
|
||||
|
||||
Reference in New Issue
Block a user