Hi everybody,
I have already used the phonegap camera using @Inject Camera camera and it works perfectly.
Now I need to find my user location with gps, so I thought to use the same approach and tried to inject com.googlecode.gwtphonegap.client.geolocation.Geolocation, but when I compile I get
[exec] [ERROR] org.jboss.errai.ioc.rebind.ioc.exception.InjectionFailure: ambiguous injection type (multiple injectors resolved): com.googlecode.gwtphonegap.client.geolocation.Geolocation @Any @Default :
[exec] [ERROR] matching> org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector:com.googlecode.gwtphonegap.client.geolocation.js.GeolocationMobileImpl @Any @Default
[exec] [ERROR] matching> org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector:com.googlecode.gwtphonegap.client.geolocation.browser.GeolocationBrowserEmptyImpl @Any @Default
[exec] [ERROR] Note: configure an alternative to take precedence or remove all but one matching bean.
So I tried com.googlecode.gwtphonegap.client.geolocation.GeolocationWatcher, but when I compile I get
[exec] [ERROR] java.util.concurrent.ExecutionException: org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException: @> it.soluzione1.tpl.client.local.activity.ClientFactory
[exec] [ERROR] - field org.jboss.errai.codegen.meta.MetaField:it.soluzione1.tpl.client.local.activity.ClientFactory.geolocationWatcher could not be satisfied for type: com.googlecode.gwtphonegap.client.geolocation.GeolocationWatcher
[exec] [ERROR] Message: can't resolve bean: com.googlecode.gwtphonegap.client.geolocation.GeolocationWatcher ( @Default @Any )
I found out I can use org.jboss.errai.location.client.local.GeoLocationProvider that seems to be a wrapper around
com.google.gwt.geolocation.client.Geolocation
and seems to get its data from the browser. Does that work with gps? Or should I use the phonegap, classes configuring an alternative as suggested in the error stack trace?
thans for your help
ciao Francesco