using Android.App;
using Android.Content;
using Android.OS;
using AndroidX.AppCompat.App;
using System.Threading.Tasks;

namespace Billing.Droid
{
    [Activity(
        MainLauncher = true,
        NoHistory = true,
        Theme = "@style/MainTheme.Splash",
        Name = "org.tsanie.billing.SplashScreen")]
    public class SplashActivity : AppCompatActivity
    {
        public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
        {
            base.OnCreate(savedInstanceState, persistentState);
        }

        public override void OnBackPressed() { }

        protected override void OnResume()
        {
            base.OnResume();
            Task.Run(() => StartActivity(new Intent(Application.Context, typeof(MainActivity))));
        }
    }
}