Skip to content

Tag: android

SQLite: select from column by month

I am trying to sum a tablecolumn on basis of month but I got the following exception: the function the table In the debugger the cursor contains one item but when calling getInt(..) the app crashes Answer The column created for this result: is not called Total. Change the sql statement to this: This way you g…

Android Toast doesn’t show up

I am using a Samsung Galaxy Note 8 with Android 8.0. My Toast message (which was working) does not show up getApplicationContext(), getBaseContext() are not helping instead of this. Using this in an activity. Answer Go to your app settings -> Notifications and check if notifications are turned on. This act…

FATAL EXCEPTION: OkHttp Dispatcher

I’m using the OkHttp library in my android app to make web requests to a weather API. I’ve already implemented my code and I’m getting a FATAL EXCEPTION when doing the request. I’ve already added INTERNET permissions in my manifest too. MainActivity.java: Gradle: Then, here’s the…