diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
index 9779c68..f123735 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
@@ -162,9 +162,11 @@
                 addShownCategoryId(CATEGORY_ID_OBJECTS);
                 addShownCategoryId(CATEGORY_ID_NATURE);
                 addShownCategoryId(CATEGORY_ID_PLACES);
-                mCurrentCategoryId = CATEGORY_ID_PEOPLE;
+                mCurrentCategoryId =
+                        Settings.readLastShownEmojiCategoryId(mPrefs, CATEGORY_ID_PEOPLE);
             } else {
-                mCurrentCategoryId = CATEGORY_ID_SYMBOLS;
+                mCurrentCategoryId =
+                        Settings.readLastShownEmojiCategoryId(mPrefs, CATEGORY_ID_SYMBOLS);
             }
             addShownCategoryId(CATEGORY_ID_SYMBOLS);
             addShownCategoryId(CATEGORY_ID_EMOTICONS);
@@ -222,6 +224,7 @@
 
         public void setCurrentCategoryId(int categoryId) {
             mCurrentCategoryId = categoryId;
+            Settings.writeLastShownEmojiCategoryId(mPrefs, categoryId);
         }
 
         public void setCurrentCategoryPageId(int id) {
@@ -233,7 +236,7 @@
         }
 
         public void saveLastTypedCategoryPage() {
-            Settings.writeEmojiCategoryLastTypedId(
+            Settings.writeLastTypedEmojiCategoryPageId(
                     mPrefs, mCurrentCategoryId, mCurrentCategoryPageId);
         }
 
@@ -254,7 +257,7 @@
         // Returns the view pager's page position for the categoryId
         public int getPageIdFromCategoryId(int categoryId) {
             final int lastSavedCategoryPageId =
-                    Settings.readEmojiCategoryLastTypedId(mPrefs, categoryId);
+                    Settings.readLastTypedEmojiCategoryPageId(mPrefs, categoryId);
             int sum = 0;
             for (int i = 0; i < mShownCategories.size(); ++i) {
                 final CategoryProperties props = mShownCategories.get(i);
diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java
index 1a0fecc..dc005bb 100644
--- a/java/src/com/android/inputmethod/latin/settings/Settings.java
+++ b/java/src/com/android/inputmethod/latin/settings/Settings.java
@@ -101,6 +101,7 @@
     // Emoji
     public static final String PREF_EMOJI_RECENT_KEYS = "emoji_recent_keys";
     public static final String PREF_EMOJI_CATEGORY_LAST_TYPED_ID = "emoji_category_last_typed_id";
+    public static final String PREF_LAST_SHOWN_EMOJI_CATEGORY_ID = "last_shown_emoji_category_id";
 
     private Resources mRes;
     private SharedPreferences mPrefs;
@@ -383,15 +384,25 @@
         return prefs.getString(PREF_EMOJI_RECENT_KEYS, "");
     }
 
-    public static void writeEmojiCategoryLastTypedId(
-            final SharedPreferences prefs, final int category, final int id) {
-        final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + category;
-        prefs.edit().putInt(key, id).apply();
+    public static void writeLastTypedEmojiCategoryPageId(
+            final SharedPreferences prefs, final int categoryId, final int categoryPageId) {
+        final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + categoryId;
+        prefs.edit().putInt(key, categoryPageId).apply();
     }
 
-    public static int readEmojiCategoryLastTypedId(
-            final SharedPreferences prefs, final int category) {
-        final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + category;
+    public static int readLastTypedEmojiCategoryPageId(
+            final SharedPreferences prefs, final int categoryId) {
+        final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + categoryId;
         return prefs.getInt(key, 0);
     }
+
+    public static void writeLastShownEmojiCategoryId(
+            final SharedPreferences prefs, final int categoryId) {
+        prefs.edit().putInt(PREF_LAST_SHOWN_EMOJI_CATEGORY_ID, categoryId).apply();
+    }
+
+    public static int readLastShownEmojiCategoryId(
+            final SharedPreferences prefs, final int defValue) {
+        return prefs.getInt(PREF_LAST_SHOWN_EMOJI_CATEGORY_ID, defValue);
+    }
 }
