package com.charmeryl.appupdaterdemo;

import android.content.pm.PackageManager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.charmeryl.appupdater.AppUpdater;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView(){
        Button btn_update_avail = (Button) findViewById(R.id.btn_update_avail);
        Button btn_update_none = (Button) findViewById(R.id.btn_update_none);

        btn_update_avail.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new AppUpdater(MainActivity.this)
                        .setTriggerMethod(AppUpdater.MANUALLY)
                        .setUpdateUrl("https://gist.githubusercontent.com/CharmeRyl/efa87949bd3724221b02ea4d01919ba9/raw/51557b836999e298d445e695438e42f1cfe3b0e5/updater.json")
                        .start();
            }
        });

        btn_update_none.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new AppUpdater(MainActivity.this)
                        .setTriggerMethod(AppUpdater.MANUALLY)
                        .setUpdateUrl("https://raw.githubusercontent.com/charmeryl/AppUpdater/master/app/update-latest.json")
                        .start();
            }
        });
    }
}

@@ -36,93 +36,8 @@
 o;%0A%0A
-import android.content.pm.PackageManager;%0Aimport android.support.v7.app.AlertDialog;%0A
 impo
@@ -875,32 +875,46 @@
 thod(AppUpdater.
+TriggerMethod.
 MANUALLY)%0A      
@@ -1384,16 +1384,30 @@
 Updater.
+TriggerMethod.
 MANUALLY

update params