To Autoboot your app, add the following lines to the end of the OnStart() function:

  //Start this app on tablet boot up (if required).
  //(SetAutoWifi and SetAutoStart have no effect in APKs)
  app.SetAutoBoot( "app" ); 
  app.SetAutoWifi( true );    
  app.SetAutoStart( app.GetAppName() );