Cordova-based live alarm clock app for Bilibili users (Android version)

foreword

This project is developed based on Cordova, and the packaged apk supports Android9+. The main function is to monitor the live broadcast of users at station b, and start the broadcast to start the alarm clock. ps: There are still
many problems in the current version. repair.

Source code download

Code Cloud GitHub

apk download

Code Cloud GitHub

Introduction

Key note: If the phone has a power saving policy, please turn off the power saving policy of the application to avoid the application being hung
insert image description here

1. When you install and run the program for the first time, you will be prompted to obtain permission. If you do not give the corresponding permission, some functions cannot be used normally. (The network is used for API requests)
2. After running, you can make corresponding settings (for the first time, you can directly click "Configuration Initialization" to automatically complete the default configuration).
Function page:
1) The audio file (normal format such as mp3) of the alarm clock reminder, after the setting is successful, the audio control below will load the audio information (if it is not loaded, it may be due to the file format or path, please re-select the file; in addition, remember to adjust 2 )
UID fills in the UID of the user monitoring station B, and the UID and UID are directly separated by "space";
3) The round-robin interval is the time difference between calling the API cyclically. The longer the setting time is, the slower the broadcasting response will be and the data consumption will be reduced. The less (although it will not take a few traffic, but it is not recommended to go too fast, and the IP may be banned);
setting page:
1) You can modify the background image;
ps: Since the audio and background images are temporarily generated encrypted urls, After the software is restarted, the file cannot be located normally, so it needs to be reset after restarting.
3. After the relevant configuration is completed, return to the "Function" page, click "Save Configuration" and the configuration will be written to the local file "Documents/APIClock/baseInfo.json".
4. After all the configurations are completed, click "Run from Startup". The program will run the program and output the necessary logs.
5. When a user with settings starts broadcasting, the program will "play music" and not monitor this user. If you want to continue monitoring this user, you can click "automatically run" again.
If you need to close the program, you can click "Stop Running" or close the program directly.
6. Description of the log content: The log has four colors: "red, green, gray, and orange". If there is a red log, it means that there are some problems in the operation. The common problems are basically permission granting problems and network problems.
When there are too many logs, you can click "Clear Logs" or "Clear Logs Every Minute" to clear the logs.

renderings

Please add a picture description

Tested models

✅ means compatible and available
⬜️ means not fully compatible, core functions are available

Phone model compatibility
Mi 10
i live x23
Huawei Honor P20 ⬜️

cordova plugin installation

cordova plugin add cordova-plugin-file
cordova plugin add cordova-plugin-media
cordova plugin add [email protected]
cordova plugin add cordova-plugin-background-mode
cordova plugin add cordova-plugin-android-permissions

Test Record

pure front

Regardless of the bright screen situation, otherwise it would be meaningless.

hang background

The program runs under Xiaomi's "smart limit" power saving strategy

1. The off-screen can run normally after 15 minutes (the cycle interval is 10s) ✅
2. After hanging the background, open "1" or "3" new software to use, and the program will continue to run for "5 minutes and 40 seconds" or "1 minute and 30 seconds" "After that, there was a get request error problem ❌ (there was wifi and traffic switching during the period), re-enter the program, the get request returned to normal, and the broadcast start reminder was successfully completed ✅.

After turning off the power saving policy! ! !

1. After hanging in the background, open "4" new software to use, and after 1:45, the start of the broadcast will be triggered ✅ smoothly.
2. Hang up in the background, disconnect the network and lock the screen to sleep. After 6:50 minutes, the start of the broadcast will be triggered smoothly ✅.
insert image description here

update log

2022-06-06 Update local configuration file function
2022-06-07 Update UI; update icon; add description; add ringing user filtering function; fix audio, background can not be replaced bug, release V2.2.1 version
2022-06 -08 Added log time printing for easy debugging
2022-06-09 release V2.2.2 version
2020-06-15 release V2.3.0 version; remove local configuration read and write and replace it with localStorage

Special statement:

  • The scripts published in this warehouse and any unlocking and decryption analysis scripts involved in them are only for testing and learning research, and commercial use is prohibited. Their legality, accuracy, completeness and validity cannot be guaranteed. Please judge by yourself according to the situation .

  • All resource files in this project are prohibited from being reproduced or published in any form by any official account or self-media.

  • I am not responsible for any scripting issues, including but not limited to any loss or damage resulting from any scripting errors.

  • Any user who indirectly uses the script, including but not limited to establishing a VPS or disseminating it in violation of national laws or relevant regulations, shall not be responsible for any privacy leakage or other consequences arising therefrom.

  • Please do not use any content of this warehouse for commercial or illegal purposes, or you will be responsible for the consequences.

  • If any unit or individual believes that the project's scripts may be suspected of violating their rights, they should notify in time and provide proof of identity and ownership. We will delete the relevant scripts after receiving the certification documents.

  • Anyone viewing this project in any way, or using any scripts from this project, directly or indirectly, should read this statement carefully. I reserve the right to change or supplement this disclaimer at any time. By using and copying the rules of any related script or Script item, you are deemed to have accepted this disclaimer.

Any scripts that you use or copy from this warehouse and made by yourself are considered as 已接受this statement, please read carefully

Guess you like

Origin blog.csdn.net/Ikaros_521/article/details/125188722