im trying to get int data from firestore but before that app crashes i dont know why when i try it as string it work i get it and i can list it but when i try it int app crashes even before get data here is my code second part is my adapter logchat said 2 line is wrong
Tag: android
Notification comes in notification list but not pop ups on main screen
I am sharing two images please have a look on it you will understand my problem in fist image notification comes successfully as shown better me notification but I want it to come and show first on main screen as shown in second image just this telegram notification. first image second image Answer If I under…
RecyclerView on a null object reference
So I was trying to show images from firebase to recyclerview, but it threw me an error. Error says E/nitecompetitiv: [qarth_debug:] get PatchStore::createDisableExceptionQarthFile method fail. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.fortnitecompetitive, PID: 15205 java.lang.NullPointerExc…
How to hide and unhide a view on a navigation item click?
I have a navigation drawer with 3 items. When I click on Item 1 I need it to show me an edit text for example and when I click on item 2 or 3 I need it to hide what’s been showing and display something else, something belongs to item 2 and item 3. I tried with Toast messages at
How can I write Java Model Class for Json Schema?
the problem is with coach, goalkeepers and defender like entity I don’t know how to make a class for this kind of response Answer When creating Java POJO for a json schema you just need to map the fields. For your problem we can something like this. Similarly we can make classes for GoalKeeper,.. ,so th…
Android BLE Scan Callback is not called after scanning for BLE devices
I’m creating an Android app that scans all nearby BLE (Bluetooth Low Energy) devices using Android Studio. I think I have implemented all these documentations: https://developer.android.com/guide/topics/connectivity/bluetooth/ble-overview https://developer.android.com/guide/topics/connectivity/bluetooth…
Update recycler view when a item is deleted on onBindViewHolder listener
I’m having a problem, that maybe we can solve it and help the community. I have made an Adapter for my RecyclerView and I have created a listener for the constraint layout in order to remove one element of the list. As you can see in the code the delete message works well but I don’t know how to u…
Relations between Room Tables Android
I am developping a chat app. I have two Entities And In MessageDao I want to get Contact phone correponding to the contact_id in MessageItem Answer You have three ways you can do this. 1) You can use a POJO with an @Embedded and an @Relation in which case you return MessageItem’s with the Contact e.g. :…
Use API REST interface to authenticate user on android app
I am writing an App with friends that uses an API to login. I am using OKHTTP for the GET/POST Requests. I have written the following code for the Login page: After trying to login I get following error message I have tried multithreading but I have not found a solution that awaits the result of the login. An…
Android RecyclerView on a null object reference
im trying to get Highscores from a File and display them in a RecyclerView. But im getting the following Error: I know that my scoreItems in arent empty. I dont know what i am doing wrong. I´m new in the Android World 🙂 Thanks for helping. My files: score_activity.java CustomAdapter.java activity_score_activi…