Oh I see Thanks a lot Traun On Tuesday, 4 November 2014 19:25:27 UTC+1, Traun Leyden wrote: > > It should already be doing the right thing, see: > > > https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin/blob/master/src/android/CBLite.java#L114 > > > On Tue, Nov 4, 2014 at 12:18 AM, Zumo <[email protected] <javascript:>> > wrote: > >> Thanks a lot for your post , >> >> I wanted to avoid having to change the code in the CBL phonegap plugin >> (the code that creates the Manager) , but seems like I'll have to .. >> cheers >> >> >> >> >> On Monday, 3 November 2014 21:41:20 UTC+1, Traun Leyden wrote: >>> >>> >>> See example here: >>> >>> http://developer.couchbase.com/mobile/develop/guides/ >>> couchbase-lite/native-api/manager/index.html#creating-a-manager >>> >>> public class Application extends android.app.Application { >>> private Manager manager; >>> private static Context mContext; >>> >>> ... >>> >>> @Override >>> public void onCreate() { >>> super.onCreate(); >>> mContext = getApplicationContext(); >>> try { >>> /* >>> * In Java the Manager instance and all the objects descending >>> * from it may be used on any thread. >>> */ >>> manager = new Manager(new AndroidContext(mContext), >>> Manager.DEFAULT_OPTIONS); >>> } catch (IOException e) { >>> Log.e(TAG, "Cannot create Manager instance", e); >>> return; >>> } >>> } >>> } >>> >>> >>> On Wed, Oct 29, 2014 at 11:36 AM, Zumo <[email protected]> wrote: >>> >>>> >>>> Hi Everyone, >>>> >>>> I am writing an app using the Phonegap Couchlite plugin and I need to >>>> access the Manager instance from another in house plugin. >>>> When on IOS I use : >>>> CBLManager *manager = [CBLManager sharedInstance]; >>>> And it works OK >>>> >>>> On Android I am trying : >>>> Manager manager = Manager.getSharedInstance(); >>>> >>>> As a result I am getting an Exception : >>>> >>>> - e = {java.lang.UnsupportedOperationException@ >>>> 831704908064}"java.lang.UnsupportedOperationException: >>>> getSharedInstance() is not a valid API call on Android. Pure java >>>> version >>>> coming soon" >>>> >>>> >>>> What is the recommended approach in Android to get access to the >>>> Couchlite Manager if getSharedInstance is not supported ? >>>> >>>> Thanks a lot for your help >>>> Christian >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Couchbase Mobile" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit https://groups.google.com/d/ >>>> msgid/mobile-couchbase/e6a424b4-06ad-40cc-9025- >>>> afb1085cf93d%40googlegroups.com >>>> <https://groups.google.com/d/msgid/mobile-couchbase/e6a424b4-06ad-40cc-9025-afb1085cf93d%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Couchbase Mobile" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/mobile-couchbase/52d16bd8-e52c-47e3-8e01-2d3b8c53b8bf%40googlegroups.com >> >> <https://groups.google.com/d/msgid/mobile-couchbase/52d16bd8-e52c-47e3-8e01-2d3b8c53b8bf%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > >
-- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/93a7f8a8-b88f-4c08-affa-449f0faae7d9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
