Takeaways from Mary Meeker’s 2013 Internet Trends

What really stood out for me are the following:

  1. The hidden potential in India’s market.. Its essentially a sleeping giant. Their smart phone adoption is going to be a game changer. China is #1, india is currently 5th
  2. In addition to that, India is 3rd in 2012’s internet users. And thats just a 11% population penetration. In comparison, China(#1) is 48% and USA (#2) is 78%. Huge opportunity there.
  3. The incredible rapid adoption of new technologies/devices (iPhone, tablets…)
  4. Wearable devices is the future. Expect change soon!
  5. The presence of Mobile apps is accelerating growth tremendously (0 to 1M users in no time)
  6. Massive opportunity for entrepreneurs to get their products in front of millions of users. The time is right to start your own company.
  7. Smart phone users access their phones for the following -> (in order) messaging, voice call, checking time, music, gaming, social media
  8. Soo many 1st or 2nd generation immigrant founders who’ve made a difference in the world (Apple, Google, IBM, Oracle, Amazon…)
  9. alibaba.com is huge!!! if you think Amazon was huge think again.
  10. “You help me”, “I help you”, “We help others”

Building a landing page

We were recently having a discussion around what the landing/login page of http://howzatnow.com should look like. The argument was that by not giving enough information, majority of the visitor would tend to drop off instead of signing up.

There are 2 schools of thought around this:

  1. Have an open book type login page. Show everything about the website upfront
  2. Create an elusive members only concept. Only when you sign up do you see what you get.

Option (1) is done by every tom,dick and harry IMO. It has its pro’s and cons. Its very clear on what to expect, which is great. But i would argue that more people might drop off saying oh, i know what its all about, I dont need to try it. Since we’re a start up and our sole objective is to attract people, is this the best approach for us?

(2) is kinda new. Websites like gmail, facebook, twitter, linkedin all have adopted this approach and it has clearly worked. True, some people may not want to venture in because they dont know enough about what it is, but the majority will. The little information that is provided should generate enough curiosity. Its proven. Humans are curious by nature and this approach builds off that. Again, is this the best approach for us?

Our current login page has adopted the second approach. The decision we made to keep the login page the way it is was deliberate.

However, i feel there needs to be a balance. If we think that our login page doesn’t talk about Fantasy Cricket enough, then that should be addressed. It should act as a teaser to what to expect (we dont want to give away everything after all). Remember, we want to be different. We want to be leaders/trail blazers and not follow the crowd.

What do you think of this? Would love to hear your thoughts on these two quite distinct approaches.

Android: AsyncTasks and Rotation

Recently i came across an interesting scenario.

  • User holds the app in landscape mode
  • Performs an action that kicks off an async task (the task upon completion displays a notification to the user)
  • Before the task completed, the user changes the orientation to portrait mode.
  • I would expect the background task to continue doing whats its supposed to do, and give me a notification when its done.
  • But no notification was observed. Did the task complete? Why was there no notification (error or success)

After further digging into this scenario, i realized that even though the async task completed, it was unable to attach it self back to the calling fragment because the fragment was destroyed and recreated again due to the rotation. Oh crap.

Handling screen configuration changes has become the bane of Android development for me. But it also poses a good challenge. What happened here and how best to overcome this. I had to do some research.

Turns out its a pretty straightforward concept.

First, there are two things we need to understand about loaders.

            public abstract <D> Loader<D> initLoader(int id, Bundle args,
            LoaderManager.LoaderCallbacks<D> callback);

starts a new loader with the given id, or tries to re-connect with an existing loader with that id.

public abstract <D> Loader<D> restartLoader(int id, Bundle args,
            LoaderManager.LoaderCallbacks<D> callback);

starts a new loader with the given id OR, re-start an existing loader with that id.

This means if i call restartLoader, it will re-execute that task again in the background. If i call initLoader, it will  NOT re-execute that task again but simply return the result if that loader has finished its job.

To handle the rotation missing async task problem, the trick here is when onActivityCreated() is called after rotation, we need to call initLoader with the id to re-connect with our loader and get back the result of our async task. If we don’t do that, our async task would have executed, but we would had no idea that it did and onLoadFinished() would never be called. And in my case display a never ending “loading…” dialog.

Here’s a link that helped me figure it out -> http://android.codeandmagic.org/2011/07/android-fragments-saving-state-and-screen-rotation/

How to center a view inside an Android layout?

I made the rookie mistake of defining my Android layout and views using padding and margin. However this doesn’t work the moment you view your layout on a device whose screen larger than the one you designed it for. The hacky way is to define layouts for each screen resolution and placing them in the /res/layout/layout-land or /res/layout/layout-w600dp.

Instead, you can center align your layouts and views. This makes sure that your sub views are always center aligned no matter the device screen width. Here’s an example,

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relLayout1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center">
    <ProgressBar
        android:id="@+id/ProgressBar01"
        android:layout_centerInParent="true"
        android:layout_width="wrap_content"
        android:layout_gravity="center"
        android:layout_height="wrap_content"></ProgressBar>
    <TextView
        android:layout_below="@id/ProgressBar01"
        android:text="@string/please_wait_authenticating"
        android:id="@+id/txtText"
        android:paddingTop="30px"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"></TextView>
</RelativeLayout>

Note that the RelativeLayout parent has the property android:layout_gravity=”center” set and the children have their widths as “wrap_content”. You can also specify a specific width. (But not match_parent)