package cn.liujson.appupdatedemo;


import android.os.Bundle;
import android.os.Environment;

import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import java.io.File;


/**
 * @author liujson
 */
public class MainActivity extends AppCompatActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ActionBar supportActionBar = getSupportActionBar();
        if (supportActionBar != null) {
            supportActionBar.hide();
        }
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.fl_container, AppUpdateFragment.newInstance("http://192.168.1.181:8090/static/app/apk_update_info.json",
                        new File(Environment.getExternalStorageDirectory(), "/test/testUpdate.apk").getAbsolutePath()))
                .commit();
    }
}