android,kotlin2023. 7. 19. 09:48

[kotlin]Handler deprecated 해결방법

 

his constructor is deprecated.
Implicitly choosing a Looper during Handler construction can lead to bugs where operations are silently lost (if the Handler is not expecting new tasks and quits), crashes (if a handler is sometimes created on a thread without a Looper active), or race conditions, where the thread a handler is associated with is not what the author anticipated. Instead, use an Executor or specify the Looper explicitly, using Looper#getMainLooper, {link android.view.View#getHandler}, or similar. If the implicit thread local behavior is required for compatibility, use new Handler(Looper.myLooper()) to make it clear to readers.

 

val handler = Handler(Looper.getMainLooper())
handler.postDelayed({
  		// 고고
    }
}, 100)

 

Posted by thdeodls85
android,kotlin2023. 6. 27. 17:06

[android]textview html a href not working 해결방법

 

mTv.movementMethod = LinkMovementMethod.getInstance()
mTv.text = Html.fromHtml("<a href=\"http://www.google.com\">This is a link</a>")

 

<a href=\"http://www.google.com\">This is a link</a>

 

이렇게 해야 들어간다..

Posted by thdeodls85
android,kotlin2023. 6. 22. 14:45

[android]Caller com.qstag.qsreader needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms 해결방법

 

manifest 에 추가

 

    <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />

Posted by thdeodls85
android,kotlin2023. 6. 22. 14:31

[android]Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles 해결방법

 

PendingIntent.FLAG_MUTABLE

 

[참조] https://ddolcat.tistory.com/2393

 

[안드로이드] Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when crea

targetSdkVersion 31로 상향 조정하면서 여기저기서 오류가 튀어 나온다. 오류 내용은 다음과 같다. 2022-10-02 12:29:09.109 6268-6309/com.test E/AndroidRuntime: FATAL EXCEPTION: pool-9-thread-1 Process: com.test, PID: 6268 java.lan

ddolcat.tistory.com

 

Posted by thdeodls85
android,kotlin2023. 5. 31. 09:09

[android]com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The custom token corresponds to a different audience 해결방법

 

auth

val auth = FirebaseAuth.getInstance()

signInWithCustomToken

 

token 제대로 만들지 않았다는건데...

 

나 같은 경우는 서버에서 custom token 만들어서 리턴 구현했다..

 

firebase custom token 만드는걸 서버에서 제공하는데... json 싱크가 맞지 않아서 문제가 생겼다..

 

앱과 서버상의 json이 동일해야 한다..

Posted by thdeodls85
android,kotlin2023. 5. 16. 20:07
android,kotlin2023. 5. 16. 19:58

[android studio] UpsideDownCake com.google.android.material:material:1.10.0-alpha01 이슈 해결방법

 

New minimum requirements for your app's project:

  • Update compileSdkVersion to "android-UpsideDownCake"

 

release 문서에 보면 이렇게 하란다..

 

[참조] https://github.com/material-components/material-components-android/releases

 

Releases · material-components/material-components-android

Modular and customizable Material Design UI components for Android - material-components/material-components-android

github.com

 

Posted by thdeodls85
android,kotlin2023. 5. 15. 16:59

[kotlin]com.nhn.android.naverlogin.ui.OAuthCustomTabActivity 이슈해결방법

 

target version 올렷더니, 

 

com.nhn.android.naverlogin.ui.OAuthCustomTabActivity

이슈가 나온다..

 

<!-- naver login -->
<activity android:name="com.nhn.android.naverlogin.ui.OAuthCustomTabActivity"
    android:exported="true">
</activity>

manifast 추가해주면 된다. 

Posted by thdeodls85