/* * Copyright 2020. Huawei Technologies Co., Ltd. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/
/** * Checking whether user has purchased this application or not. * * @param activity Main activity of application that needs verification. * @param pkgName Package name of application that needs verification. * @param drmId Drm id that assigned by The Huawei Developer. * @param drmPublicKey Drm public key that assigned by The Huawei Developer. * @param showErrorDialog value indicates whether the SDK displays error messages. Default is true. * @param callback Callback of check result.
*/ publicstaticvoid check(final Activity activity, final String pkgName, final String drmId, final String drmPublicKey, finalboolean showErrorDialog, final DrmCheckCallback callback) {
Log.i(TAG, "begin check showErrorDialog" + showErrorDialog);
Log.d(TAG, "check: pkgName=" + pkgName);
ApplicationWrapper.init(activity);
checkFromCache(activity, pkgName, drmId, drmPublicKey, showErrorDialog, callback);
}
/** * Checking whether user has purchased this application or not. * * @param activity Main activity of application that needs verification. * @param pkgName Package name of application that needs verification. * @param drmId Drm id that assigned by The Huawei Developer. * @param drmPublicKey Drm public key that assigned by The Huawei Developer. * @param callback Callback of check result.
*/ publicstaticvoid check(Activity activity, String pkgName, String drmId, String drmPublicKey, DrmCheckCallback callback) {
Log.i("Drm", "begin check");
check(activity, pkgName, drmId, drmPublicKey, true, callback);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.