Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple simperiumClients in Android #194

Open
bayareacoder opened this issue Mar 27, 2016 · 1 comment
Open

Support for multiple simperiumClients in Android #194

bayareacoder opened this issue Mar 27, 2016 · 1 comment

Comments

@bayareacoder
Copy link

Current Android library does not seem to support multiple Simperium clients in an app since the SQLite database is hardcoded in com.simperium.android class AndroidClient:
this.mDatabase = this.mContext.openOrCreateDatabase("simperium-store", 0, (CursorFactory)null);
Multiple client supports works in IOS library since multiple managed object contexts are used via the CoreData framework.
Multiple clients is sometimes required to implement specific functionality.
Requesting to implement support for this.

@beaucollins
Copy link
Contributor

With a custom implementation of ClientFactory you should be able to use the Simperium constructor with a factory that opens any database you choose.

I'll take a closer look at making it easier to customize the provided AndroidClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants