DaemonProject | Android 系统将尽量长时间地保持应用进程,但为了新建进程或运行更重要的进程,最终需要清除旧进程来回收内存。

 by   FussenYu Java Version: Current License: No License

kandi X-RAY | DaemonProject Summary

kandi X-RAY | DaemonProject Summary

DaemonProject is a Java library. DaemonProject has no vulnerabilities, it has build file available and it has low support. However DaemonProject has 1 bugs. You can download it from GitHub.

Android 系统将尽量长时间地保持应用进程,但为了新建进程或运行更重要的进程,最终需要清除旧进程来回收内存。 为了确定保留或终止哪些进程,系统会根据进程中正在运行的组件以及这些组件的状态,将每个进程放入“重要性层次结构”中。 必要时,系统会首先消除重要性最低的进程,然后是清除重要性稍低一级的进程,依此类推,以回收系统资源。. 方案设计思想:监控手机锁屏解锁事件,在屏幕锁屏时启动1个像素的 Activity,在用户解锁时将 Activity 销毁掉。注意该 Activity 需设计成用户无感知。. 方案设计思想:Android 中 Service 的优先级为4,通过 setForeground 接口可以将后台 Service 设置为前台 Service,使进程的优先级由4提升为2,从而使进程的优先级仅仅低于用户当前正在交互的进程,与可见进程优先级一致,使进程被杀死的概率大大降低。. 方案实现挑战:从 Android2.3 开始调用 setForeground 将后台 Service 设置为前台 Service 时,必须在系统的通知栏发送一条通知,也就是前台 Service 与一条可见的通知时绑定在一起的。. 通过实现一个内部 Service,在 WatchDogService 和其内部 Service 中同时发送具有相同 ID 的 Notification,然后将内部 Service 结束掉。随着内部 Service 的结束,Notification 将会消失,但系统优先级依然保持为2。. 通过反编译第三方 Top 应用,如:手机QQ、微信、支付宝、UC浏览器等,以及友盟、信鸽、个推等 SDK,找出它们外发的广播,在应用中进行监听,这样当这些应用发出广播时,就会将我们的应用拉活。. 方案设计思想:将 Service 设置为 START-STICKY,利用系统机制在 Service 挂掉后自动拉活. ###利用 JobScheduler, AlarmManager 机制拉活. 系统在 Android5.0 以上版本提供了 JobScheduler 接口,系统会定时调用该进程以使应用进行一些逻辑操作。. 使用 JobScheduler, Android 系统能自动拉起被 Force Stop 的 Package,而 AlarmManager 无法拉起.Android 4.4 及以下版本使用 AlarmManager. 使用定时 Observable : 避免 Android 定制系统 JobScheduler / AlarmManager 唤醒间隔不稳定的情况. 方案适用范围:该方案适用于所有的 Android 版本,包括被 forestop 掉的进程也可以进行拉活。.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              DaemonProject has a low active ecosystem.
              It has 48 star(s) with 18 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. On average issues are closed in 870 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of DaemonProject is current.

            kandi-Quality Quality

              OutlinedDot
              DaemonProject has 1 bugs (1 blocker, 0 critical, 0 major, 0 minor) and 40 code smells.

            kandi-Security Security

              DaemonProject has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              DaemonProject code analysis shows 0 unresolved vulnerabilities.
              There are 1 security hotspots that need review.

            kandi-License License

              DaemonProject does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              DaemonProject releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              DaemonProject saves you 390 person hours of effort in developing the same functionality from scratch.
              It has 928 lines of code, 68 functions and 27 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed DaemonProject and discovered the below as its top functions. This is intended to give you an instant insight into DaemonProject implemented functionality, and help decide if they suit your requirements.
            • Initialize account
            • Add account
            • Register screen receiver
            • Region resume
            • Checks if screen is on screen
            • Runs the background thread
            • Checks if the current process is foreground
            • List 8
            • Cancel the job alarm
            • Handler for receive events
            • Startscreen activity
            • Override method to handle touch events
            • Destroy method
            • This method is called when a start command is started
            • On start command
            • On bind
            • Set the activity model
            • On trim
            • Dispatches the touch event
            • Destroy this instance
            • Initializes the window
            • Region Home button
            • Write work service
            • On receive service
            • Sync sync service
            • This method is used to add an account
            Get all kandi verified functions for this library.

            DaemonProject Key Features

            No Key Features are available at this moment for DaemonProject.

            DaemonProject Examples and Code Snippets

            No Code Snippets are available at this moment for DaemonProject.

            Community Discussions

            No Community Discussions are available at this moment for DaemonProject.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install DaemonProject

            You can download it from GitHub.
            You can use DaemonProject like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the DaemonProject component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/FussenYu/DaemonProject.git

          • CLI

            gh repo clone FussenYu/DaemonProject

          • sshUrl

            git@github.com:FussenYu/DaemonProject.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by FussenYu

            DropDownMenu

            by FussenYuJava

            AppCache

            by FussenYuJava

            SearchView

            by FussenYuJava

            MVP_Project

            by FussenYuJava

            VideoRecorder

            by FussenYuJava