$30 off During Our Annual Pro Sale. View Details »

Remote Control your App

Remote Control your App

AndroidMakers 2018 talk

Stan Kocken

April 23, 2018
Tweet

More Decks by Stan Kocken

Other Decks in Technology

Transcript

  1. Remote Control your App
    AndroidMakers 2018 - Stan Kocken

    View Slide

  2. Why?
    2

    View Slide

  3. Release Cycle
    3

    View Slide

  4. Different company, different style: max time between updates
    4
    Source: appannie.com - updates on the store between 1st April 2017 and 1st April 2018 - 75% - 95% confidence interval
    5-6 days 9-16 days 7-17 days
    15-21 days
    63-66 days 11-15 days

    View Slide

  5. Frequent updates is the way to go?
    5

    View Slide

  6. Daily updates […] Everybody can see it's
    because of too little testing
    - real review of a user
    6

    View Slide

  7. 7
    Less frequent update: the main reasons
    Event-based application
    No dev working actively on it
    Expensive release

    View Slide

  8. Our release cycle: Release Train
    8
    5.12.0
    5.13.X
    5.13.0
    5.14.X
    Week 1 Week 2 Week 3 Week 4
    beta
    5%
    20%
    100%
    beta
    5%
    20%
    100%
    alpha
    alpha

    View Slide

  9. App Release Feature Release
    9

    Our Release Train
    Engineers Product/Marketing

    View Slide

  10. How do you do that?
    10

    View Slide

  11. Remote Control your App
    AndroidMakers 2018 - Stan Kocken

    View Slide

  12. But… I need to change this text…
    I want to test this…
    - product owner
    12

    View Slide

  13. Remote Control your App
    AndroidMakers 2018 - Stan Kocken

    View Slide

  14. WebView
    14

    View Slide

  15. A View that displays web pages
    - https://developer.android.com/reference/android/webkit/WebView.html
    15

    View Slide

  16. 16
    How?
    99% Hybrid Low-touch
    Facebook lite
    1.6MB
    Installs: 500,000,000+
    4.3/5
    ~ Mobile website
    vs vs
    Native and Web None or 

    just few pages
    Eurostar v1

    (2011)
    • Help pages
    • Credit card
    payments
    • …

    View Slide

  17. 17
    Advantages
    Full control without app update
    Cross-platform
    “I know HTML, I can make an app”
    Cheaper: Lower price

    View Slide

  18. 18
    Disadvantages
    Full control without app update
    Cross-platform
    “I know HTML, I can make an app”
    Cheaper: Lower price
    BAD
    quality
    So nobody feel at home

    View Slide

  19. If even Facebook cannot make it great, 

    how can you?
    19

    View Slide

  20. 20
    WebView: Take-away
    - no budget
    - limited part
    - “lite” application
    - everything else
    BAD
    GOOD

    View Slide

  21. Remote Screen Configuration
    21

    View Slide

  22. Configuration
    22
    UI

    View Slide

  23. 23
    "render": {
    "card_premium": {
    "title": {
    "resource": "configurable_premium_title"
    },
    "color": "#25B41E",
    "descriptionItems": [
    {
    "title": {
    "resource": "configurable_premium_item_title_backup"
    },
    "description": {
    "resource": "configurable_premium_item_description_backup"
    },
    "icon": {
    "defaultResource": "configurable_premium_features_backup"
    }
    },
    {
    "title": {
    "resource": "configurable_premium_item_title_sync"
    },
    "description": {
    "resource": "configurable_premium_item_description_sync"
    },
    "icon": {
    "defaultResource": "configurable_premium_features_sync"
    }
    },

    View Slide

  24. 24
    WebView
    Remote Screen

    Configuration
    100% remotely controlled
    Cross-platform definition
    Native UI look&feel
    Cost $ $$$
    remotely controlled

    View Slide

  25. Remote Copy
    25

    View Slide

  26. I need to change this text.
    When can we have this live?
    - product owner
    26

    View Slide

  27. But… the text is within Strings.xml…
    Strings.xml within the app…
    So we need an update.
    - dev
    27

    View Slide

  28. 28
    getString(R.string.hello_world)
    Hello World
    "Hello World"
    +
    =
    Strings.xml

    View Slide

  29. What about a JSON file?
    - dev
    29

    View Slide

  30. jsonObject.optString("hello_world")
    30
    "Hello World"
    +
    =
    {"hello_world": "Hello World"}
    Simple JSON

    View Slide

  31. Where should I put the French version?
    - product owner
    31

    View Slide

  32. 32
    Localised JSON
    {
    "en": {
    "hello_world": "Hello World"
    },
    "fr": {
    "hello_world": "Bonjour le monde"
    }
    }
    jsonObject.getJSONObject(“fr").optString("hello_world")
    “Bonjour le monde”
    +
    =

    View Slide

  33. A user is Spanish should see the English
    version
    - QA
    33

    View Slide

  34. 34
    Auto-select language
    res
    - values
    - default_strings.xml
    - values-fr
    - default_strings.xml

    en


    fr

    jsonObject.getJSONObject(getString(R.string.locale))
    .optString("hello_world")

    View Slide

  35. Hmmm, and from my XML layout?
    - dev
    35

    View Slide

  36. 36
    XML Layout: the keys

    android:text="hello_world" />

    View Slide

  37. 37
    Custom Layout Inflator
    class MyLayoutInflater(context: Context, private val translator: Translator)
    : LayoutInflater(context) {
    override fun onCreateView(parent: View?, name: String?, attrs: AttributeSet?): View {
    val view = super.onCreateView(parent, name, attrs)
    (view as? TextView)?.let { replaceTextKeyByValue(it) }
    return view
    }
    private fun replaceTextKeyByValue(textView: TextView) {
    textView.text = translator.replaceByValueIfNecessary(textView.text)
    textView.hint = translator.replaceByValueIfNecessary(textView.hint)
    }

    View Slide

  38. 38
    Custom Layout Inflator
    class MyLayoutInflater(context: Context, private val translator: Translator)
    : LayoutInflater(context) {
    override fun onCreateView(parent: View?, name: String?, attrs: AttributeSet?): View {
    val view = super.onCreateView(parent, name, attrs)
    (view as? TextView)?.let { replaceTextKeyByValue(it) }
    return view
    }
    private fun replaceTextKeyByValue(textView: TextView) {
    textView.text = translator.replaceByValueIfNecessary(textView.text)
    textView.hint = translator.replaceByValueIfNecessary(textView.hint)
    }

    View Slide

  39. What about plurals?
    And a different text per app version?
    And “Welcome %s to our app”
    39

    View Slide

  40. • Standard i18n functions (plurals, context, interpolation, format)
    • JSON format
    • Created for Javascript
    • Android reader: https://github.com/i18next/i18next-android
    Written by myself 5 years ago
    40
    .com

    View Slide

  41. A/B Testing
    41

    View Slide

  42. Compare two (or more) experiences to
    choose the best
    42

    View Slide

  43. Example
    43

    View Slide

  44. 44
    https://medium.com/wolfgangbremer/amazon-is-the-king-of-a-b-testing-f46008e3b528

    View Slide

  45. 45
    Maxime Lorant - https://commons.wikimedia.org/wiki/File:A-B_testing_simple_example.png

    View Slide

  46. Local or Server
    46
    A or B?
    Random().nextInt() % 2
    => Save locally
    => Send to Analytics
    Cross-platform A or B

    View Slide

  47. 47
    KEEP
    CALM
    AND
    WAIT FOR

    IT…

    View Slide

  48. 48
    Wait

    From minutes,
    TO MONTHS!

    View Slide

  49. How long should I wait?
    49

    View Slide

  50. One at the time
    50

    View Slide

  51. Feature Flip
    51

    View Slide

  52. Remotely decide when a feature is enable
    52

    View Slide

  53. App Release Feature Release
    53

    Store update Feature Flip

    View Slide

  54. A/B test Feature Flip
    54

    Find best experiences Progressive Rollout
    Synchronise cross-platform
    Beta test

    View Slide

  55. A/B Test, Feature Flip: tools
    55
    Braze (formerly Appboy), hack of newsfeed
    Firebase Remote Config
    Home-made solution

    View Slide

  56. Dashlane usage
    56

    View Slide

  57. Dashlane Recipe
    • Release: every two weeks
    • WebView: very limited part
    • Remote Screen Configuration: for the premium page
    • Remote Copy: we don’t
    • A/B Test: home-made solution
    • Feature Flip: home-made solution, highly used
    57

    View Slide

  58. App Release Feature Release
    58

    Engineers Product/Marketing

    View Slide

  59. Thank you
    @stan_kocken
    59

    View Slide