Google Play で Android アプリケーション (.apk) をアップロードしようとしていますが、有料アプリケーションで (.apk) のライセンス キーが必要ですか? はいの場合、なぜ必要なのですか?
MyLicenseCheckerCallback は、スーパー タイプ メソッドを実装する必要があるというエラーをスローします。allow() は整数の引数を渡さなければならないと言われていますが、その引数は渡す必要があります。
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);
}
}