How To Use Sqlite In Windows (phone) 8.1's Backgroundtask
Setup I followed Universal App with SQLite example to add SQLite to my project; then to add the BackgroundTask I followed Quickstart: Create and register a background task example
Solution 1:
Sometimes the answer is easier than expected.
Steps
- Set the Background Task's Library Target to only target Windows (Phone) 8.1
- Create a
Class Librarythat targets only Windows (Phone) 8.1 - Add SQLite for Windows (Phone) 8.1 to the
Class Library - Reference the
Class Librarywith the Background Task
That's it!
Do most of the work in the Class Library and only make calls from the Background task, this makes the BGT look cleaner. The nice thing about using a Class Library is that you can use generics.
You will have 2 Background Tasks for your universal app
- Windows 8.1 Background Task
- Windows Phone 8.1 Background Task
Post a Comment for "How To Use Sqlite In Windows (phone) 8.1's Backgroundtask"