336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
try {
val info = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNING_CERTIFICATES)
val signatures = info.signingInfo.apkContentsSigners
val md = MessageDigest.getInstance("SHA")
for (signature in signatures) {
val md: MessageDigest
md = MessageDigest.getInstance("SHA")
md.update(signature.toByteArray())
val key = String(Base64.encode(md.digest(), 0))
Log.d("Hash key:", "!!!!!!!$key!!!!!!")
}
} catch(e: Exception) {
Log.e("name not found", e.toString())
}
}
'프로그램 > Android' 카테고리의 다른 글
E/net.daum.mf.map.n.api.NativeMapLibraryLoader: Can`t load DaumMapEngineApi.so file (0) | 2019.04.08 |
---|---|
[Kotlin] 카카오맵 사용시, INSTALL_FAILED_NO_MATCHING_ABIS 에러 (0) | 2019.04.08 |
Reference (0) | 2016.11.04 |
No resource identifier found for attribute 'srcCompat' in package (0) | 2016.11.04 |
GCM API Key 생성 방법 (0) | 2015.11.07 |