2012-09-12 3 views
0

나는 approid에서 구입을 구현하려고했습니다. 내가 대신 "android.test.purchased"을 "com.company.item.itemID" 응답의 제품 ID를 설정 한 경우Android 인앱 구매 상품을 찾을 수 없습니다.

public void onClick(View v) { 
    switch (v.getId()) { 
    case R.id.main_purchase_yes: 
     if(BillingHelper.isBillingSupported()){ 
      BillingHelper.requestPurchase(TopOption.this, "android.test.purchased"); 
      // android.test.purchased or android.test.canceled or android.test.refunded or com.blundell.item.passport 
     } else { 
      Toast msg = Toast.makeText(TopOption.this, "Can't purchase on this device", Toast.LENGTH_LONG); 

      msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2); 

      msg.show(); 
      Log.i(TAG,"Can't purchase on this device"); 
      // XXX press button before service started will disable when it shouldnt 
     } 

     break; 
    default: 
     // nada 
     Log.i(TAG,"default. ID: "+v.getId()); 
     break; 
    } 

을하지만 : 나는 모든 것을 ... 나는 다음 코드를 사용하십시오 올바르게 설정 나는 가게에서 ItemNotFound를 얻었습니까? 누군가가 이것을 어떻게 처리해야하는지 알고 있습니까?

내 manifest.xml에 나는 허가, 서비스 및 기타와 같은 모든 것을 설정했습니다 ....... 그리고 어디서나 com.companyname.AppID를 설정했습니다. google pla에서 앱을 설정했습니다. 항목 i는 게시 됨으로 설정됩니다.

누구와이 작업을 해야할지 알고 있습니까?

업데이트 :

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.companyname.productid" 
android:versionCode="1" 
android:versionName="1.0" android:installLocation="preferExternal"> 

<uses-sdk 
    android:minSdkVersion="4" 
    android:targetSdkVersion="15" /> 
<supports-screens 
android:largeScreens="true" 
android:normalScreens="true" 
android:smallScreens="true" 
android:anyDensity="true" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="com.android.vending.BILLING" /> 
<application 

    android:icon="@drawable/ic_launcher" 
    android:label="@string/newname" 
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> 
    <activity 
     android:name=".TopOption" 
     android:label="@string/appName" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name=".mygame" 
     android:label="@string/title_activity_main" 
     android:screenOrientation="portrait"> 
    </activity> 
    <activity 
     android:name=".aboutclass" 
     android:label="@string/title_activity_main" 
     android:screenOrientation="portrait" > 
    </activity> 

    <service android:name=".BillingService" /> 
    <receiver android:name=".BillingReceiver"> 
    <intent-filter> 
     <action android:name="com.android.vending.billing.IN_APP_NOTIFY" /> 
     <action android:name="com.android.vending.billing.RESPONSE_CODE" /> 
     <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />   
    </intent-filter> 
    </receiver> 

</application> 



</manifest> 
+0

당신이 모든 것을하고 있는지 확신 할 수 없습니다. 그렇지 않으면 거기에 없을 것입니다. 당신이 확신하는 매니페스트와 같은 대부분의 정보를 게시하십시오. 또한 인앱 APK를 등록하기 위해 Google 사이트에서 진행 한 프로세스에 대해 자세히 설명해주십시오. – shkschneider

답변

1

이 시도 :

  1. 수출하여 응용 프로그램을 APK를 파일로.
  2. APK를 Google Play에 업로드합니다.
  3. 테스트 장치에 동일한 APK를 연결하십시오.
  4. Google Play에서 서버를 업데이트하는 데 1 시간 정도 기다려주세요.
  5. 설치된 APK를 테스트하십시오.