SMALL

SharedPreferences pref = getSharedPreferences(키String, 0);


try{

 PackageManager pm = this.getPackageManager();

업데이트 내역 표시


 PackageInfo packageInfo = pm.getPackageInfo(getPackageName(), 0);

 int VERSION = packageInfo.versionCode;

 int old_Ver = pref.getInt(키String, 0);

 

 if(old_Ver<VERSION){

  TextView msg=new TextView(this);

  msg.setTextSize(TypedValue.COMPLEX_UNIT_SP,15);

  msg.setTextColor(0xffffffff);

  msg.setText(R.string.update);

  new AlertDialog.Builder(this)

  .setTitle("업데이트 내역")

  .setView(msg)       

  .setPositiveButton("확인", null)

  .show();

  SharedPreferences.Editor edit = pref.edit();

  edit.putInt(키String,  VERSION);

  edit.commit();

 }

}

catch(Exception e){}

LIST