admin
7 天以前 7f0825f8195a522ed7e8bcdb6347f3a719e06c74
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.weikou.beibeivideo.receiver;
 
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Handler;
 
public class APPInstallReceiver extends BroadcastReceiver {
 
    private Context mContext;
 
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("android.intent.action.PACKAGE_ADDED")) {
            final String packageName = intent.getDataString().substring(8);
            mContext = context;
            int time = 0;
            if (Build.VERSION.SDK_INT >= 21) {
                time = 2000;
            }
 
            handler.postDelayed(new Runnable() {
 
                @Override
                public void run() {
 
                }
            }, time);
        }
    }
 
    Handler handler = new Handler() {
        public void handleMessage(android.os.Message msg) {
 
        };
    };
}