Closed ste00martin closed 5 years ago
The enum version is correct, are you importing RadarPlacesProvider
? Alternatively you can use Radar.RadarPlacesProvider
since Radar
is already imported.
It's worth noting that you can set places provider in JavaScript if that's more convenient
Radar.setPlacesProvider("facebook")
when I tried setting it in java as your suggestion I got the following error:
android/app/src/main/java/com/volta/android/MainApplication.java:127: error: cannot find symbol
Radar.setPlacesProvider(Radar.RadarPlacesProvider);
^
symbol: variable RadarPlacesProvider
location: class Radar
1 error
I'll just use the javascript for now but it'd be nice to show the steps to add it in on android via importing RadarPlacesProvider
. your documentation doesn't state how to import that
Apologies for the confusion, we'll be sure to update the documentation.
And sorry I was a little unclear with my previous suggestion, you'll need to import the enum class RadarPlacesProvider
as normal and use the FACEBOOK
enum value as you had before. All of these are valid Java and should work:
import io.radar.sdk.Radar;
import io.radar.sdk.Radar.RadarPlacesProvider;
// ... Application class
@Override
public void onCreate() {
Radar.setPlacesProvider(RadarPlacesProvider.FACEBOOK);
}
or alternatively
import io.radar.sdk.Radar;
// ... Application class
@Override
public void onCreate() {
Radar.setPlacesProvider(Radar.RadarPlacesProvider.FACEBOOK);
}
you can even specify the fully qualified package and don't need to import at all, as long as Radar is in your classpath:
// ... Application class
@Override
public void onCreate() {
io.radar.sdk.Radar.setPlacesProvider(io.radar.sdk.Radar.RadarPlacesProvider.FACEBOOK);
}
And please let us know if you have any more issues, always happy to help!
Describe the bug When I try to set the places provider in Android it fails to compile.
To Reproduce Steps to reproduce the behavior: put in radar:
see the error output:
I also tried adding in
RadarPlacesProvider
to no avail:error output:
Expected behavior setting the places provider should compile / work
Metadata (please complete the following information):