{"id":13645245,"url":"https://github.com/wenwenwen888/BackgroundUpdate","last_synced_at":"2025-04-21T13:32:25.487Z","repository":{"id":162605075,"uuid":"89340298","full_name":"wenwenwen888/BackgroundUpdate","owner":"wenwenwen888","description":"后台更新APP(两句代码实现)","archived":true,"fork":false,"pushed_at":"2017-05-12T12:36:18.000Z","size":264,"stargazers_count":78,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T01:25:15.011Z","etag":null,"topics":["apk","backgroundupdate","dialog","notifications","retrofit","rxjava","update"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wenwenwen888.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-25T09:06:37.000Z","updated_at":"2023-12-22T01:31:58.000Z","dependencies_parsed_at":"2024-01-14T11:19:40.223Z","dependency_job_id":"c1bcfdcc-b68c-4ae0-9e2b-b420ea88bfe7","html_url":"https://github.com/wenwenwen888/BackgroundUpdate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenwenwen888%2FBackgroundUpdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenwenwen888%2FBackgroundUpdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenwenwen888%2FBackgroundUpdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenwenwen888%2FBackgroundUpdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wenwenwen888","download_url":"https://codeload.github.com/wenwenwen888/BackgroundUpdate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223867932,"owners_count":17216981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apk","backgroundupdate","dialog","notifications","retrofit","rxjava","update"],"created_at":"2024-08-02T01:02:32.073Z","updated_at":"2024-11-09T18:30:37.421Z","avatar_url":"https://github.com/wenwenwen888.png","language":"Java","funding_links":[],"categories":["升级更新"],"sub_categories":[],"readme":"# BackgroundUpdate\n后台更新APP(两句代码实现)\n\n先看预览图 : \n\n(1)调用Dialog更新对话框效果\n\u003c/br\u003e\u003c/br\u003e\n\u003cimg src=\"https://github.com/wenwenwen888/BackgroundUpdate/blob/master/preview/1.png\" width=\"30%\" height=\"30%\"\u003e\n\u003c/br\u003e\u003c/br\u003e\n(2)调用Notification更新效果\n\u003c/br\u003e\u003c/br\u003e\n\u003cimg src=\"https://github.com/wenwenwen888/BackgroundUpdate/blob/master/preview/2.png\" width=\"30%\" height=\"30%\"\u003e\n\n\n前言\n-------\n1,使用了retorfit2 + rxjava做的下载库\n\n2,apk下载完毕会自动跳到安装界面,下载过程可取消\n\n3,需要修改更多内容可以下载library自行修改\n\n4,不妥之处或BUG请Issues指出,谢谢\n\n\nUsage\n--------\n\nWith Gradle:\n```groovy\n  compile 'com.wenwenwen888:bgupdate:1.0.7'\n```\n\n\nHow to use\n--------\n第一句 , 调用下载:\n* (a.调用Dialog对话框下载\n```java\n  BgUpdate.updateForDialog(context, url, filePath);\n```\n* (b.调用Notification下载\n```java\n  BgUpdate.updateForNotification(context , url, filePath);\n```\n* (c.url即为下载apk的链接,下面为filepath示例\n```java\n  String filePath = Environment.getExternalStorageDirectory() + \"/xxx.apk\";\n```\n第二句 , 在onDestroy()的时候关闭服务:\n```java\n BgUpdate.closeService(context);\n```\n\nEnd (。・`ω´・)\n--------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenwenwen888%2FBackgroundUpdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwenwenwen888%2FBackgroundUpdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenwenwen888%2FBackgroundUpdate/lists"}