jeff
01/07/2021, 7:00 PMLilly
01/08/2021, 2:06 PMtypealias Parameter = Map<WebKey, ByteArray>
typealias MutableParameter = MutableMap<WebKey, ByteArray>
or do you just define the mutable typealias and convert the type to its counterpart at the right time?solidogen
01/08/2021, 3:58 PMandev
01/08/2021, 7:14 PMGoose
01/09/2021, 10:23 PMDavide Giuseppe Farella
01/10/2021, 2:53 PMCould not determine the dependencies of task ‘clientandroid:compileDebugJavaWithJavac’.
> Could not resolve all dependencies for configuration ‘clientandroid:debugRuntimeClasspath’.
> A problem occurred configuring project ‘moviesremote:tmdb’.
> org.gradle.api.internal.initialization.DefaultClassLoaderScope@4ba09663 must be locked before it can be used to compute a classpath!Meanwhile I moved to canary 4, AGP 4, Gradle 6.8 stable but still there. Any ideas?
paul Olukayode
01/10/2021, 5:37 PMKlaas Kabini
01/11/2021, 11:05 AMprivate var _binding: ResultProfileBinding? = null
// This property is only valid between onCreateView and
// onDestroyView.
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
_binding = ResultProfileBinding.inflate(inflater, container, false)
val view = binding.root
return view
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
Tudor Luca
01/11/2021, 9:47 PMWorkspacesListFragment WorkspaceFragment ThreadFragment
R.id.workspacesListFr R.id.workspaceFr R.id.threadFr
+--------------------+ +-----------------+ +----------------+
| | | | | |
| List: | arg: workspaceId | List: | arg: threadId | |
| * kotlinlang +--------------------> * androidx +-----------------> |
start dest | * workflow-kotlin | | * compose | | |
+-----------> * etc... | | * etc... | | |
| | | | | |
| | | | | |
| | | | | |
+------+-------------+ +-----------------+ +----------------+
|
|
|
|
| CreateWorkspaceFragment
|
| +--------------------------+
| | |
| | besides a new workspace, |
| | optionally could create |
+--------> a new thread as well |
| |
| has workspaceId |
| has threadId? |
| |
| |
| |
+--------------------------+
When a new workspace is created I'd like to navigate to it when the operation is successful. I've come up with 2 ideas:
Option 1: use the navigation controller available inside CreateWorkspaceFragment and navigate directly from there:
CreateWorkspaceFragment {
...
fun onComplete(workspaceId: String, threadId: String?) {
val navController = findNavController()
// 1. Go back to WorkspacesListFragment
// fragment will trigger an async api call to fetch and then display the list
navController.popBackStack()
// 2. Go to WorkspaceFragment
// fragment will trigger an async api call to fetch and then display the workspace
navController.navigate(
WorkspacesListFragmentDirections.actionToWorkspace(workspaceId)
)
// 3. Go to ThreadFragment if user created a thread
// fragment will trigger an async api call to fetch and then display the thread
if (threadId.isNullOrEmpty().not()){
navController.navigate(
WorkspaceFragmentDirections.actionToThread(threadId!!)
)
}
}
}
Option 2:
• return workspaceId & threadId as a result to the previous WorkspacesListFragment
Destination (either FragmentResult API or navController.previousBackStackEntry?.savedStateHandle )
• from WorkspacesListFragment
I can navigate to WorkspaceFragment
and pass along workspaceId & threadId
• inside WorkspaceFragment.onCreate
I can check the args and if there's a threadId I'll trigger navigation from there to ThreadFragment
(but I'll have to WorkspaceFragment.arguments = null
, otherwise when coming back it'll navigate to ThreadFragment
again, indefinitely)
Essentially, Option 1 come down to handling my navigation logic in-place and Option 2 would spread it across each destination. FragmentNavigator does Fragment transactions asynchronously, Option 1 acts like navigation is a synchronous operation and it doesn't seem right to me... but Option 2 is a lot more code, so...
Suggestions? (anyone from the androidx.navigation team around here?)FunkyMuse
01/12/2021, 1:24 AMIfvwm
01/12/2021, 3:40 AMLilly
01/12/2021, 3:52 AMmutableListOf<String>
and pass this to a consuming function, should I convert this list explicitly to List<String>
with toList()
to have this list immutable or is it enough to define the parameter as List<String>
like:
fun consumingList(list: List<String>)
But then I'm asking if it's really an immutable list... I could still cast it to a mutable List again, not?mng
01/12/2021, 3:53 PMIfvwm
01/13/2021, 3:28 AMArchie
01/14/2021, 5:30 AMSettings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID)
is used as a "Unique Identifier" but this prompts a warning in Lint saying, that it is not recommend
. With the message:
Using these device identifiers is not recommended other than for high value fraud prevention and advanced telephony Using these device identifiers is not recommended other than for high value fraud prevention and advanced telephony use-cases. For advertising use-cases, use AdvertisingIdClient$Info#getId and for analytics, use InstanceId#getIdI'm not quite sure if my use-case falls under the use of this value. I also wonder why this isn't mention in Best practices for unique identifiers. And so by reading the Documentation, I found out about DRM API and was wondering if this is a better alternative to the one above. I'd really appreciate any feedback. Please share your thoughts. Thank you very much.
Kshitij Patil
01/14/2021, 10:57 AMPagingData
everytime we search with new query. Although it's true that every flow is going to be different, don't you think that we could have used `SharedFlow`s here somehow?Jrichards1408
01/14/2021, 4:08 PMHannan Shaikh
01/15/2021, 6:05 AMtheimpulson
01/15/2021, 6:23 AMPetru
01/15/2021, 8:32 AMIntent.createChooser()
Basically using ACTION_SEND
and EXTRA_STREAM
with FLAG_GRANT_READ_URI_PERMISSION
means a java.lang.SecurityException: Permission Denial .. requires the provider be exported, or grantUriPermission()
error being logged although the expected flow works without issue.
Because this is happening with AAA apps also I would think this is a deeper issue in Android that doesn't yet have a solution or even a workaround but I'm curious if anybody would know more about this.jeff
01/15/2021, 5:16 PMSavedStateHandle
within a (Fragment's) ViewModel's onCleared()
does not appear to take effect (i.e. survive activity death). Setting it prior to onCleared()
e.g. in init {}
does successfully persist. Is that expected? I don't see that behavior documented anywhere, other than that onCleared comes after onDestroy.Kshitij Patil
01/16/2021, 10:40 AMDataStore
classes Singleton or not? I was trying to achieve a behavior where if you change IP address from settings fragment, all the subsequent network calls should be made with updated IP. I tried to use preferences Flow variables to update repository variable but this isn't workingPrem Suman
01/16/2021, 7:39 PMJoshy Josh
01/17/2021, 5:59 AMam414
01/17/2021, 9:56 AMRemy Benza
01/17/2021, 10:38 AMImran
01/18/2021, 1:26 PMKlaus
01/19/2021, 10:50 AMadb
there are to less jobs enqueued:Sulav Timsina
01/19/2021, 4:53 PMSlackbot
01/20/2021, 4:55 AM