Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove features of the build version #80

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,6 @@ dependencies {

implementation 'com.google.code.gson:gson:2.8.8'

//Airship
def airshipVersion = '14.6.0'

// ADM & FCM push providers
implementation "com.urbanairship.android:urbanairship-fcm:$airshipVersion"
implementation "com.urbanairship.android:urbanairship-adm:$airshipVersion"

// In-App Messaging
implementation "com.urbanairship.android:urbanairship-automation:$airshipVersion"

// Message Center
implementation "com.urbanairship.android:urbanairship-message-center:$airshipVersion"
}
// If you want use Firebase for notification
//apply plugin: 'com.google.gms.google-services'
3 changes: 0 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
android:host="notif" />
</intent-filter>
</activity>
<!-- Uncomment to enable airship -->
<!-- <meta-data android:name="com.urbanairship.autopilot"
android:value="com.webgeoservices.sample.SampleAutopilot"/>-->
<receiver android:name="com.webgeoservices.sample.RunOnStartup"
android:exported="true"
>
Expand Down
75 changes: 0 additions & 75 deletions app/src/main/java/com/webgeoservices/sample/AirshipListener.java

This file was deleted.

81 changes: 0 additions & 81 deletions app/src/main/java/com/webgeoservices/sample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.urbanairship.UAirship;
import com.urbanairship.analytics.CustomEvent;
import com.webgeoservices.sample.model.PlaceData;
import com.webgeoservices.woosmapgeofencing.DistanceAPIDataModel.DistanceAPI;
import com.webgeoservices.woosmapgeofencing.FigmmForVisitsCreator;
Expand Down Expand Up @@ -70,7 +68,6 @@


public class MainActivity extends AppCompatActivity {
public static final boolean AIRSHIP = false;
static SimpleDateFormat displayDateFormatAirship = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");

private static final int REQUEST_PERMISSIONS_REQUEST_CODE = 34;
Expand All @@ -97,67 +94,6 @@ private void onLocationCallback(Location currentLocation) {
}


public class WoosAirshipSearchAPIReadyListener implements Woosmap.AirshipSearchAPIReadyListener {
public void AirshipSearchAPIReadyCallback(HashMap<String, Object> dataEvent) {
sendAirshipEvent( dataEvent );
}
}


public class WoosAirshipVisitReadyListener implements Woosmap.AirshipVisitReadyListener {
public void AirshipVisitReadyCallback(HashMap<String, Object> dataEvent) {
sendAirshipEvent( dataEvent );
}
}

public class WoosAirshipRegionLogReadyListener implements Woosmap.AirshipRegionLogReadyListener {
public void AirshipRegionLogReadyCallback(HashMap<String, Object> dataEvent) {
sendAirshipEvent( dataEvent );
}
}



void sendAirshipEvent(HashMap<String, Object> dataEvent){
if(AIRSHIP) {
// Create and name an event
CustomEvent.Builder eventBuilder = new CustomEvent.Builder( (String) dataEvent.get( "event" ) );

// Set custom event properties on the builder
for (Map.Entry<String, Object> entry : dataEvent.entrySet()) {
eventBuilder.addProperty(entry.getKey(), entry.getValue().toString() );
}

// Then record it
CustomEvent event = eventBuilder.build();

event.track();
}
}

public class WoosMarketingCloudSearchAPIReadyListener implements Woosmap.MarketingCloudSearchAPIReadyListener {
public void MarketingCloudSearchAPIReadyCallback(HashMap<String, Object> dataEvent) {
sendMarketingCloudEvent( dataEvent );
}
}


public class WoosMarketingCloudVisitReadyListener implements Woosmap.MarketingCloudVisitReadyListener {
public void MarketingCloudVisitReadyCallback(HashMap<String, Object> dataEvent) {
sendMarketingCloudEvent( dataEvent );
}
}

public class WoosMarketingCloudRegionLogReadyListener implements Woosmap.MarketingCloudRegionLogReadyListener {
public void MarketingCloudRegionLogReadyCallback(HashMap<String, Object> dataEvent) {
sendMarketingCloudEvent( dataEvent );
}
}

void sendMarketingCloudEvent(HashMap<String, Object> dataEvent){
// Call Marketing Cloud API here
}

public class WoosSearchAPIReadyListener implements Woosmap.SearchAPIReadyListener {
public void SearchAPIReadyCallback(POI poi) {
onPOICallback(poi);
Expand Down Expand Up @@ -332,11 +268,6 @@ protected void onCreate(Bundle savedInstanceState) {
loadRegion();
loadRegionLogs();

if(AIRSHIP) {
String channelId = UAirship.shared().getChannel().getId();
System.out.println( "My Application Channel ID: " + channelId );
}

bottomNav = findViewById(R.id.bottom_navigation);
bottomNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
Expand Down Expand Up @@ -399,16 +330,6 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
this.woosmap.setRegionReadyListener( new WoosRegionReadyListener() );
this.woosmap.setRegionLogReadyListener( new WoosRegionLogReadyListener() );

// Airship Listener
//this.woosmap.setAirshipSearchAPIReadyListener( new WoosAirshipSearchAPIReadyListener() );
//this.woosmap.setAirshipVisitReadyListener( new WoosAirshipVisitReadyListener() );
//this.woosmap.setAirhshipRegionLogReadyListener( new WoosAirshipRegionLogReadyListener() );

// Marketing CLoud Listener
//this.woosmap.setMarketingCloudSearchAPIReadyListener( new WoosMarketingCloudSearchAPIReadyListener() );
//this.woosmap.setMarketingCloudVisitReadyListener( new WoosMarketingCloudVisitReadyListener() );
//this.woosmap.setMarketingCloudRegionLogReadyListener( new WoosMarketingCloudRegionLogReadyListener() );

// Search API parameters
//WoosmapSettings.searchAPIParameters.put("radius","5000");
//WoosmapSettings.searchAPIParameters.put("stores_by_page","100");
Expand All @@ -420,8 +341,6 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
//WoosmapSettings.poiRadiusNameFromResponse = "near_radius";
//WoosmapSettings.poiRadius = 500;

this.woosmap.startTracking( Woosmap.ConfigurationProfile.passiveTracking );

//WoosmapSettings.foregroundLocationServiceEnable = true;

// For android version >= 8 you have to create a channel or use the woosmap's channel
Expand Down
87 changes: 0 additions & 87 deletions app/src/main/java/com/webgeoservices/sample/SampleAutopilot.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public void replaceGeofence(String oldId, String newId, final LatLng latLng, fin
Geofence geofence = geofenceHelper.getGeofence( newId, latLng, radius, Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_DWELL | Geofence.GEOFENCE_TRANSITION_EXIT );
GeofencingRequest geofencingRequest = geofenceHelper.getGeofencingRequest( geofence );
positionsManager.replaceGeofenceCircle( oldId, geofenceHelper, geofencingRequest, getGeofencePendingIntent(), mGeofencingClient, newId, radius, latLng.latitude, latLng.longitude);
} else {
positionsManager.replaceGeofence( oldId, newId, radius, latLng.latitude, latLng.longitude, type );
}
}

Expand All @@ -90,8 +88,6 @@ public void addGeofence(final String id, final LatLng latLng, final float radius
Geofence geofence = geofenceHelper.getGeofence( id, latLng, radius, Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_DWELL | Geofence.GEOFENCE_TRANSITION_EXIT );
GeofencingRequest geofencingRequest = geofenceHelper.getGeofencingRequest( geofence );
positionsManager.addGeofence( geofenceHelper, geofencingRequest, getGeofencePendingIntent(), mGeofencingClient, id, radius, latLng.latitude, latLng.longitude, idStore );
} else {
positionsManager.createRegion( id,radius,latLng.latitude,latLng.longitude,idStore,type );
}
}

Expand Down
Loading