Skip to content

Commit

Permalink
Update sample to Velo + change colors + change credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
guilllaumeCritizr committed Feb 15, 2017
1 parent 0721a49 commit 22e3fad
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions app/src/main/java/com/CritizrSDKExample/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ public void MainClickMethod(View view) {

if(view.getId() == R.id.storelocator_btn){

JSONObject obj= new JSONObject();
try {
obj.put("user", "guillaume|[email protected]");
obj.put("mode", "quizonly");
} catch (JSONException e) {
e.printStackTrace();
}

CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this, obj);
JSONObject object = new JSONObject();
try {
object.put("mode", "feedback");
object.put("user", "YXJuYXVkfGFybmF1ZC5sYW5jZWxvdEBjcml0aXpyLmNvbQ=="); // arnaud|[email protected] en BASE64
} catch (JSONException e) {
e.printStackTrace();
}

CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this, object);
}else if(view.getId() == R.id.my_store_btn){
MainActivity.this.startActivity(new Intent(this, MyStoreActivity.class));
}
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/java/com/CritizrSDKExample/MyStoreActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ protected void onCreate(Bundle savedInstanceState) {

this.getActionBar().hide();

// /* To get place Rating */
try {
String apiKey = MyStoreActivity.this.getResources().getString(R.string.critizr_api_key);
String externalPlaceId = "velo-paris-xvii";
String externalPlaceId = this.getResources().getString(R.string.external_place_id);
CritizrSDK.getInstance(apiKey).getPlaceRating(externalPlaceId, this);
}catch (Exception e){
e.printStackTrace();
Expand All @@ -38,13 +37,13 @@ public void MyStoreClickMethod(View view) {
CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this, null);
}else if(view.getId() == R.id.my_store_btn){
JSONObject object = new JSONObject();
try {
object.put("mode", "feedback");
object.put("user", "guillaume|guillaume@critizr.com");
try {
object.put("mode", "feedback");
object.put("user", "YXJuYXVkfGFybmF1ZC5sYW5jZWxvdEBjcml0aXpyLmNvbQ=="); // arnaud|arnaud.lancelot@critizr.com en BASE64
} catch (JSONException e) {
e.printStackTrace();
}
String externalPlaceId = "velo-paris-xvii"; /*External place id I choose for my example - VELO PARIS*/
String externalPlaceId = this.getResources().getString(R.string.external_place_id);
CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this, externalPlaceId, object);
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<color name="background_color">#BCDC92</color>
<color name="button_color">#0089A5</color>
<color name="background_color">#E8E8E8</color>
<color name="button_color">#B5A78E</color>
<color name="text_color">#45572D</color>
<color name="white_color">#FFFFFF</color>

Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Bolibio</string>
<string name="app_name">Velo</string>
<string name="critizr_api_key">7f614697ac3524af3ca4ce0df9164caf</string>
<string name="external_place_id">velo-aix-en-provence</string>
<string name="click_here">Cliquer ici</string>
<string name="click_here_to_see_your_store">Accéder à votre page magasin</string>
<string name="send_a_feedback">Envoyer une remarque</string>
<string name="welcome_to_bolibio_france">Bienvenue chez Bolibio France</string>
<string name="bolibio_valencienne">Bolibio Paris XI</string>
<string name="welcome_to_bolibio_france">Bienvenue chez Velo France</string>
<string name="bolibio_valencienne">Velo Aix En Provence</string>
<string name="opening_hours">9h-12h et 14h-19h</string>
<string name="opening_days">Ouvert du lundi au samedi</string>
<string name="contact_director">Contacter le gérant</string>
<string name="contact_another_director">Pour contacter le gérant d\'un autre magasin :</string>
</resources>
</resources>

0 comments on commit 22e3fad

Please sign in to comment.