Using OnComplete I want to retrieve my documentid. I need this docid inside the OnSucces. So it has to go in that order. Why hadn’t it? LesAdapter.java, with the documentID hardcoded to get good LOGS LOGS: Answer I’m assuming, and I could be wrong, but onComplete triggers as soon as the operation …
Tag: android
App crashes due to bad notification for startforeground
i have been working on night filter app but i stuck with sdk version. My app is perfectly working on device whose sdk version is less then 23 but above 23 is not working it’s like when i tested my app in my Xiaomi which has android 9 app crashes and when i track the logcat error will through stating
Find the coordinate given the angle and distance from a point
I am trying to draw lines on android canvas by calculating the last point (X,Y) given a point (Xo,Yo), the distance and the angle. A diagram is illustrated below: I am calculating the azimuth orientation angle degree using the below formula from magnetic sensor and accelerometer values I am saving all lines i…
How can I switch between Fragments without destroying and re-creating them? (in a static-like way)
My app uses a BottomNavigationBar to switch between Fragments, and it does it this way: I want those Fragments to be static, so their content and views do not dissapear when I switch between them. I have tried to create them inside MainActivity’s onCreate() method, but it only helps with retaining text …
Can’t save in SharedPreferences values instead I get : D/InputMethodManager: showSoftInput fail
I am stuck for a few hours and can’t find a solution (at least not for my level) that works, so I am asking for your help. Again. I am trying to save some values given by a user from EditText boxes to …
Difference between class declared variables and method argument declared variables [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. This post was edited and submitted for review 1 year ago and failed to reopen the post: Original…
RecyclerView new items adding issue
I have a RecyclerView, it has 30 items and when I scroll to the end to load another 30 items, it goes to the first item. I tried to get current visible item then scroll to it when new items are added But it is not that smooth. I tried to scroll to listmap.size() but it will force the RecyclerView
MVVM – where should I call for user location?
currently, I’m building an app which will show for the user recent forecast. For make an api call, I have to provide longitude and latitude as parameter. For now, I have written some code about getting langitude, and longitude, but I don’t receive proper data. As I written those methods in MainAct…
Error while sending data with POST request in Android
I always get the same error while sending username and password to server. I need to send data as content type:form-data, because server isn’t responding on any other type. I tested in postman and it’s ok, but when I am trying to send it in code, it’s not working. Can someone help me, thanks…
How to show result with Int on calculator?
I am making the calculator app. It shows double at the result even when I don’t use double. Example) 1+1 = 2.0 But I want like 1+1= 2 Of course, I want to keep double when there is double like 1.2+1.3= 2.5 How should I have to edit? I tried to edit like this, but there is an error. MainActivity