From eccc73a5e0e3ca7d78568029dc20dc8b9bcc481b Mon Sep 17 00:00:00 2001 From: Jean-Philippe DESCAMPS Date: Mon, 23 May 2016 13:50:06 +0200 Subject: [PATCH] =?UTF-8?q?Remise=20=C3=A0=20niveau=20du=20sdk=20android.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- app/libs/critizr-sdk.aar | Bin 0 -> 8946 bytes app/src/main/AndroidManifest.xml | 28 +-- .../com/CritizrSDKExample/MainActivity.java | 69 +++---- .../CritizrSDKExample/MyStoreActivity.java | 72 +++---- app/src/main/res/layout/activity_main.xml | 118 ++++++------ app/src/main/res/layout/my_store_layout.xml | 178 +++++++++--------- app/src/main/res/values/colors.xml | 14 +- app/src/main/res/values/strings.xml | 14 +- app/src/main/res/values/styles.xml | 4 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 12 files changed, 258 insertions(+), 247 deletions(-) create mode 100644 app/libs/critizr-sdk.aar diff --git a/app/build.gradle b/app/build.gradle index 334b1fd..ca9ffc8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,5 +31,5 @@ repositories { dependencies { compile 'com.android.support:support-v4:23.1.1' - compile 'com.critizr:critizr-sdk:1.0.0' + compile(name:'critizr-sdk', ext:'aar') } diff --git a/app/libs/critizr-sdk.aar b/app/libs/critizr-sdk.aar new file mode 100644 index 0000000000000000000000000000000000000000..4c47a84b3185ed4498a1842f228262c847fa16dd GIT binary patch literal 8946 zcmdsdWmFy8wk943ZUKTraCdii3GQszxVyW%ySr?;-GXi0C7tx`_wG4o+XXj&5h*@ zZOl!8j!yJ$)>hWB6CZmSQGzbKBkCU5-*t*u&xLFQQUe~QtJwO#kYz?Z-iCY@n(jOw zZyA%F<2#GqV2Zn!?{3oq7vXR#-k>yyNp<+3tIev$?JX2RyAxw^ta7OZ*E-0#kTqu~ zMpHiO!R9u0VC*Kis~H$joW5_c9|nP@bRHPPF$nxB(%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ez_G`TL9rNk|XY!t+U+wi5jpL*G_Exy~ z9fiT?hF^~&dF27ux3TIoKDy>z9(*!SLvz01|85@t>5%{K7lT3kS$+%j@1LQeof88j z*x!}@+D6CzFQxzQdg=cx$A>?e{_dnZIsUC6e_HOp-~6p=R_1{JSqbVlz{1A-Z-$Wm zQ~Aw}t^TI;&!GMoasd9z88`$6v!nhA`R9)MFHn)c#D78l9})l4@gKJSC4U?<5&buJ ze|7zzxcfIq<2UGkGx - - - - + android:versionName="1.0" > + + + + + + android:theme="@style/AppTheme" > + android:label="@string/app_name" + > - - + + - + - + diff --git a/app/src/main/java/com/CritizrSDKExample/MainActivity.java b/app/src/main/java/com/CritizrSDKExample/MainActivity.java index 3d23343..80a372e 100644 --- a/app/src/main/java/com/CritizrSDKExample/MainActivity.java +++ b/app/src/main/java/com/CritizrSDKExample/MainActivity.java @@ -1,5 +1,6 @@ package com.CritizrSDKExample; + import android.app.Activity; import android.content.Intent; import android.os.Bundle; @@ -9,36 +10,40 @@ import com.CritizrSDK.CritizrListener; import com.CritizrSDK.CritizrSDK; -public class MainActivity extends Activity implements CritizrListener { - - public static final String DEBUG_TAG = "CRITIZR_SDK"; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - this.getActionBar().hide(); - } - - public void MainClickMethod(View view) { - String apiKey = this.getResources().getString(R.string.critizr_api_key); - - if (view.getId() == R.id.storelocator_btn) { - CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this); - } else if (view.getId() == R.id.my_store_btn) { - MainActivity.this.startActivity(new Intent(this, MyStoreActivity.class)); - } - } - - @Override - public void onFeedbackSent() { - Log.d(DEBUG_TAG, "Feedback sent"); - } - - @Override - public void onRatingResult(double arg0) { - // TODO Auto-generated method stub - - } +public class MainActivity extends Activity implements CritizrListener{ + + public static final String DEBUG_TAG = "CRITIZR_SDK"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + this.getActionBar().hide(); + } + + + public void MainClickMethod(View view) { + String apiKey = this.getResources().getString(R.string.critizr_api_key); + + if(view.getId() == R.id.storelocator_btn){ + CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this); + }else if(view.getId() == R.id.my_store_btn){ + MainActivity.this.startActivity(new Intent(this, MyStoreActivity.class)); + } + + } + + @Override + public void onFeedbackSent() { + Log.d(DEBUG_TAG, "Feedback sent"); + } + + + @Override + public void onRatingResult(double arg0) { + // TODO Auto-generated method stub + + } + } diff --git a/app/src/main/java/com/CritizrSDKExample/MyStoreActivity.java b/app/src/main/java/com/CritizrSDKExample/MyStoreActivity.java index 83bd004..be3874f 100644 --- a/app/src/main/java/com/CritizrSDKExample/MyStoreActivity.java +++ b/app/src/main/java/com/CritizrSDKExample/MyStoreActivity.java @@ -8,40 +8,42 @@ import com.CritizrSDK.CritizrListener; import com.CritizrSDK.CritizrSDK; -public class MyStoreActivity extends Activity implements CritizrListener { - - public static final String DEBUG_TAG = "CRITIZR_SDK"; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.my_store_layout); - - this.getActionBar().hide(); - +public class MyStoreActivity extends Activity implements CritizrListener{ + + public static final String DEBUG_TAG = "CRITIZR_SDK"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.my_store_layout); + + this.getActionBar().hide(); + /* To get place Rating */ - String apiKey = MyStoreActivity.this.getResources().getString(R.string.critizr_api_key); - String externalPlaceId = "12"; - CritizrSDK.getInstance(apiKey).getPlaceRating(externalPlaceId, this); - } - - public void MyStoreClickMethod(View view) { - String apiKey = MyStoreActivity.this.getResources().getString(R.string.critizr_api_key); - if (view.getId() == R.id.storelocator_btn) { - CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this); - } else if (view.getId() == R.id.my_store_btn) { - String externalPlaceId = "12"; /*External place id I choose for my example - Bolibio Valencienne*/ - CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this, externalPlaceId); - } - } - - @Override - public void onFeedbackSent() { - Log.d(DEBUG_TAG, "Feedback sent"); - } - - @Override - public void onRatingResult(double rating) { - Log.d(DEBUG_TAG, "Place Rating is " + rating); - } + String apiKey = MyStoreActivity.this.getResources().getString(R.string.critizr_api_key); + String externalPlaceId = "12"; + CritizrSDK.getInstance(apiKey).getPlaceRating(externalPlaceId, this); + } + + public void MyStoreClickMethod(View view) { + String apiKey = MyStoreActivity.this.getResources().getString(R.string.critizr_api_key); + if(view.getId() == R.id.storelocator_btn){ + CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this); + + }else if(view.getId() == R.id.my_store_btn){ + String externalPlaceId = "12"; /*External place id I choose for my example - Bolibio Valencienne*/ + CritizrSDK.getInstance(apiKey).openFeedbackActivity(this, this, externalPlaceId); + } + } + + @Override + public void onFeedbackSent() { + Log.d(DEBUG_TAG, "Feedback sent"); + + } + + @Override + public void onRatingResult(double rating) { + Log.d(DEBUG_TAG, "Place Rating is "+rating); + } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 9007fcd..511d1db 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,61 +1,61 @@ - - - - - -