Roar Gronmo
08/18/2020, 5:45 PMRoar Gronmo
08/28/2020, 10:00 AMRoar Gronmo
08/28/2020, 10:31 AMMarek Kubiczek
10/21/2020, 8:23 AMPagingData
? Seems like it only supports map
, flatMap
and filter
.Vivekpanchal64
11/21/2020, 11:48 AMnote8g2018
03/03/2021, 10:10 AMRemon Shehata
03/21/2021, 7:47 PMProcessLifecycleOwner
and I am adding observer like this
LifecycleRegistry.createUnsafe(ProcessLifecycleOwner.get()).addObserver(onProcessLifeCycleResume)
and here is my observer
class OnProcessLifeCycleResume(private val doInOnResume: () -> Unit) : LifecycleObserver {
private val TAG = "LifeCycleDemo"
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
fun onMoveToForeground() {
val handler = Handler(Looper.getMainLooper())
Log.d(TAG, "onMoveToForeground: ")
doInOnResume()
}
}
but it's never triggered. any idea why?Tanvi Goyal
05/06/2021, 2:08 PMUnable to get provider androidx.work.impl.WorkManagerInitializer: java.lang.ClassNotFoundException: Didn't find class "androidx.work.impl.WorkManagerInitializer" on path: DexPathList
After researching a bit, I found this maybe due to the obfuscation done by proguard on the classNames used to instantiate the Worker classes. Tried to fix this by adding this in the proguard but with no luck.
-keep class androidx.work.** { *; }
Any idea what I am missing here ?Tim Malseed
08/03/2021, 2:48 PMandroidx.test.core
APIs, and I suspect that's something to do with it.
When I try to run an instrumented test, I get something like:
AndroidJUnitRunner cannot be cast to org.robolectric.android.fakes.RoboMonitoringInstrumentation
Jishin Dev [JD]
12/23/2021, 7:35 AMandroidx.datastore:datastore-preferences:1.0.0
?
Fatal Exception: java.lang.IllegalAccessError: Illegal class access: 'c.l.a.p' attempting to access 'kotlinx.coroutines.u' (declaration of 'c.l.a.p' appears in base.apk)
at androidx.datastore.core.SingleProcessDataStore.a(SingleProcessDataStore.java:28)
at androidx.datastore.preferences.core.PreferenceDataStore.updateData(PreferenceDataStore.java:8)
at androidx.datastore.preferences.core.PreferencesKt.edit(PreferencesKt.java:6)
at com.example.crashguard.data.repo.PrefsRepo$set$1.invokeSuspend(PrefsRepo.java:2)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:2)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:86)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoopImplBase.java:4)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(BlockingCoroutine.java:2)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(BuildersKt__BuildersKt.java:6)
at kotlinx.coroutines.BuildersKt.runBlocking(BuildersKt.java:6)
at kotlinx.coroutines.BuildersKt.runBlocking$default(BuildersKt.java:6)
Mahdi
01/17/2022, 7:49 AMNoushad Chullian
02/20/2022, 9:10 AMDragos Rachieru
04/04/2022, 12:06 PMViewModel
logic in kotlin to make it multiplatform.
I was thinking about making the ViewModel
available for multiplatform applications(like compose for desktop) so I can reuse more code for my app.
My use case is a multiplatform navigation for Compose for Desktop
that will work on android and desktop(js and ios in the future). I need to create the ViewModelStoreOwner
to be part of the navigation libraryJames Black
04/14/2022, 3:17 AMNoushad Chullian
04/16/2022, 10:20 AMAG
05/26/2022, 4:59 PMplugins {
id 'androidx.benchmark' version '1.0.0' apply false
}
but getting this errorkotlinforandroid
06/11/2022, 4:23 PMCoroutineWorker
do download some items. I use setForeground
to initiate a foreground notification. However, when updating the notification to display the progress, the notification icon moves around in the status bar. Does anyone know why this happens? I use setForeground
to update the notification.gts13
01/11/2023, 6:03 PMpreferencesDataStore
with two different names?Filip Wiesner
04/17/2023, 2:54 PMYashwant Gowla
07/04/2023, 8:34 AMIman Sadrian
07/31/2023, 2:04 PMMedia3
recently, and I could really use some help. To give you a brief overview, I migrated our app from ExoPlayer to Media3 and followed Google's migration guide. However, it appears that there's no straightforward way to handle MediaButton KeyEvent actions manually.
I've been trying to find a solution, but so far, I haven't been successful.
I tried to elaborate my question here
I'd greatly appreciate any insights or suggestions you may have on how to handle MediaButton actions manually with Media3.
Thank you in advance for your help!
#media3 #exojordond
08/01/2023, 7:51 PMOluwafemi Ogundipe
09/27/2023, 10:20 AMfun VideoPreviewScreen(
uri: String,
) {
val exoPlayer = remember(context) {
ExoPlayer.Builder(context).build().apply {
setMediaItem(MediaItem.fromUri(uri))
prepare()
}
}
Box{
AndroidView(
factory = { context ->
PlayerView(context).apply {
player = exoPlayer
exoPlayer.play()
exoPlayer.addListener(object : Player.Listener {
override fun onPlaybackStateChanged(state: Int) {
super.onPlaybackStateChanged(state)
when (state) {
Player.STATE_READY -> {
if (shouldSetOnReady) {
startTime.value = 0f
endTime.value =
exoPlayer.contentDuration.toFloat()
shouldSetOnReady = false
}
}
Player.STATE_BUFFERING -> {
}
Player.STATE_ENDED -> {
}
Player.STATE_IDLE -> {
}
else -> {
}
}
}
})
exoPlayer.prepare()
exoPlayer.play()
}
},
update = {
},
)
}
}
But the app crashes sometimes with this error
FATAL EXCEPTION: main
Process: com.playcenter.callerview, PID: 11962
LiveEdit: Could not invoke method 'onEvents(Landroidx/media3/common/Player;Landroidx/media3/common/Player$Events;)V'
java.lang.NullPointerException: null receiver
at com.android.tools.deploy.liveedit.ProxyClassHandler.invokeMethod(ProxyClassHandler.java:101)
at com.android.tools.deploy.liveedit.ProxyClassHandler.invoke(ProxyClassHandler.java:126)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy7.onEvents(Unknown Source)
at androidx.media3.exoplayer.ExoPlayerImpl.lambda$new$0$androidx-media3-exoplayer-ExoPlayerImpl(ExoPlayerImpl.java:281)
at androidx.media3.exoplayer.ExoPlayerImpl$$ExternalSyntheticLambda12.invoke(Unknown Source:4)
at androidx.media3.common.util.ListenerSet$ListenerHolder.iterationFinished(ListenerSet.java:350)
at androidx.media3.common.util.ListenerSet.handleMessage(ListenerSet.java:294)
at androidx.media3.common.util.ListenerSet.$r8$lambda$bio3pd12v5B_9b5UeFaPn9XBQ90(Unknown Source:0)
at androidx.media3.common.util.ListenerSet$$ExternalSyntheticLambda0.handleMessage(Unknown Source:2)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:8046)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1115)
Caused by: java.lang.NullPointerException: null receiver
at java.lang.reflect.Method.invoke(Native Method)
at com.android.tools.deploy.liveedit.ProxyClassHandler.invokeMethod(ProxyClassHandler.java:99)
at com.android.tools.deploy.liveedit.ProxyClassHandler.invoke(ProxyClassHandler.java:126)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy7.onEvents(Unknown Source)
at androidx.media3.exoplayer.ExoPlayerImpl.lambda$new$0$androidx-media3-exoplayer-ExoPlayerImpl(ExoPlayerImpl.java:281)
at androidx.media3.exoplayer.ExoPlayerImpl$$ExternalSyntheticLambda12.invoke(Unknown Source:4)
at androidx.media3.common.util.ListenerSet$ListenerHolder.iterationFinished(ListenerSet.java:350)
at androidx.media3.common.util.ListenerSet.handleMessage(ListenerSet.java:294)
at androidx.media3.common.util.ListenerSet.$r8$lambda$bio3pd12v5B_9b5UeFaPn9XBQ90(Unknown Source:0)
at androidx.media3.common.util.ListenerSet$$ExternalSyntheticLambda0.handleMessage(Unknown Source:2)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:8046)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1115)
Aniket Kadam
01/31/2024, 8:23 AMAbhishek Sharma
11/13/2024, 3:05 PM