diff --git a/res/layout/fragment_mainactivity_gotosettings.xml b/res/layout/fragment_mainactivity_gotosettings.xml
index b62e733..c1945a2 100644
--- a/res/layout/fragment_mainactivity_gotosettings.xml
+++ b/res/layout/fragment_mainactivity_gotosettings.xml
@@ -41,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
- android:text="Add an account"
+ android:text="@string/ma_title_add_account"
android:textAppearance="?android:attr/textAppearanceLarge" />
+ android:onClick="openAddAccount"
+ android:text="@string/ma_button_goto_sync" />
+ android:text="@string/ma_button_goto_settings" />
\ No newline at end of file
diff --git a/res/layout/fragment_mainactivity_main.xml b/res/layout/fragment_mainactivity_main.xml
index 86ed403..06d38bd 100644
--- a/res/layout/fragment_mainactivity_main.xml
+++ b/res/layout/fragment_mainactivity_main.xml
@@ -45,7 +45,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
- android:text="Welcome"
+ android:text="@string/ma_title_welcome"
android:textAppearance="?android:attr/textAppearanceLarge" />
\ No newline at end of file
diff --git a/res/layout/fragment_mainactivity_thanks_note.xml b/res/layout/fragment_mainactivity_thanks_note.xml
index 5c3e204..d137646 100644
--- a/res/layout/fragment_mainactivity_thanks_note.xml
+++ b/res/layout/fragment_mainactivity_thanks_note.xml
@@ -43,7 +43,8 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="22dp"
android:minHeight="36dp"
- android:text="Rate us !"
+ android:text="@string/ma_button_rate_us"
+ android:onClick="openGooglePlayStore"
android:textAlignment="center" />
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 51fe822..ace3169 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -115,6 +115,18 @@
- https://
- http://
+
+
+ Rate us !
+ Thanks to
+ Rate us !
+ If you like this application, please give rate us on Google Play Store
+ Add an account
+ Go to Accounts and Sync
+ Change app settings
+ Go to Settings
+ Welcome
+ Welcome to ownCloud SMS application. This application let you synchronise your SMS to your ownCloud instance using SMS app.
Sync process
diff --git a/src/fr/unix_experience/owncloud_sms/MainActivity.java b/src/fr/unix_experience/owncloud_sms/MainActivity.java
index 6340fb6..55bd2a1 100644
--- a/src/fr/unix_experience/owncloud_sms/MainActivity.java
+++ b/src/fr/unix_experience/owncloud_sms/MainActivity.java
@@ -34,7 +34,9 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.content.Intent;
+import android.net.Uri;
import android.os.Bundle;
+import android.provider.Settings;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -164,8 +166,22 @@ public class MainActivity extends ActionBarActivity {
}
public void openAppSettings(View view) {
- Intent intent = new Intent(this, GeneralSettingsActivity.class);
- startActivity(intent);
+ startActivity(new Intent(this, GeneralSettingsActivity.class));
+ }
+
+ public void openAddAccount(View view) {
+ startActivity(new Intent(Settings.ACTION_ADD_ACCOUNT));
}
+ public void openGooglePlayStore(View view) {
+ Intent intent;
+ try {
+ intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + getPackageName()));
+
+ } catch (android.content.ActivityNotFoundException anfe) {
+ intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + getPackageName()));
+ }
+
+ startActivity(intent);
+ }
}