一款不用手动打卡,自动调起钉钉和企业微信上班打卡的App(更新篇)

 想要APK(安装包)的可以私聊我  我看到会第一时间发给你 (对此APP有其他想法的也欢迎沟通)

介绍:进入app页面如果有需要悬浮窗权限,显示在其他应用的上层把他打开,总而言之有要权限的就打开就OK了,可支持钉钉和企业微信调起(要先选择使用钉钉或是企业微信,默认是钉钉),两种方式吊起钉钉和企业微信,一种拨打电话方式(手机里面需要有电话卡),另一种方式设置调起时间,然后点击保存按钮后提示成功,按home键APP退到后台(不能杀死)生效,可以锁屏
特别注意!!! 保存时间的“:”为英文符号不是中文的,保存时间格式为24小时制,保存时间一次之后,每天就按照你设置的时间启动钉钉了,保存电话之后,你就可以使用保存的电话拨打仍在公司的电话,想更改电话或者时间重新输入电话号保存即可 

主要代码:




public class BackGroundService extends Service {
    private Context mContext;
    private MediaPlayer bgmediaPlayer;
    private boolean isrun = true;
    private NotificationManager notificationManager;
    private int NOTIFICATION = R.string.notification_live_start;

    public BackGroundService() {

    }

    @Override
    public void onCreate() {
        super.onCreate();
        notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    }

    @SuppressLint("NewApi")
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        mContext = this;
        NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
        builder.setSmallIcon(R.mipmap.ic_launcher);
        builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
        // 【适配Android8.0】设置Notification的Channel_ID,否则不能正常显示
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            builder.setChannelId("notification_id");
        }

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
            NotificationChannel channel = new NotificationChannel("notification_id", "notification_name", NotificationManager.IMPORTANCE_LOW);
            notificationManager.createNotificationChannel(channel);
        }
        startForeground(1, builder.build());
        new Thread() {
            @Override
            public void run() {
                super.run();
                while (isrun) {
                    try {
                        Thread.sleep(50000);
                    } catch (InterruptedException es) {
                        es.printStackTrace();
                    }
                    String s = getSystemTime() + "";
                    s = s.substring(0, 5);
                    Log.e("========s", s);
//                    Log.e("========time", SharedPreferencesUtil.get(mContext, "time", "") + "");
                    //在这里面设置你想启动钉钉的时间(这个第一种启动钉钉的方式)
                    if (s.equals(SharedPreferencesUtil.get(mContext, "time", "") + "")) {
                        if (String.valueOf(SharedPreferencesUtil.get(mContext, "type", "")).equals("com.alibaba.android.rimet")) {
                            Utils.openCLD("1", "com.alibaba.android.rimet", getBaseContext());
                        } else {
                            Utils.openCLD("2", "com.tencent.wework", getBaseContext());
                        }
                    } else if (s.equals("0" + SharedPreferencesUtil.get(mContext, "time", ""))) {
                        if (String.valueOf(SharedPreferencesUtil.get(mConte
评论 186
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值