2013-03-01 2 views
3

내 애플 rate 아래 클래스를 사용하고 있습니다. 하지만 이렇게 할 때마다 "요청한 항목을 찾을 수 없습니다"라고 표시됩니다. 링크 < play.google.com/store/apps/details?id=com.xxx.xxx>는 브라우저에서 완벽하게 작동합니다. 왜 여기서 일하지 않는거야?내 애플 리케이션을 평가할 수 없습니다

내가 다른 패키지의 패키지 이름을 다른 앱과 동일하게 변경하면 또 한가지 주목할 것입니다. 이전 버전을 업로드하는 동안 무언가가 빠졌을 가능성이 있습니까? 지금

public class apprater { 
private final static String APP_TITLE = "abcd"; 
private final static String APP_PNAME = "com.xxx.xxx"; 

private final static int DAYS_UNTIL_PROMPT = 3; 
private final static int LAUNCHES_UNTIL_PROMPT = 7; 

public static void app_launched(Context mContext) { 
    SharedPreferences prefs = mContext.getSharedPreferences("apprater", 0); 
    if (prefs.getBoolean("dontshowagain", false)) { return ; } 

    SharedPreferences.Editor editor = prefs.edit(); 

    // Increment launch counter 
    long launch_count = prefs.getLong("launch_count", 0) + 1; 
    editor.putLong("launch_count", launch_count); 

    // Get date of first launch 
    Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0); 
    if (date_firstLaunch == 0) { 
     date_firstLaunch = System.currentTimeMillis(); 
     editor.putLong("date_firstlaunch", date_firstLaunch); 
    } 

    // Wait at least n days before opening 
    if (launch_count >= LAUNCHES_UNTIL_PROMPT) { 
     if (System.currentTimeMillis() >= date_firstLaunch + 
       (DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000)) { 
      showRateDialog(mContext, editor); 
     } 
    } 

    editor.commit(); 
} 

public static void showRateDialog(final Context mContext, final SharedPreferences.Editor editor) { 
    final Dialog dialog = new Dialog(mContext); 
    dialog.setTitle("Rate " + APP_TITLE); 

    LinearLayout ll = new LinearLayout(mContext); 
    ll.setOrientation(LinearLayout.VERTICAL); 

    TextView tv = new TextView(mContext); 
    tv.setText("If you enjoy using " + APP_TITLE + ", please take a moment to rate it. Thanks for your support!"); 
    tv.setWidth(240); 
    tv.setPadding(4, 0, 4, 10); 
    ll.addView(tv); 

    Button b1 = new Button(mContext); 
    b1.setText("Rate " + APP_TITLE); 
    b1.setOnClickListener(new OnClickListener() { 
     public void onClick(View v) { 
      mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME))); 
      System.out.println("eeeeeeeeeeeee: "+APP_PNAME); 
      dialog.dismiss(); 
     } 
    });   
    ll.addView(b1); 

    Button b2 = new Button(mContext); 
    b2.setText("Remind me later"); 
    b2.setOnClickListener(new OnClickListener() { 
     public void onClick(View v) { 
      dialog.dismiss(); 
     } 
    }); 
    ll.addView(b2); 

    Button b3 = new Button(mContext); 
    b3.setText("No, thanks"); 
    b3.setOnClickListener(new OnClickListener() { 
     public void onClick(View v) { 
      if (editor != null) { 
       editor.putBoolean("dontshowagain", true); 
       editor.commit(); 
      } 
      dialog.dismiss(); 
     } 
    }); 
    ll.addView(b3); 

    dialog.setContentView(ll);   
    dialog.show();   
} 
} 

이 사용하고 무엇을 :

public void onClick(View v) { 
       final String appName = APP_PNAME; 

       try 
       { 
        mContext.startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=com.xxx.xxx"))); 


       } 
       catch (android.content.ActivityNotFoundException anfe) 
       {       
        mContext.startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://play.google.com/store/apps/details?id=com.xxx.xxx"))); 
       } 


       // mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME))); 


       dialog.dismiss(); 
      } 
+0

을보십시오 : // '링크를, 당신은'play.google를 사용하는 경우 .com/store ... '를 선택하면 Google Play 앱에서 시스템을 열 것을 제안합니다. –

답변

0

당신은`시장을 사용하는이 하나

final String appName = getPackageName(); 

    try 
    { 
     startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id="+ appName)));      
    } 
    catch (android.content.ActivityNotFoundException anfe) 
    {       
     startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://play.google.com/store/apps/details?id="+ appName))); 
    } 
+0

여전히 같은 문제입니다. –

+0

때로는 휴대 기기에 영향을 줄 시간이 있습니다. 개발자 계정에서 하나의 앱을 삭제하고 브라우저에서 항목을 찾지 못했다고 말하면서 동일한 문제가 발생했으나 모바일에 링크를 사용하여 게임을 시작했을 때 다운로드하여 볼 수있었습니다. 그래서 나는 브라우저보다 모바일 플레이 스토어에 영향을 줄 시간이 더 많다고 생각합니다. –

+0

하지만 사실은 이미 패키지 이름이 com.xxx.xxx' 인 시장에 내 앱이 있고 내가 출시 할 예정인 최신 버전에 등급 기능을 추가하려고합니다. –

관련 문제