Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid license "LICENSED RESPONSE" error
    primarykey
    data
    text
    <p>I have problem in testing the "LICENSED" response of LVL. I already changed the test license response in dashboard in edit profile in market web site.</p> <p>When I set to "NOT LICENSED", it will prompt to buy or exit, but if I set to LICENSE, after waiting for "CHECKING LICENSE" progress bar, it will not load my main activity page, the check license loops infinitely, and I need to force close the process. I already added licensecheck Java file name in the manifest and included the intent section.</p> <p>The following is what I have captured in logcat. Anyone have an idea what's going on? How do I fix my code?</p> <pre><code>I/LICENSE ( 312): checkLicense I/LicenseChecker( 312): Binding to licensing service. I/ActivityManager( 59): Start proc com.android.vending for service com.android.vending/.licensing.LicensingService: pid=320 uid=10019 gids ={3003} I/LicenseChecker( 312): Calling checkLicense on service for com.test.apps1 I/ActivityManager( 59): Displayed activity com.test.apps1/.MActivity: 3586 ms (total 3586 ms) I/LicenseChecker( 312): Start monitoring timeout. I/ARMAssembler( 59): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x305798:0x305854] in 914005 ns D/GoogleLoginService( 170): onBind: Intent { act=android.accounts.AccountAuthenticator cmp=com.google.android.gsf/.loginservice.GoogleLogin Service } I/LicenseChecker( 312): Received response. I/LicenseChecker( 312): Clearing timeout. E/LicenseValidator( 312): CORI APP LICENSED! W/ServerManagedPolicy( 312): License validity timestamp (VT) missing, caching for a minute W/ServerManagedPolicy( 312): License retry timestamp (GT) missing, grace period disabled W/ServerManagedPolicy( 312): Licence retry count (GR) missing, grace period disabled D/LicenseChecker( 312): Allow I/ActivityManager( 59): Starting activity: Intent { cmp=com.test.apps1/.MActivity } I/LICENSE ( 312): checkLicense D/dalvikvm( 312): GC_FOR_MALLOC freed 3870 objects / 267592 bytes in 92ms I/LicenseChecker( 312): Using cached license response D/LicenseChecker( 312): Allow I/ActivityManager( 59): Starting activity: Intent { cmp=com.test.apps1/.MActivity } I/LICENSE ( 312): checkLicense I/LicenseChecker( 312): Using cached license response D/LicenseChecker( 312): Allow I/ActivityManager( 59): Starting activity: Intent { cmp=com.test.apps1/.MActivity } I/LICENSE ( 312): checkLicense I/LicenseChecker( 312): Using cached license response D/LicenseChecker( 312): Allow I/ActivityManager( 59): Starting activity: Intent { cmp=com.test.apps1/.MActivity } I/LICENSE ( 312): checkLicense I/LicenseChecker( 312): Using cached license response D/LicenseChecker( 312): Allow I/ActivityManager( 59): Starting activity: Intent { cmp=com.test.apps1/.MActivity } I/LICENSE ( 312): checkLicense I/LicenseChecker( 312): Using cached license response D/LicenseChecker( 312): Allow I/ActivityManager( 59): Starting activity: Intent { cmp=com.test.apps1/.MActivity } I/LICENSE ( 312): checkLicense W/ActivityManager( 59): Launch timeout has expired, giving up wake lock! W/ActivityManager( 59): Activity idle timeout for HistoryRecord{44003148 com.test.apps1/.MActivity} </code></pre> <pre><code>public void allow() { Log.d("LicenseChecker","Allow"); //Log.i("LICENSE", "allow"); if (isFinishing()) { // Don't update UI if Activity is finishing. return; } // Should allow user access. displayResult(getString(R.string.allow)); // Should allow user access. startMainActivity(); } </code></pre> <p>Is this related to the cache response timestamp? If yes, how can I change and modify it?</p> <pre><code>W/ServerManagedPolicy( 312): License validity timestamp (VT) missing, caching for a minute W/ServerManagedPolicy( 312): License retry timestamp (GT) missing, grace period disabled W/ServerManagedPolicy( 312): Licence retry count (GR) missing, grace period disabled </code></pre> <hr> <p>Do I need to modify ServerManagedPolicy?</p> <pre><code>public boolean allowAccess() { long ts = System.currentTimeMillis(); if (mLastResponse == LicenseResponse.LICENSED) { // Check if the LICENSED response occurred within the validity timeout. if (ts &lt;= mValidityTimestamp) { // Cached LICENSED response is still valid. return true; } } else if (mLastResponse == LicenseResponse.RETRY &amp;&amp; ts &lt; mLastResponseTime + MILLIS_PER_MINUTE) { // Only allow access if we are within the retry period or we haven't used up our // max retries. return (ts &lt;= mRetryUntil || mRetryCount &lt;= mMaxRetries); } return false; } </code></pre> <p>Also, how can I do the following?</p> <ol> <li><p>When there is no license (either no license in Google server or no cached license), then prompt disallow and go to market.</p></li> <li><p>When there is a cached license, allow user to run apps (no matter if there is no network or no network connection).</p></li> <li><p>When there is a license in Google server (network mode), but no cached license, allow user to run apps.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload