Change first view from android intent on start application

This is my tip how to pass state parameter to ionic app using android intent.
Our applications usual is starting when we tap on it on desktop or application center. But sometimes we need to start application from 3th party application/android native …

i now we can pass this information via custom plugin but this is bad solutions (for some time we don’t have connection between native android and our ionic framework and it’s not good idea to wait until connection will be establish.

Cordova Activity dont give us option to pass some date when we lunch url in onCreate method but we can do it via url itself.

  1. Create different index.html with diffrent names: Like
    index.html, index_gallery.html, index_whatever.html.
  2. check intent in onCreate method in MainActivity to open good html index file.
  3. put in each index html file static glopab variable name firstView, firstState ect.
  4. in config of our ionic framework use it global variable .

I notice that it give us very good performance improvements.

BR airBedUi