0
我想在谷歌播放中上傳Android應用程序(.apk),是否需要在付費應用程序中擁有(.apk)的許可證密鑰。如果是,爲什麼需要它?關於Google Play中的Android應用程序
MyLicenseCheckerCallback拋出它應該實現的錯誤,然後超類型的方法。 它說允許()必須通過一個整數參數,哪個參數應該通過 你可以建議我一些幫助。
private class MyLicenseCheckerCallback implements LicenseCheckerCallback {
@Override
public void allow() {
if (isFinishing()) {
// Don't update UI if Activity is finishing.
return;
}
// Should allow user access.
startMainActivity();
}
@Override
public void applicationError(ApplicationErrorCode errorCode) {
if (isFinishing()) {
// Don't update UI if Activity is finishing.
return;
}
// This is a polite way of saying the developer made a mistake
// while setting up or calling the license checker library.
// Please examine the error code and fix the error.
toast("Error: " + errorCode.name());
startMainActivity();
}
@Override
public void dontAllow() {
if (isFinishing()) {
// Don't update UI if Activity is finishing.
return;
}
// Should not allow access. In most cases, the app should assume
// the user has access unless it encounters this. If it does,
// the app should inform the user of their unlicensed ways
// and then either shut down the app or limit the user to a
// restricted set of features.
// In this example, we show a dialogue that takes the user to Market.
showDialog(0);
}
}
如何在(.apk)中添加許可證密鑰? –
hai Gaddiel請查看我更新的答案!!!!!! 1 – AndroidEnthusiastic
請確認上述內容。 –