2012-07-31 2 views
0

내 앱에서 알림을 보냈습니다. 이며 내 기본 활동에 완벽합니다. 하지만 경고를 3 번 ​​받고 나면 사라지기를 원합니다. 주에 다시 돌아올 때가 없습니다. 활동 이것이 내 경고 코드Android 알리미가 사라짐

 new AlertDialog.Builder(this) 
    .setTitle("Browser feature") 
    .setMessage("The browser feature is currently beta, so it won't work perfectly. To get an image from the internet, click on the browser then google your image, and save it then import it using the gallery option.") 
    .setPositiveButton("Continue", new DialogInterface.OnClickListener() { 
     public void onClick(DialogInterface dialog, int which) { 
      Log.d("AlertDialog", "Positive"); 
     } 
    }) 
    .show(); 

답변

1

스토어 사람이 SharedPreference로 경고 된 횟수입니다

나타납니다. 그들이

http://developer.android.com/reference/android/content/SharedPreferences.html

공유 환경은 글로벌 이러한 유형의 정보를 유지하는 가장 좋은 장소입니다 < 3.

을 계산하는 경우 때마다 카운터와 만 문제를 업데이트합니다.

+0

감사합니다. ..) (늦은 x.x에 답장을 드려 죄송합니다.) –