Слайд 22017 Global e-commerce retail sales
$2.3T
Statista: https://www.statista.com/statistics/379046/worldwide-retail-e-commerce-sales/
Слайд 3But online conversion
is still a big problem
Слайд 4of cart abandonments
due to “too long/complicated checkout process”
Source:
Baymard Institute: https://baymard.com/lists/cart-abandonment-rate
28%
Слайд 5Pay everywhere with your Google account
Слайд 11More likely to complete
the booking flow,
with Google Pay
65%
Слайд 12Increase in the number of unique users paying with Google
Pay
7X
Слайд 13Works on:
Safari
Opera
Firefox
Chrome
UC Browser
Microsoft Edge (coming soon)
Aita2Sads5we$
Слайд 15Processor Integration - logical data flow
1. Clicks on Google Pay
button
2. Google Pay app/popup invoked
4. Confirms card / other details
3.
Provides available payment methods / other details
parameters
9. Confirms transaction to user
Слайд 16Direct Integration - logical data flow
1. Clicks on Google Pay
button
2. Google Pay app/popup invoked
4. Confirms card / other details
3.
Provides available payment methods / other details
Parameters + public key
8. Performs transaction / sends result
9. Confirms transaction to user
Слайд 17User experience recommendations
Display Google Pay early and prominently as payment
method
Display all relevant purchase information including final price and
items/services purchased, before confirming an order
If you display payment information on confirmation screens or emails, you may display the payment card description returned by Google Pay API
Use only the official button styles and logo assets in your app/web
Слайд 18Google Pay vs Android Pay
Brand new SDK
1 hour for initial
integration
New brand new sdk – a bit more complicated
Migration from
Android Pay needed
Review needed
Слайд 19Google Pay
Reasons to use:
Free
Safe
Commonly used
Слайд 20Android perks overview
Sceneform + Dynamic delivery
Slices
App indexing
App Actions
Shortcuts
Firebase analytics
Слайд 21Sceneform + Dynamic delivery
Simply not working
Слайд 22Sceneform + DD
Unable to load Texture registryId='android.resource://com.arfeature.arprofile/drawable/sceneform_plane' java.util.concurrent.CompletionException: java.lang.IllegalStateException: java.io.FileNotFoundException:
No package found for authority: android.resource://com.arfeature.arprofile/drawable/sceneform_plane java.util.concurrent.CompletionException: java.io.FileNotFoundException: No package
found for authority: android.resource://com.arfeature.arprofile/raw/sceneform_plane_shadow_material
Слайд 23Sceneform + DD
https://goo.gl/GmufL3 - demo project
https://goo.gl/aVSFJf - GitHub issue to
spam Google with reports and force fix
Слайд 24App Bundle in August
Series of unreproducible crashes on some of
the devices
Слайд 25Slices
Idea:
Create shareable components of your app
Purpose:
Support native widgets Assistant &
Search apps
Слайд 26Slices
Alternative usage:
Give access to UI for user without sharing any
internal code|data
Слайд 27App actions
No SDK available yet
No EAP
Слайд 28App Indexing
Public content indexing
Personal content indexing
Log user actions
Слайд 29App Indexing
Search results
Installs from webpage
Autocompletions in Google app
Assistant – screen
search
Ad targeting
Слайд 30Personal App Indexing IRL
~1,5 years ago – 1-2% of users
Now
– 0.01%
Слайд 31Shortcuts
Shortcuts:
0.31% of users
Simple Android widget:
5% of users
Слайд 32Firebase Analytics
Dynamic auditory
Enable BigQuery integration
Слайд 33Middle East Adaptation
Kuwait, Saudi Arabia, UAE, Oman, Bahrein, Qatar
Слайд 35Expectation – 3 days
Check RTL implementation for some views
Lint for
XML
Manual check for all custom views (~30)
Translations proofreading
?????
PROFIT!
Слайд 36Reality: 4 weeks
Without much sleep
Слайд 37Translations proofreading
“Almost all strings are from Google Translate”
Translated.com – official
provider from GP
No abbreviations allowed
We should offer language switch:
Onboarding
Settings
Слайд 38Translations: numbers
Arabic: ٠ ١ ٢ ٣ ٤ ٥ ٧ ٨
٩
Latin: 0 1 2 3 4 5 6 7
8 9
Слайд 39Translations: numbers
String.format(
“SELECT column FROM db WHERE column_2 > %d”, 12)
Слайд 40Translations: numbers
Arabic numbers are not welcomed in ‘ar’ locale:
Emirate Airlines,
Qatar airlines, WeGo use Latin numbers
Can’t simply insert non-Arabic text
into Arabic text
Слайд 41Translations: numbers
Arabic numbers are not welcomed in ‘ar’ locale:
Use String.format(Locale.US,
“%d xxxx”, 12)
Слайд 42Translations: numbers
Arabic numbers are not welcomed in ‘ar’ locale:
Use String.format(Locale.US,
“%d xxxx”, 12)
Replace TextView with RobotoTextView
Override setText();
Слайд 43Translations: numbers
@Override
public void setText(CharSequence text, BufferType type) {
if(type==BufferType.SPANNABLE){
super.setText(text, type);
}else {
super.setText(arabicToDecimal(getContext(), text), type);
}
}
Слайд 44
public static String arabicToDecimal(Context context, CharSequence number) {
if
(number != null) {
if (context !=
null && !LocaleManager.isPersian(context)
&& isRTL(context)) {
char[] chars = new char[number.length()];
for (int i = 0; i < number.length(); i++) {
char ch = number.charAt(i);
if (ch >= 0x0660 && ch <= 0x0669)
ch -= 0x0660 - '0';
else if (ch >= 0x06f0 && ch <= 0x06F9)
ch -= 0x06f0 - '0';
chars[i] = ch;
}
return new String(chars);
} else {
return number.toString();
}
} else {
return "";
}
}
Слайд 45
public static String arabicToDecimal(Context context, CharSequence number) {
if
(number != null) {
if (context !=
null && !LocaleManager.isPersian(context)
&& isRTL(context)) {
char[] chars = new char[number.length()];
for (int i = 0; i < number.length(); i++) {
char ch = number.charAt(i);
if (ch >= 0x0660 && ch <= 0x0669)
ch -= 0x0660 - '0';
else if (ch >= 0x06f0 && ch <= 0x06F9)
ch -= 0x06f0 - '0';
chars[i] = ch;
}
return new String(chars);
} else {
return number.toString();
}
} else {
return "";
}
}
Слайд 46public static boolean isPersian(Context context) {
return getLanguage(context).contains("fa");
}
Слайд 47Translations: concatenation
return DateFormat.getLongDateFormat(context)+ " " + DateFormat.getTimeFormat(context);
Result in English: October
20, 2018 20:07
أكتوبر
Слайд 48Quiz:
return DateFormat.getLongDateFormat(context)+ " " + DateFormat.getTimeFormat(context);
Result in English: October 24,
2018 07:59
Result in Arabic:
أكتوبر 24, 2018 07:59
07:59 أكتوبر 24, 2018
07:59
24 أكتوبر 2018
2018 07:59 أكتوبر 24
أكتوبر
Слайд 49Translations: concatenation
أكتوبر
Слайд 50Translations: concatenation
myArabicString + "\u202A" + myEnglishString + "\u202C" + moreArabic
Слайд 51Translations: calendar
Abbrev in names
Arabic numbers
Year picker
RTL support
Слайд 53Translations: text gravity
setTextDirection(TEXT_DIRECTION_LOCALE);
setTextAlignment(TEXT_ALIGNMENT_GRAVITY);
Слайд 55Translations: date
SimpleDateFormat
android.text.format.DateFormat
DateFormat.getBestDateTimePattern
Concatenation of Calendar values
Слайд 57Translations: date
Don’t use MMM pattern, replace with LLL
Use LLLL
for arabic
Слайд 58Translations: sum up
No abbreviations allowed
Replace arabic numbers with latin
Language switch
Use CustomTextView
MEA != Persian language
Can’t simply insert non-Arabic
text into Arabic text
Слайд 59Translations: plurals
Plurals translations reviewed:
Replace all concatenated plurals
Add new ones
Translate everything
Multiple
troubles with translation system
Слайд 60Translations: plurals
users nearby
user nearby
String nearbyUsersCount = usersCount +
getUserCountString(usersCount);
1 user nearby
2 users nearby
…
10 users nearby
Слайд 61Translations: plurals
String nearbyUsersCount = usersCount + getUserCountString(usersCount);
1 пользователь рядом
2 пользователей
рядом
…
10 пользователей рядом
пользователей рядом
пользователь рядом
Слайд 62Translations: plurals
String nearbyUsersCount = usersCount + getUserCountString(usersCount);
1 пользователь рядом
2 пользователей
рядом
…
10 пользователей рядом
пользователей рядом
пользователь рядом
Слайд 63Translations: plurals
quantity="two">
Слайд 64Translations: plurals
пользователь рядом
пользователя рядом
quantity="many">пользователей рядом
пользователей рядом
String nearbyUsersCount = usersCount + getUserCountString(usersCount);
name="nearby_users_two">пользователя рядом
пользователей рядом
пользователь рядомString nearbyUsersCount = usersCount +
getResources().getQuantityString(R.plurals.d_users_nearbyusers, (int) usersCount)
Слайд 67Translations: plurals
users nearby
user nearby
%s
user nearby
%s users nearby
x20
Слайд 68Internal
Lib module:
Essential custom views
Density helper
Date & time formatting helper
Locale manager
– changing languages
RTL Helper
Can be shared across projects