├── app ├── .gitignore ├── autodingding.jks ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── attrs.xml │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── mipmap-xxhdpi │ │ │ ├── bg_2.jpg │ │ │ ├── bg_3.jpg │ │ │ ├── ding.png │ │ │ ├── logo.jpg │ │ │ ├── about.png │ │ │ ├── clock.png │ │ │ ├── delete.png │ │ │ ├── empty.png │ │ │ ├── output.png │ │ │ ├── right.png │ │ │ ├── shaizi.png │ │ │ ├── day_blue.png │ │ │ ├── day_gray.png │ │ │ ├── history.png │ │ │ ├── settings.png │ │ │ ├── ic_launcher.png │ │ │ ├── logo_round.png │ │ │ ├── update_code.png │ │ │ ├── settings_blue.png │ │ │ ├── settings_gray.png │ │ │ └── ic_launcher_round.png │ │ ├── raw │ │ │ └── tip │ │ ├── drawable │ │ │ ├── bg_textview.xml │ │ │ ├── bg_textview_error.xml │ │ │ ├── select_switch_circle.xml │ │ │ ├── bottom_text_color.xml │ │ │ ├── list_divider.xml │ │ │ ├── select_switch_background.xml │ │ │ ├── swich_background_on.xml │ │ │ ├── popup_list_divider.xml │ │ │ ├── switch_circle_off.xml │ │ │ ├── swich_background_off.xml │ │ │ ├── svg_back.xml │ │ │ ├── switch_circle_on.xml │ │ │ ├── ic_stop.xml │ │ │ └── ic_launcher_background.xml │ │ ├── anim │ │ │ ├── popup_hide.xml │ │ │ └── popup_show.xml │ │ ├── layout │ │ │ ├── easy_popup.xml │ │ │ ├── item_tab.xml │ │ │ ├── item_easy_popup.xml │ │ │ ├── include_title.xml │ │ │ ├── item_list.xml │ │ │ ├── fragment_remote_sign.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_history.xml │ │ │ ├── fragment_push.xml │ │ │ ├── permission_fragment.xml │ │ │ ├── fragment_mail_conf.xml │ │ │ └── fragment_day.xml │ │ ├── menu │ │ │ └── bottom_nav_menu.xml │ │ ├── xml-v24 │ │ │ └── gesture_accessibility_config.xml │ │ ├── xml │ │ │ └── base_accessibility_config.xml │ │ └── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ ├── com │ │ │ └── pengxh │ │ │ │ └── autodingding │ │ │ │ ├── ApiException.kt │ │ │ │ ├── bean │ │ │ │ ├── PushChannel.kt │ │ │ │ ├── ThirdPartyConf.kt │ │ │ │ ├── Workday.kt │ │ │ │ ├── PushOption.kt │ │ │ │ ├── PushResp.kt │ │ │ │ ├── WorkdayResp.kt │ │ │ │ ├── PushAudience.kt │ │ │ │ ├── PushNotification.kt │ │ │ │ ├── Version.kt │ │ │ │ ├── AndroidNotif.kt │ │ │ │ ├── BodyMsg.kt │ │ │ │ ├── PushMessage.kt │ │ │ │ ├── MailInfo.kt │ │ │ │ └── HistoryRecordBean.java │ │ │ │ ├── service │ │ │ │ ├── PushService.kt │ │ │ │ ├── GestureService.kt │ │ │ │ ├── BaseAccessibilityService.kt │ │ │ │ └── NotificationMonitorService.kt │ │ │ │ ├── base │ │ │ │ ├── ApiResponse.kt │ │ │ │ ├── BaseViewModel.kt │ │ │ │ └── BaseVmFragment.kt │ │ │ │ ├── actions │ │ │ │ ├── Action.kt │ │ │ │ ├── SwipeUnlockAction.kt │ │ │ │ └── DingSignAction.kt │ │ │ │ ├── net │ │ │ │ ├── api │ │ │ │ │ ├── UpdateApi.kt │ │ │ │ │ ├── PushApi.kt │ │ │ │ │ └── WorkDayApi.kt │ │ │ │ ├── AuthInterceptor.kt │ │ │ │ └── RetrofitManager.kt │ │ │ │ ├── ui │ │ │ │ ├── fragment │ │ │ │ │ ├── PermissionVM.kt │ │ │ │ │ ├── RemoteSignFragment.kt │ │ │ │ │ ├── MailConfVM.kt │ │ │ │ │ ├── PushVM.kt │ │ │ │ │ ├── PermissionFragment.kt │ │ │ │ │ ├── MailConfFragment.kt │ │ │ │ │ └── PushFragment.kt │ │ │ │ └── WelcomeActivity.kt │ │ │ │ ├── utils │ │ │ │ ├── EmailAuthenticator.kt │ │ │ │ ├── Param.java │ │ │ │ ├── Constant.java │ │ │ │ ├── KtUtils.kt │ │ │ │ ├── TimeOrDateUtil.kt │ │ │ │ ├── AccessibilityUtil.kt │ │ │ │ ├── StatusBarColorUtil.java │ │ │ │ ├── ViewExt.kt │ │ │ │ ├── RomUtils.kt │ │ │ │ ├── SendMailUtil.kt │ │ │ │ ├── ParamUtil.kt │ │ │ │ ├── MailSender.kt │ │ │ │ └── ExcelUtils.kt │ │ │ │ ├── adapter │ │ │ │ ├── FragAdapter.kt │ │ │ │ └── HistoryRecordAdapter.kt │ │ │ │ ├── BatteryLevelReceiver.kt │ │ │ │ ├── greendao │ │ │ │ ├── DaoSession.java │ │ │ │ ├── DaoMaster.java │ │ │ │ └── HistoryRecordBeanDao.java │ │ │ │ ├── widgets │ │ │ │ ├── EasyPopupWindow.kt │ │ │ │ └── PopupAdapter.java │ │ │ │ ├── BaseApplication.kt │ │ │ │ ├── AndroidxBaseFragment.java │ │ │ │ └── AndroidxBaseActivity.java │ │ └── xcom │ │ │ └── warof │ │ │ └── chosen │ │ │ └── greendao │ │ │ ├── DaoSession.java │ │ │ ├── DaoMaster.java │ │ │ └── HistoryRecordBeanDao.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── img.png ├── sxwdsoft.jks ├── demoImage ├── 0.jpg ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.png └── 7.jpg ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── encodings.xml ├── compiler.xml ├── kotlinc.xml ├── migrations.xml ├── deploymentTargetSelector.xml ├── jarRepositories.xml ├── codeStyles │ └── Project.xml └── misc.xml ├── settings.gradle ├── gradle.properties ├── README.md ├── .gitignore ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/img.png -------------------------------------------------------------------------------- /sxwdsoft.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/sxwdsoft.jks -------------------------------------------------------------------------------- /demoImage/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/0.jpg -------------------------------------------------------------------------------- /demoImage/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/1.jpg -------------------------------------------------------------------------------- /demoImage/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/2.jpg -------------------------------------------------------------------------------- /demoImage/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/3.jpg -------------------------------------------------------------------------------- /demoImage/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/4.jpg -------------------------------------------------------------------------------- /demoImage/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/5.jpg -------------------------------------------------------------------------------- /demoImage/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/6.png -------------------------------------------------------------------------------- /demoImage/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/demoImage/7.jpg -------------------------------------------------------------------------------- /app/autodingding.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/autodingding.jks -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/bg_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/bg_2.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/bg_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/bg_3.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/ding.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/logo.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/about.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/clock.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/delete.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/empty.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/output.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/right.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/shaizi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/shaizi.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/day_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/day_blue.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/day_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/day_gray.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/history.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/settings.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/logo_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/update_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/update_code.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/settings_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/settings_blue.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/settings_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/settings_gray.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littleclaw/AutoDing/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/ApiException.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding 2 | 3 | class ApiException(val errorMessage: String, val errorCode: Int) : 4 | Throwable() -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/PushChannel.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class PushChannel { 4 | var distribution_customize = "secondary_push" 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/ThirdPartyConf.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class ThirdPartyConf { 4 | var huawei: PushChannel = PushChannel() 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/Workday.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | data class Workday(val type:Int, val name: String, val date:String, val rest: Int) -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/PushOption.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class PushOption { 4 | var third_party_channel:ThirdPartyConf? = ThirdPartyConf() 5 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/PushResp.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class PushResp { 4 | var errorCode = 0 5 | var messageCn:String? = null 6 | 7 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/WorkdayResp.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class WorkdayResp{ 4 | val code :Int = 0 5 | var workday: Workday? = null 6 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/PushAudience.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class PushAudience { 4 | var registration_id: MutableList = mutableListOf() 5 | } -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/service/PushService.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.service 2 | 3 | import cn.jpush.android.service.JCommonService 4 | 5 | class PushService : JCommonService() -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/PushNotification.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class PushNotification { 4 | var alert:String?= null 5 | var android:AndroidNotif? = null 6 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/Version.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | data class Version(val apkUrl:String, val versionCode: Int, val versionName: String, val description: String, val apkSize: String) -------------------------------------------------------------------------------- /app/src/main/res/raw/tip: -------------------------------------------------------------------------------- 1 | 妈我建议你可以考虑这几个方向。 2 | 1、见下国强小姑,和国强小姑商量一下你怎么和院长发个短信打个电话之类的方法跟进一下事情进展, 3 | 让院长能给到我爸明确的彩礼数字和给的时间的答复。 4 | 2、见下小辰她妈妈,和她妈妈一起吐槽一下爸这边态度问题,舒缓一下两家紧张的关系,再私下在领证前给到她妈妈3万,请她临场只问我爸要5万8, 5 | 我爸要是高兴了可能还是会坚持按院长说的给足8万8的话引玲姨自然会把你多给的3万再私下退回给你 -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_textview.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_textview_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/base/ApiResponse.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.base 2 | 3 | data class ApiResponse(var errorCode: Int, var errorMsg: String, var data: T) { 4 | fun isSucces(): Boolean { 5 | return errorCode == 0 6 | } 7 | } -------------------------------------------------------------------------------- /app/src/main/res/anim/popup_hide.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/AndroidNotif.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class AndroidNotif { 4 | var title:String? = null 5 | var category:String? = "CATEGORY_REMINDER" 6 | var priority:Int = 1 7 | val display_foreground:String = "1" 8 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_switch_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 27 09:13:07 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/BodyMsg.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | import org.json.JSONObject 4 | 5 | class BodyMsg { 6 | var msg_content:String = "" 7 | var title = "cmd" 8 | var content_type:String? = null 9 | var extras:JSONObject? = null 10 | } -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/actions/Action.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.actions 2 | 3 | import android.app.Activity 4 | 5 | 6 | abstract class Action { 7 | abstract val name: String 8 | abstract suspend fun run(act: Activity) 9 | 10 | override fun toString() = name 11 | 12 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/PushMessage.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | class PushMessage { 4 | var platform = "android" 5 | var audience: PushAudience? = null 6 | var notification: PushNotification? = null 7 | var message: BodyMsg? = null 8 | var options: PushOption? = null 9 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/bottom_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/list_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/select_switch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/swich_background_on.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/net/api/UpdateApi.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.net.api 2 | 3 | import com.pengxh.autodingding.base.ApiResponse 4 | import com.pengxh.autodingding.bean.Version 5 | import retrofit2.http.GET 6 | 7 | interface UpdateApi { 8 | @GET("api/version.json") 9 | suspend fun getVersion(): ApiResponse 10 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/ui/fragment/PermissionVM.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.ui.fragment 2 | 3 | import androidx.databinding.ObservableBoolean 4 | import com.pengxh.autodingding.base.BaseViewModel 5 | 6 | class PermissionVM : BaseViewModel() { 7 | val accessibilityEnable = ObservableBoolean() 8 | val bgStartEnable = ObservableBoolean() 9 | 10 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/popup_list_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/net/api/PushApi.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.net.api 2 | 3 | import com.pengxh.autodingding.bean.PushMessage 4 | import com.pengxh.autodingding.bean.PushResp 5 | import retrofit2.http.Body 6 | import retrofit2.http.POST 7 | 8 | interface PushApi { 9 | @POST("v3/push") 10 | suspend fun pushMsg(@Body pushMessage: PushMessage): PushResp 11 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/switch_circle_off.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/swich_background_off.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/svg_back.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/switch_circle_on.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/utils/EmailAuthenticator.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.utils 2 | 3 | import javax.mail.Authenticator 4 | import javax.mail.PasswordAuthentication 5 | 6 | class EmailAuthenticator(private val userName: String, private val password: String) : 7 | Authenticator() { 8 | override fun getPasswordAuthentication(): PasswordAuthentication { 9 | return PasswordAuthentication(userName, password) 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/utils/Param.java: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.utils; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * des 参数解析注解 10 | */ 11 | @Target(ElementType.FIELD) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface Param { 14 | String value() default ""; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/net/api/WorkDayApi.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.net.api 2 | 3 | import com.pengxh.autodingding.bean.WorkdayResp 4 | import retrofit2.http.GET 5 | import retrofit2.http.Headers 6 | 7 | interface WorkDayApi { 8 | @Headers("User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36") 9 | @GET("/api/holiday/workday/next/") 10 | suspend fun getNextWorkday(): WorkdayResp 11 | } -------------------------------------------------------------------------------- /app/src/main/res/anim/popup_show.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | maven { url 'https://jitpack.io' } 7 | maven { url "https://maven.aliyun.com/repository/public" } 8 | maven { url 'https://maven.aliyun.com/repository/google' } 9 | maven { url 'https://developer.huawei.com/repo/' 10 | allowInsecureProtocol = true} 11 | } 12 | } 13 | include ':app' 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/adapter/FragAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.adapter 2 | 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentActivity 5 | import androidx.viewpager2.adapter.FragmentStateAdapter 6 | 7 | class FragAdapter(fragmentActivity: FragmentActivity, 8 | private val pageList:List) : FragmentStateAdapter(fragmentActivity) { 9 | override fun getItemCount(): Int { 10 | return pageList.size 11 | } 12 | 13 | override fun createFragment(position: Int): Fragment = pageList[position] 14 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/ui/fragment/RemoteSignFragment.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.ui.fragment 2 | 3 | import com.pengxh.autodingding.AndroidxBaseFragment 4 | import com.pengxh.autodingding.databinding.FragmentRemoteSignBinding 5 | 6 | class RemoteSignFragment: AndroidxBaseFragment() { 7 | override fun setupTopBarLayout() { 8 | 9 | } 10 | 11 | override fun initData() { 12 | // check if is master or slave first, then lis 13 | } 14 | 15 | override fun initEvent() { 16 | TODO("Not yet implemented") 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/easy_popup.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/menu/bottom_nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_stop.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/xml-v24/gesture_accessibility_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/service/GestureService.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.service 2 | 3 | import android.accessibilityservice.AccessibilityService 4 | import android.view.accessibility.AccessibilityEvent 5 | import cn.vove7.andro_accessibility_api.AccessibilityApi 6 | 7 | class GestureService: AccessibilityService() { 8 | 9 | override fun onCreate() { 10 | super.onCreate() 11 | //must call 12 | AccessibilityApi.gestureService = this 13 | } 14 | override fun onDestroy() { 15 | super.onDestroy() 16 | //must call 17 | AccessibilityApi.gestureService = null 18 | } 19 | 20 | override fun onAccessibilityEvent(event: AccessibilityEvent?) { 21 | } 22 | 23 | override fun onInterrupt() { 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/utils/Constant.java: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.utils; 2 | 3 | import android.Manifest; 4 | 5 | import com.pengxh.autodingding.R; 6 | 7 | 8 | public class Constant { 9 | public static final int PERMISSIONS_CODE = 999; 10 | public static final String[] USER_PERMISSIONS = {Manifest.permission.WRITE_EXTERNAL_STORAGE, 11 | Manifest.permission.READ_EXTERNAL_STORAGE}; 12 | 13 | //钉钉包名:com.alibaba.android.rimet 14 | //打卡页面类名:com.alibaba.lightapp.runtime.activity.CommonWebViewActivity 15 | public static final String DINGDING = "com.alibaba.android.rimet"; 16 | 17 | public static final int[] images = {R.mipmap.delete, R.mipmap.output}; 18 | 19 | public static final long ONE_WEEK = 5 * 24 * 60 * 60 * 1000L; 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/xml/base_accessibility_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/ui/fragment/MailConfVM.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.ui.fragment 2 | 3 | 4 | import com.pengxh.autodingding.base.BaseViewModel 5 | import com.pengxh.autodingding.utils.MailSender 6 | import com.pengxh.autodingding.utils.SendMailUtil 7 | import kotlinx.coroutines.Dispatchers 8 | import kotlinx.coroutines.withContext 9 | 10 | class MailConfVM : BaseViewModel() { 11 | 12 | fun sendMail(fromEmail: String, fromAuth: String, toEmail: String) = launch { 13 | withContext(Dispatchers.IO) { 14 | MailSender().sendTextMail( 15 | SendMailUtil.createMail( 16 | toEmail, 17 | "测试邮件", 18 | fromEmail, 19 | fromAuth 20 | ) 21 | ) 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #FFFFFF 7 | #CCCCCC 8 | #0D0D0D 9 | #171717 10 | #333333 11 | #313131 12 | #0094FF 13 | #4DDC64 14 | #0094FF 15 | #ffa500 16 | #00ffff 17 | #32cd32 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_easy_popup.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/service/BaseAccessibilityService.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.service 2 | 3 | import android.util.Log 4 | import cn.vove7.andro_accessibility_api.AccessibilityApi 5 | import cn.vove7.auto.core.AppScope 6 | 7 | class BaseAccessibilityService: AccessibilityApi() { 8 | 9 | override val enableListenPageUpdate: Boolean 10 | get() = true 11 | companion object { 12 | private const val TAG = "BaseAccessibilityService" 13 | } 14 | 15 | override fun onCreate() { 16 | //must set 17 | baseService = this 18 | super.onCreate() 19 | } 20 | 21 | override fun onDestroy() { 22 | //must set 23 | baseService = null 24 | super.onDestroy() 25 | } 26 | 27 | //页面更新回调 28 | override fun onPageUpdate(currentScope: AppScope) { 29 | Log.d(TAG, "onPageUpdate: $currentScope") 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/include_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 22 | 23 | 28 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | android.useAndroidX=true 10 | # Automatically convert third-party libraries to use AndroidX 11 | android.enableJetifier=true 12 | # Kotlin code style for this project: "official" or "obsolete": 13 | kotlin.code.style=official 14 | org.gradle.jvmargs=-Xmx1536m 15 | android.injected.testOnly=false 16 | android.nonTransitiveRClass=false 17 | android.nonFinalResIds=false 18 | # When configured, Gradle will run in incubating parallel mode. 19 | # This option should only be used with decoupled projects. More details, visit 20 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 21 | # org.gradle.parallel=true 22 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 上班帮手 3 | 4 | Tips:此版本是测试版本,可能会有些问题我自测试没有发现的,有问题请发邮件给lttclaw@qq.com。建议用一台闲置的手机 5 | 放在公司来打卡,另一台手机来推送打卡指令。基本用法只需要一台闲置手机,定好时间后会自动打开钉钉,完成极速打卡;进阶用法 6 | 需要一台打卡手机,一台自用手机,把打卡手机的注册ID复制到推送界面推送打卡指令可以远程打开钉钉,完成极速打卡。设置须知:\n 7 | 1、请先确认好通知栏监听已开启,如不开启将无法监听打卡成功的通知。\n 8 | 2、调起钉钉实现自动打卡,需要把打卡手机锁屏密码之类的取消掉\n 9 | 3、部分手机需要授权允许后台打开窗口\n 10 | 3、先在设置里面测试下能否正常打开钉钉,第一次有些手机会让授权\n 11 | 4、将钉钉软件上下班都设置为“极速打卡”。\n 12 | 5、设置好自己的收信邮箱,跳转到“钉钉”打卡成功后会发送一封打卡成功的邮件到你自己设置好的邮箱。\n 13 | 14 | 15 | 空白页 16 | 17 | 请注意,如果您使用应用内自带的发件邮箱配置,即开发者本人的个人qq邮箱来发送打卡通知,您的这些邮件都会被本人在qq邮箱的 18 | 发件箱中看到,而且如果使用我的邮箱发件人数太多,我会考虑更换邮箱授权码,界时用此授权码的发邮件功能将无法正常工作。 19 | 因此,为了您的隐私考虑,请您最好去自己的qq邮箱设置里打开smtp服务获取自己的邮箱授权码在此配置 20 | 21 | 远程启钉基础辅助服务 22 | 远程启钉手势服务 23 | 前台服务 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/actions/SwipeUnlockAction.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.actions 2 | 3 | import android.app.Activity 4 | import cn.vove7.auto.core.api.swipe 5 | import kotlinx.coroutines.delay 6 | 7 | class SwipeUnlockAction(val orientation: ORIENTATION=ORIENTATION.VERTICAL): Action() { 8 | enum class ORIENTATION{ 9 | HORIZONTAL,VERTICAL,CUSTOM 10 | } 11 | constructor(startX:Int, startY:Int, endX:Int, endY:Int) : this(ORIENTATION.CUSTOM) { 12 | this.startX = startX 13 | this.startY = startY 14 | this.endX = endX 15 | this.endY = endY 16 | } 17 | var startX= 0 18 | var startY = 0 19 | var endX = 0 20 | var endY = 0 21 | override val name: String 22 | get() = "解锁" 23 | 24 | override suspend fun run(act: Activity) { 25 | delay(1000) 26 | //从下往上的滑动 27 | when (orientation) { 28 | ORIENTATION.VERTICAL -> swipe(500, 1200, 500, 400, 800) 29 | ORIENTATION.HORIZONTAL -> swipe(100, 900, 600, 900, 800) 30 | else -> swipe(startX, startY, endX, endY, 800) 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/net/AuthInterceptor.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.net 2 | 3 | import com.blankj.utilcode.util.EncodeUtils 4 | import com.blankj.utilcode.util.LogUtils 5 | import okhttp3.Interceptor 6 | import okhttp3.Response 7 | import java.io.IOException 8 | 9 | object AuthInterceptor : Interceptor { 10 | private const val appKey = "f01b8a02b66ea2d632e52e2e" 11 | private const val masterSecret = "5e9ebea1163a6f3e2197f35d" 12 | private const val authString = "$appKey:$masterSecret" 13 | 14 | private var token = "Basic ${EncodeUtils.base64Encode2String(authString.toByteArray())}" 15 | set(value) { 16 | field = value 17 | } 18 | 19 | override fun intercept(chain: Interceptor.Chain): Response { 20 | val origin = chain.request() 21 | val builder = origin.newBuilder().addHeader("Authorization", token) 22 | val response : Response 23 | try { 24 | response = chain.proceed(builder.build()) 25 | 26 | }catch (e:Exception){ 27 | e.printStackTrace() 28 | throw IOException(e) 29 | } 30 | return response 31 | } 32 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/utils/KtUtils.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.utils 2 | 3 | import android.os.Handler 4 | import android.os.Looper 5 | import android.widget.Toast 6 | import com.pengxh.autodingding.BaseApplication 7 | import kotlinx.coroutines.* 8 | import kotlin.coroutines.CoroutineContext 9 | import kotlin.coroutines.EmptyCoroutineContext 10 | 11 | 12 | 13 | @DelicateCoroutinesApi 14 | fun launchWithExpHandler( 15 | context: CoroutineContext = EmptyCoroutineContext, 16 | start: CoroutineStart = CoroutineStart.DEFAULT, 17 | block: suspend CoroutineScope.() -> Unit 18 | ) = GlobalScope.launch(context + ExceptionHandler, start, block) 19 | 20 | 21 | val ExceptionHandler by lazy { 22 | CoroutineExceptionHandler { _, throwable -> 23 | toast(throwable.message ?: "$throwable") 24 | throwable.printStackTrace() 25 | } 26 | } 27 | 28 | val mainHandler by lazy { 29 | Handler(Looper.getMainLooper()) 30 | } 31 | 32 | fun runOnUi(block: () -> Unit) { 33 | if (Looper.getMainLooper() == Looper.myLooper()) { 34 | block() 35 | } else { 36 | mainHandler.post(block) 37 | } 38 | } 39 | 40 | 41 | fun toast(m: String) = 42 | runOnUi { 43 | Toast.makeText(BaseApplication.application, m, Toast.LENGTH_SHORT).show() 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/MailInfo.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean 2 | 3 | import java.io.File 4 | import java.util.Properties 5 | 6 | /** 7 | * @author: lttclaw 8 | * @email: lttclaw@qq.com 9 | * @description: 邮件相关 10 | * @date: 2020/1/16 15:40 11 | */ 12 | class MailInfo { 13 | // 发送邮件的服务器的IP和端口 14 | var mailServerHost: String? = null 15 | var mailServerPort: String? = null 16 | 17 | // 邮件发送者的地址 18 | var fromAddress: String? = null 19 | 20 | // 邮件接收者的地址 21 | var toAddress: String? = null 22 | 23 | // 登陆邮件发送服务器的用户名和密码 24 | var userName: String? = null 25 | var password: String? = null 26 | 27 | // 是否需要身份验证 28 | var isValidate = false 29 | 30 | // 邮件主题 31 | var subject: String? = null 32 | 33 | // 邮件的文本内容 34 | var content: String? = null 35 | 36 | // 邮件的附件 37 | var attachFile: File? = null 38 | 39 | // 邮件附件的文件名 40 | var attachFileName: String? = null 41 | val properties: Properties 42 | /** 43 | * 获得邮件会话属性 44 | */ 45 | get() { 46 | val p = Properties() 47 | p["mail.smtp.host"] = mailServerHost 48 | p["mail.smtp.port"] = mailServerPort 49 | p["mail.smtp.ssl.enable"] = "true" 50 | p["mail.smtp.auth"] = "true" 51 | return p 52 | } 53 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/BatteryLevelReceiver.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.os.BatteryManager 7 | import cn.jpush.android.api.JPushInterface 8 | import com.blankj.utilcode.util.ProcessUtils 9 | import com.blankj.utilcode.util.ScreenUtils 10 | import com.pengxh.autodingding.utils.SendMailUtil 11 | import com.pengxh.autodingding.utils.Utils 12 | 13 | class BatteryLevelReceiver : BroadcastReceiver() { 14 | override fun onReceive(context: Context, intent: Intent) { 15 | val action = intent.action 16 | if (Intent.ACTION_BATTERY_LOW == action){ 17 | val emailAddress = Utils.readEmailAddress() 18 | val manager = context.getSystemService(AndroidxBaseActivity.BATTERY_SERVICE) as BatteryManager 19 | val curBatteryCurrent = manager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_NOW) 20 | val curBattery = manager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)///当前电量百分比 21 | val regId = JPushInterface.getRegistrationID(context) 22 | val screenLock = ScreenUtils.isScreenLock() 23 | val message = "警告!低电量!注册ID: $regId 是否锁屏:$screenLock " + 24 | "当前电流:$curBatteryCurrent mA 当前电量百分比:$curBattery %" 25 | SendMailUtil.send(emailAddress, message) 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/utils/TimeOrDateUtil.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.utils 2 | 3 | import com.blankj.utilcode.util.ToastUtils 4 | import java.text.SimpleDateFormat 5 | import java.util.* 6 | 7 | object TimeOrDateUtil { 8 | private var dateFormat: SimpleDateFormat? = null 9 | 10 | /** 11 | * 时间戳转日期 12 | */ 13 | fun rTimestampToDate(millSeconds: Long): String { 14 | dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.CHINA) 15 | return dateFormat!!.format(Date(millSeconds)) 16 | } 17 | 18 | /** 19 | * 时间戳转时间 20 | */ 21 | fun timestampToTime(millSeconds: Long): String { 22 | dateFormat = SimpleDateFormat("HH:mm:ss", Locale.CHINA) 23 | return dateFormat!!.format(Date(millSeconds)) 24 | } 25 | 26 | /** 27 | * 时间戳转详细日期时间 28 | */ 29 | fun timestampToDate(millSeconds: Long): String { 30 | dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA) 31 | return dateFormat!!.format(Date(millSeconds)) 32 | } 33 | 34 | /** 35 | * 计算时间差 36 | * 37 | * @param fixedTime 结束时间 38 | */ 39 | fun deltaTime(fixedTime: Long): Long { 40 | val currentTime = System.currentTimeMillis() / 1000 41 | if (fixedTime > currentTime) { 42 | return fixedTime - currentTime 43 | } else { 44 | ToastUtils.showLong("时间设置异常") 45 | } 46 | return 0L 47 | } 48 | } -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/bean/HistoryRecordBean.java: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.bean; 2 | 3 | import org.greenrobot.greendao.annotation.Entity; 4 | import org.greenrobot.greendao.annotation.Generated; 5 | import org.greenrobot.greendao.annotation.Id; 6 | 7 | @Entity 8 | public class HistoryRecordBean { 9 | @Id(autoincrement = true) 10 | private Long id;//主键ID 11 | 12 | private String uuid; 13 | private String date; 14 | private String message; 15 | 16 | @Generated(hash = 1681950394) 17 | public HistoryRecordBean(Long id, String uuid, String date, String message) { 18 | this.id = id; 19 | this.uuid = uuid; 20 | this.date = date; 21 | this.message = message; 22 | } 23 | 24 | @Generated(hash = 1791356846) 25 | public HistoryRecordBean() { 26 | } 27 | 28 | public Long getId() { 29 | return this.id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getUuid() { 37 | return this.uuid; 38 | } 39 | 40 | public void setUuid(String uuid) { 41 | this.uuid = uuid; 42 | } 43 | 44 | public String getDate() { 45 | return this.date; 46 | } 47 | 48 | public void setDate(String date) { 49 | this.date = date; 50 | } 51 | 52 | public String getMessage() { 53 | return this.message; 54 | } 55 | 56 | public void setMessage(String message) { 57 | this.message = message; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 | 27 | 28 | 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoDing 2 | + 目前release中的包名于24年圣诞节下午又又被加入黑名单了,为了不被再一次被加入黑名单,之后将不再提供APK包的更新,但我会详尽列出各位自行打包需要的步骤,请各位自行下载源码修改一个包名并做如下定制打包。 3 | 1. 起一个包名,结构类似com.furry.rimet这种,修改app级build.gradle中applicationId,daoPackage的前缀为自己的(查找替换即可) 4 | 2. 修改app/src/main/AndroidManifest.xml中包名,查找替换即可 5 | 3. 重新进行gradle sync,完成后执行Build————Rebuild Project 6 | 4. 然后去极光推送开发者后台建一个应用,用刚才自己重构的applicationId申请一个推送应用,把appKey,masterSecret保存 7 | 5. 在app级build.gradle配置中的manifestPlaceholders中的JPUSH_APPKEY值换成上一步的appKey 8 | 6. 在代码搜索类AuthInterceptor,替换里面的常量appKey和masterSecret 9 | 7. (可选)打包前也可修改app/src/main/res/values/strings.xml里面的app_name值,即应用名,防止应用名也被屏蔽 10 | 8. 重新打包,然后分别装在两个手机上,配置推送regID,测试是否可发送响应指令 11 | ------------- 12 | 钉钉打卡,包括定时打卡和远程推送打卡,定时打卡功能是根据AutoDingDing项目修改而来,不是此项目重点,此项目主要功能在于实现远程 13 | 打开钉钉,从而完成极速打卡,其主要是用极光推送SDK实现网络指令下发。 14 | 建议用一台闲置的手机放在公司来打卡,另一台手机来推送打卡指令。 15 | 需要一台打卡手机,一台自用手机,都安装上此APP后,把打卡手机的注册ID复制到推送界面推送打卡指令可以远程打开钉钉,完成极速打卡。使用须知: 16 | 1. 请先确认好要打卡的手机通知栏监听已开启,如不开启将无法监听打卡成功的通知。 17 | 2. 要打卡的手机保持连网,wifi或者数据都可,否则怎么收网络指令啊。 18 | 3. 要打卡的手机最好保持打开界面放置灭屏,因为如果应用被切到后台,过上一晚不活跃有可能会被安卓系统杀掉从而不能接收打卡指令。 19 | 4. 调起钉钉实现自动打卡,需要把打卡手机锁屏密码之类的取消掉,屏幕不用常亮,但锁屏手势、指纹、密码这些验证不能有,否则在熄屏状态下应用接收到消息也无法唤醒屏幕。 20 | 5. 部分手机需要授权允许后台打开窗口,先在设置里面测试下能否正常打开钉钉,第一次有些手机会让授权。 21 | 6. 将钉钉软件上下班都设置为“极速打卡”。 22 | 7. 设置好自己的发信和收信邮箱,跳转到“钉钉”打卡成功后会发送一封打卡成功的邮件到你自己设置好的邮箱。 23 | 8. 不要忘了,此应用只能打开钉钉,如果你钉钉没登录、被其他设备踢下线、打开时机不在考勤时间区间里,极速打卡是不会生效的。 24 | 25 | + 请在邮件配置中尽量使用自己的qq邮箱,申请邮箱授权码的方法请上网查询,目前邮箱只支持qq邮箱,因为邮箱服务器和端口在代码里写死了,想用别的邮箱的可以找到这部分代码修改这部分设置 26 | ------------- 27 | 可选建议 28 | 1. 在应用权限设置里设置成允许锁屏显示,能大幅降低打卡唤醒应用时被各种不能取消的锁屏带来的干扰 29 | 2. 在开发者模式中设置充电时不锁定屏幕,然后一直插电保持亮屏,则肯定能保证稳定运行和接收消息,可以把屏幕调到最暗来减少屏幕损耗 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/pengxh/autodingding/utils/AccessibilityUtil.kt: -------------------------------------------------------------------------------- 1 | package com.pengxh.autodingding.utils 2 | 3 | import android.content.Context 4 | import android.provider.Settings 5 | import android.text.TextUtils.SimpleStringSplitter 6 | import android.util.Log 7 | import android.view.accessibility.AccessibilityManager 8 | 9 | 10 | object AccessibilityUtil { 11 | fun isServiceOn(context: Context, serviceName: String): Boolean{ 12 | val am = context.getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager 13 | if (am.isEnabled){ 14 | val fullAccName = "${context.packageName}/${serviceName}" 15 | return isAccessibilitySettingsOn(context, fullAccName) 16 | } 17 | return false 18 | } 19 | 20 | private fun isAccessibilitySettingsOn(context: Context, service: String): Boolean { 21 | Log.d("param service name", service) 22 | val mStringColonSplitter = SimpleStringSplitter(':') 23 | val settingValue: String = Settings.Secure.getString( 24 | context.applicationContext.contentResolver, 25 | Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES 26 | ) 27 | mStringColonSplitter.setString(settingValue) 28 | while (mStringColonSplitter.hasNext()) { 29 | val accessibilityService = mStringColonSplitter.next() 30 | Log.d("accessibility services", accessibilityService) 31 | if (accessibilityService.equals(service, ignoreCase = true)) { 32 | return true 33 | } 34 | } 35 | return false 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/java/xcom/warof/chosen/greendao/DaoSession.java: -------------------------------------------------------------------------------- 1 | package xcom.warof.chosen.greendao; 2 | 3 | import java.util.Map; 4 | 5 | import org.greenrobot.greendao.AbstractDao; 6 | import org.greenrobot.greendao.AbstractDaoSession; 7 | import org.greenrobot.greendao.database.Database; 8 | import org.greenrobot.greendao.identityscope.IdentityScopeType; 9 | import org.greenrobot.greendao.internal.DaoConfig; 10 | 11 | import com.pengxh.autodingding.bean.HistoryRecordBean; 12 | 13 | import xcom.warof.chosen.greendao.HistoryRecordBeanDao; 14 | 15 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. 16 | 17 | /** 18 | * {@inheritDoc} 19 | * 20 | * @see org.greenrobot.greendao.AbstractDaoSession 21 | */ 22 | public class DaoSession extends AbstractDaoSession { 23 | 24 | private final DaoConfig historyRecordBeanDaoConfig; 25 | 26 | private final HistoryRecordBeanDao historyRecordBeanDao; 27 | 28 | public DaoSession(Database db, IdentityScopeType type, Map>, DaoConfig> 29 | daoConfigMap) { 30 | super(db); 31 | 32 | historyRecordBeanDaoConfig = daoConfigMap.get(HistoryRecordBeanDao.class).clone(); 33 | historyRecordBeanDaoConfig.initIdentityScope(type); 34 | 35 | historyRecordBeanDao = new HistoryRecordBeanDao(historyRecordBeanDaoConfig, this); 36 | 37 | registerDao(HistoryRecordBean.class, historyRecordBeanDao); 38 | } 39 | 40 | public void clear() { 41 | historyRecordBeanDaoConfig.clearIdentityScope(); 42 | } 43 | 44 | public HistoryRecordBeanDao getHistoryRecordBeanDao() { 45 | return historyRecordBeanDao; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_remote_sign.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 22 |