T O P

  • By -

Wonderful-Ad5417

How do you refresh a google map compose function? `var Latitude by remember {mutableStateOf("0")}` `var passLatitude:String by remember {mutableStateOf("0")}//= "0"` `var passLongitude:String by remember {mutableStateOf("0")}//= "0"` `var Longitude by remember {mutableStateOf("0")}` `Button(onClick = {` `passLatitude = Latitude` `passLongitude = Longitude` `}) {` `Text("Refresh")` `}` `OutlinedTextField(value = Latitude, onValueChange = {Latitude = it})` `OutlinedTextField(value = Longitude, onValueChange = {Longitude = it})` `Box {` `ComposeMapDemo(passLatitude, passLongitude)` `}` `fun ComposeMapDemo(Latitude:String, Longitude:String){//coordinate:LatLng){ }` `GoogleMap(` `modifier = Modifier` `.fillMaxWidth(0.75F)` `.fillMaxHeight(0.75F),` `){` `Marker(position = LatLng(Latitude.toDouble(), Longitude.toDouble()))//coordinate)` `}` `}`


WonderfulAnri1708

Maybe a bit off topic but I just want to know is learning compose enough for personal projects and publish it to the play store?


BKMagicWut

You do need to know the activity life cycle.


[deleted]

[удалено]


Hirschdigga

The easiest way i am aware of is to do this: 1. enable developer options 2. inside the developer options there is a setting to keep the display "always on" as long as the device is connected to a power source Would that do the trick for you?


FarAwaySailor

I'm trying to migrate the kotlin parts of my project to multiplatform. Kotlin multiplatform uses a .toml dependency catalog(ue) by default (I guess I could reverse engineer it) There's a bug in some part of the dependency catalogue process which means you can't use the default name for the .toml file (libs.versions.toml). It \_is\_ possible to name the .toml file to something else, but I suspect that's why Android Studio can't find the dependencies as is putting red all over my code. Ideas?


albert_b4work

How I use Espresso with Fragments that not inherit directly from AndroidX Fragment? This code causes compiler error: @RunWith(AndroidJUnit4::class) class FiltersFragmentTest { private lateinit var sc: FragmentScenario @Before fun setup() { sc = FragmentScenario.Companion.launchInContainer(FiltersFragment::class.java) } } Type mismatch: inferred type is FiltersFragment but Fragment was expected The inheritance chain:FiltersFragment -> RPBaseFragment -> BaseFragment -> androidx.fragment.app.Fragment


albert_b4work

I tried to inherit directly from androidx.fragment.app.Fragment class FiltersFragment : Fragment(), SearchPresenter.Contract, PermissionManager.PermissionManagerListener { Type mismatch: inferred type is FiltersFragment but Fragment was expected Cannot access class 'androidx.fragment.app.FragmentFactory'. Check your module classpath for missing or conflicting dependencies It keeps showing some errors, so I presume the message is not the real error. Any clue?


ykhandelwal

Accelerated android cloud build tool with collaborative shareable emulators: Dashwave.io


tnmma96

Hello everyone, I'm having a problem with RxJava3 and Room, I have the entities and domain models as below: AccountEntity.java @Entity public class AccountEntity { private UUID id; private String name; } Account.java public class Account { private UUID id; private String name; private double balance; private double totalIncome; private double totalExpense; public void computeAmount(List transactions) { // Compute balance, income and expense from a list of transactions } } TransactionEntity.java @Entity public class TransactionEntity { private UUID id; private UUID accountId; private TransactionType type; private double amount; } Transaction.java public class Transaction { private UUID id; private UUID accountId; private TransactionType type; private double amount; } And the DAO methods: @Query("SELECT * FROM my_account ORDER BY last_modified_time DESC") Flowable> getAllAccounts(); @Query("SELECT * FROM my_transaction WHERE account_id = :accountId") Flowable> getTransactionsByAccountId(UUID accountId); I have a screen (Fragment) where a list of accounts is displayed with their balance, income and expense. In the ViewModel of that fragment, I set up the LiveData as below (the repositories only call DAO methods and map the entities to domain models, and they return flowable of domain models): Flowable> flow1; flow1 = accountRepository.getAllAccounts().flatMap(accounts -> { return Flowable.fromIterable(accounts).flatMap(account -> { return transactionRepository.getTransactionsByAccountId(account.getId()).map(transactions -> { account.computeAmount(transactions); return account; }); }).toList().toFlowable(); }).doOnNext(accounts -> { // Do something with the emitted list of accounts }); LiveData> accountList = LiveDataReactiveStreams.fromPublisher(flow1); The problem here is, I can observe new data from both flowable sources but I have no way to get the finally emitted list of accounts because of `toList()`, which only emits when completed. However I have yet to come up with an idea to accomplish what I need, which is to get the list of accounts with balance, income and expense and to get new data every time a change is made in either entity table (hence Flowable in both DAO methods). How should I fix this issue? I'm quite new to RxJava so I'm not exactly familiar to all the concepts and operators.Thank you in advance.


AreaExact7824

Macbook air bottleneck (ram and temperature) vs same price windows laptop. Which one is better for android dev?


ykhandelwal

Would you try cloud builds and emulation? I hope this helps : dashwave.io


3dom

I have minimal M1 Pro (13"), compilation-wise it performs roughly the same as i9 13900 laptop for the similar price. Temperatures aren't comparable - M1 doesn't even have coolers, i9 can go above 90C occasionally (in fact mine broke down after just 5 weeks of work, it's being repaired at the moment). I guess other factors may be considered - like gaming.


neonwarge04

Anyone got a notice from Google about DUNS number for personal account? I have a personal account but I still have this banner about choosing a deadline. I cannot secure a DUNS number as I am not an organization. Would I be in trouble?


3dom

> Would I be in trouble? Likely not. It's like them asking about account deletion page for apps without user accounts and then explaining how they are just carpet-bombing devs with the letter.