Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gem_eap_uniapp_build
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
朱传永
gem_eap_uniapp_build
Commits
b9f34d0d
Commit
b9f34d0d
authored
Nov 27, 2020
by
zhuchuanyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 保活
parent
21754b08
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
7 deletions
+48
-7
build.gradle
app/build.gradle
+7
-6
Keep-Alive-release.aar
app/libs/Keep-Alive-release.aar
+0
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
MyApplication.java
app/src/main/java/com/vt/gemeap/MyApplication.java
+40
-0
No files found.
app/build.gradle
View file @
b9f34d0d
...
@@ -6,12 +6,12 @@ android {
...
@@ -6,12 +6,12 @@ android {
defaultConfig
{
defaultConfig
{
//
manifestPlaceholders = [
manifestPlaceholders
=
[
//
"plus.unipush.appid" : "pPyZWvH3Fa6PXba19ID0091",
"plus.unipush.appid"
:
"pPyZWvH3Fa6PXba19ID0091"
,
//
"plus.unipush.appkey" : "b7dOGlNPHR7pqwUxcXPVi44",
"plus.unipush.appkey"
:
"b7dOGlNPHR7pqwUxcXPVi44"
,
//
"plus.unipush.appsecret": "IxVYAT9qws8dlNElacmSg12",
"plus.unipush.appsecret"
:
"IxVYAT9qws8dlNElacmSg12"
,
//
"apk.applicationId":"com.vt.gemeap"
"apk.applicationId"
:
"com.vt.gemeap"
//
]
]
multiDexEnabled
true
multiDexEnabled
true
applicationId
"com.vt.gemeap"
applicationId
"com.vt.gemeap"
minSdkVersion
21
minSdkVersion
21
...
@@ -40,6 +40,7 @@ android {
...
@@ -40,6 +40,7 @@ android {
dependencies
{
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.aar'
])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.aar'
,
'*.jar'
],
exclude:
[])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.aar'
,
'*.jar'
],
exclude:
[])
implementation
"com.android.support:support-v4:28.0.0"
implementation
"com.android.support:support-v4:28.0.0"
...
...
app/libs/Keep-Alive-release.aar
0 → 100644
View file @
b9f34d0d
File added
app/src/main/AndroidManifest.xml
View file @
b9f34d0d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
<activity
<activity
android:name=
"
io.dcloud.PandoraEntry
"
android:name=
"
.MyApplication
"
android:configChanges=
"orientation|keyboardHidden|keyboard|navigation"
android:configChanges=
"orientation|keyboardHidden|keyboard|navigation"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
...
...
app/src/main/java/com/vt/gemeap/MyApplication.java
0 → 100644
View file @
b9f34d0d
package
com
.
vt
.
gemeap
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.util.Log
;
import
net.vtstar.KeepAlive.KeepLive
;
import
net.vtstar.KeepAlive.config.ForegroundNotification
;
import
net.vtstar.KeepAlive.config.ForegroundNotificationClickListener
;
import
net.vtstar.KeepAlive.config.KeepLiveService
;
import
io.dcloud.PandoraEntry
;
public
class
MyApplication
extends
PandoraEntry
{
@Override
protected
void
onCreate
(
Bundle
bundle
)
{
super
.
onCreate
(
bundle
);
KeepLive
.
startWork
(
this
.
getApplication
(),
KeepLive
.
RunMode
.
ROGUE
,
new
ForegroundNotification
(
"服务运行中..."
,
"等待任务"
,
R
.
drawable
.
icon1
,
new
ForegroundNotificationClickListener
()
{
@Override
public
void
foregroundNotificationClick
(
Context
context
,
Intent
intent
)
{
Log
.
e
(
"1111"
,
"foregroundNotificationClick: 点击事件"
);
}
}),
new
KeepLiveService
()
{
@Override
public
void
onWorking
()
{
Log
.
e
(
"1111"
,
"KeepLiveService: onWorking"
);
}
@Override
public
void
onStop
()
{
Log
.
e
(
"1111"
,
"KeepLiveService: onStop"
);
}
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment