I'm creating this geofencing app using the google sample tutorials. All works well except for this part which keeps showing an error:
In the SimpleGeofence.java, I have:
public class SimpleGeofence{
...
public Geofence toGeofence() {
// Build a new Geofence object
return new Geofence.Builder()
.setRequestId(getId())
.setTransitionTypes(mTransitionType)
.setCircularRegion(
getLatitude(),
getLongitude(),
getRadius())
.setExpirationDuration(mExpirationDuration)
.build();
}
The error shows under the Geofence.Builder(), and I'm being asked to create a class 'Builder' in type 'Geofence'.
When I create the class under Geofence.java, the error moves to .setRequestId(getId()) and I'm asked to create a method 'setRequestId(String)' in the type 'Builder'. This is what i have in the Geofence.java after creating all these;
package com.kamerlabs.wocmantv;
public class Geofence {
public class Builder {
public Object setRequestId(String string) {
// TODO Auto-generated method stub
return null;
}
}
}
An error now shows on .setTransitionTypes(mTransitionType) and I'm asked to 'Add cast to method receiver'. This is where i need help..what should i do now. Thanks in advance!!