Skip to content

Commit

Permalink
remove notification asking for event feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonaowen committed Aug 19, 2016
1 parent 5f9ada6 commit 33f3ef9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 73 deletions.
23 changes: 1 addition & 22 deletions app/src/main/java/nl/babbq/conference2015/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import nl.babbq.conference2015.fragments.ListingFragment;
import nl.babbq.conference2015.network.TSVRequest;
import nl.babbq.conference2015.network.VolleySingleton;
import nl.babbq.conference2015.objects.Session;
import nl.babbq.conference2015.objects.ConferenceDay;
import nl.babbq.conference2015.utils.PreferenceManager;
import nl.babbq.conference2015.utils.SendNotification;
import nl.babbq.conference2015.objects.Session;
import nl.babbq.conference2015.utils.Utils;


Expand Down Expand Up @@ -116,7 +114,6 @@ public void run() {
}
});
}
trackOpening();
}

@Override
Expand Down Expand Up @@ -197,24 +194,6 @@ private void update() {
}
}

/**
* Track how many times the Activity is launched and
* send a push notification {@link nl.babbq.conference2015.utils.SendNotification}
* to ask the user for feedback on the event.
*/
private void trackOpening() {
PreferenceManager prefManager =
new PreferenceManager(getSharedPreferences("MyPref", Context.MODE_PRIVATE));
long nb = prefManager.openingApp().getOr(0L);
prefManager.openingApp()
.put(++nb)
.apply();

if (nb == 10) {
SendNotification.feedbackForm(this);
}
}

@Override
public void onErrorResponse(VolleyError error) {
error.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.SharedPreferences;

import com.tale.prettysharedpreferences.BooleanEditor;
import com.tale.prettysharedpreferences.LongEditor;
import com.tale.prettysharedpreferences.PrettySharedPreferences;

/**
Expand All @@ -19,8 +18,4 @@ public PreferenceManager(SharedPreferences sharedPreferences) {
public BooleanEditor<PreferenceManager> favorite(String title) {
return getBooleanEditor(title);
}

public LongEditor<PreferenceManager> openingApp() {
return getLongEditor("nbOpening");
}
}

This file was deleted.

4 changes: 0 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
<string name="headline">headline</string>
<string name="speaker">speaker</string>

<!-- notification -->
<string name="notification_title">Thank you for attending Abstractions.io!</string>
<string name="notification_text">We hope you can help us improve the event by providing some feedback information</string>

<!-- libraries -->
<string name="define_BABBQ"></string>
<string name="library_BABBQ_author">Arnaud Camus</string>
Expand Down

0 comments on commit 33f3ef9

Please sign in to comment.