Instabus | : bus : :dash : There is no need to bus | Web Services library
kandi X-RAY | Instabus Summary
kandi X-RAY | Instabus Summary
:bus::dash: There is no need to bus upset
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Instabus
Instabus Key Features
Instabus Examples and Code Snippets
Community Discussions
Trending Discussions on Instabus
QUESTION
I'm trying to call my database (made with Room) from an activity on Android, but it needs the application context, and if I passed "application : Application" in the constructor of my Activity, the build crash and tell me :
java.lang.Class has no zero argument constructor
Here is my code :
...ANSWER
Answered 2021-Jan-29 at 18:32You should not pass Application
to the constructor. You should pass applicationContext
to getDatabase()
, like private val pictureDao = PictureDatabase.getDatabase(applicationContext)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Instabus
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page