First you need to have a GeofenceManager to handle all the persistence Geofence regions storage, you can persists your geofence region by saving each attribute on a preference key. After that you can implement a BroadcastReceiver to restore all your geofence regions from preferences.
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class GeofenceBootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
GeofenceRegionsManager manager = new GeofenceRegionsManager(context);
manager.restoreAllRegions();
}
}
Should set permission:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
And set intent filter action android.intent.action.BOOT_COMPLETED on AndroidManifest.xml.