This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import badger2040 | |
import jpegdec | |
import pngdec | |
import qrcode | |
import gc | |
import os | |
import time | |
import math | |
import badger_os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -jar pepk.jar --keystore test.jks --alias test --output=output.zip | |
\ --encryptionkey=034200041E224EE22B45D19B23DB91BA9F52DE0A06513E03A5821409B34976FDEED6E0A47DBA48CC249DD93734A6C5D9A0F43461F9E140F278A5D2860846C2CF5D2C3C02 | |
\ --include-cert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HmsInstanceId inst = HmsInstanceId.getInstance(this); | |
Task<AAIDResult> idResult = inst.getAAID(); | |
idResult.addOnSuccessListener(new OnSuccessListener<AAIDResult>() { | |
@Override | |
public void onSuccess(AAIDResult aaidResult) { | |
String aaid = aaidResult.getId(); | |
textView.setText(aaid); | |
Log.d(TAG, "getAAID success:" + aaid ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CustomView customView = new CustomView(MainActivity.this); | |
appMessaging.addCustomView(customView); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void displayMessage(@NonNull AppMessage appMessage, @NonNull AGConnectAppMessagingCallback callback) { | |
Log.d(TAG, appMessage.getId() + ""); | |
showDialog(appMessage, callback); | |
} | |
private void showDialog(@NonNull final AppMessage appMessage, @NonNull final AGConnectAppMessagingCallback callback) { | |
View view = LayoutInflater.from(activity).inflate(R.layout.custom_view, null, false); | |
final AlertDialog dialog = new AlertDialog.Builder(activity).setView(view).create(); | |
Button click = view.findViewById(R.id.click); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomDisplayView implements AGConnectAppMessagingDisplay { | |
@Override | |
public void displayMessage(@NonNull AppMessage appMessage, | |
@NonNull AGConnectAppMessagingCallback callback) { | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'com.huawei.agconnect' | |
android {…..} | |
dependencies { | |
implementation fileTree(include: ['*.jar'], dir: 'libs') | |
implementation 'androidx.appcompat:appcompat:1.1.0' | |
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | |
testImplementation 'junit:junit:4.12' | |
androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
google() | |
jcenter() | |
maven {url 'https://developer.huawei.com/repo/'} | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:4.0.1' | |
classpath 'com.huawei.agconnect:agcp:1.5.2.300' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AGConnectConfig.Instance.Fetch(fetchInterval).AddOnSuccessListener(new TaskListener(this)).AddOnFailureListener(new TaskListener(this)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDictionary<string, Java.Lang.Object> ConfigVariables = new Dictionary<string, Java.Lang.Object>(); | |
ConfigVariables.Add("value1", "Default"); | |
AGConnectConfig.Instance.ApplyDefault(ConfigVariables); |
NewerOlder