Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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
android
android_goodmoney
Commits
4a19cc29
Commit
4a19cc29
authored
Jan 05, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加安装apk监听
parent
d7913e62
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
1 deletion
+59
-1
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+2
-0
MyService.java
.../src/main/java/com/mints/goodmoney/service/MyService.java
+51
-0
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+5
-0
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+1
-1
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
4a19cc29
...
...
@@ -363,6 +363,8 @@
android:resource=
"@xml/wn_file_paths"
/>
</provider>
<service
android:name=
".service.MyService"
></service>
</application>
</manifest>
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/service/MyService.java
0 → 100644
View file @
4a19cc29
package
com
.
mints
.
goodmoney
.
service
;
import
android.app.Service
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.os.Build
;
import
android.os.IBinder
;
import
android.util.Log
;
import
android.widget.Toast
;
import
com.mints.goodmoney.utils.ToastUtil
;
public
class
MyService
extends
Service
{
BroadcastReceiver
broadcastReceiver
=
new
BroadcastReceiver
()
{
public
void
onReceive
(
Context
param1Context
,
Intent
param1Intent
)
{
if
(
param1Intent
==
null
)
return
;
ToastUtil
.
show
(
param1Context
.
getApplicationContext
(),
param1Intent
.
getData
().
toString
());
}
};
private
void
initReceiver
()
{
IntentFilter
intentFilter
=
new
IntentFilter
();
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_ADDED"
);
// intentFilter.addAction("android.intent.action.PACKAGE_REPLACED");
// intentFilter.addAction("android.intent.action.PACKAGE_REMOVED");
intentFilter
.
addDataScheme
(
"package"
);
registerReceiver
(
this
.
broadcastReceiver
,
intentFilter
);
}
public
IBinder
onBind
(
Intent
paramIntent
)
{
return
null
;
}
public
void
onCreate
()
{
super
.
onCreate
();
initReceiver
();
}
public
void
onDestroy
()
{
super
.
onDestroy
();
unregisterReceiver
(
this
.
broadcastReceiver
);
}
public
int
onStartCommand
(
Intent
paramIntent
,
int
paramInt1
,
int
paramInt2
)
{
Log
.
e
(
"aaa"
,
"22222222222"
);
return
super
.
onStartCommand
(
paramIntent
,
paramInt1
,
paramInt2
);
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
4a19cc29
package
com.mints.goodmoney.ui.activitys
import
android.content.Context
import
android.content.Intent
import
android.media.AudioManager
import
android.os.Bundle
import
android.view.KeyEvent
...
...
@@ -9,6 +10,7 @@ import androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
import
com.ireader.ireadersdk.IreaderApi
import
com.mints.goodmoney.InitAppService
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.vedio.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
...
...
@@ -16,6 +18,7 @@ import com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.manager.ZhangyueManager
import
com.mints.goodmoney.mvp.views.MainView
import
com.mints.goodmoney.service.MyService
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.fragment.*
import
kotlinx.android.synthetic.main.activity_main.*
...
...
@@ -62,6 +65,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_rl_channel
.
setOnClickListener
(
this
)
tab_rl_friends
.
setOnClickListener
(
this
)
tab_rl_my
.
setOnClickListener
(
this
)
startService
(
Intent
(
context
,
MyService
::
class
.
java
))
}
override
fun
isApplyKitKatTranslucency
()
=
false
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
4a19cc29
...
...
@@ -198,7 +198,7 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
if
(
liebaoGameFragment
==
null
)
{
liebaoGameFragment
=
LiebaoGameFragment
()
}
addOrShowFragment
(
childFragmentManager
,
kuYinyu
eFragment
!!
,
FRAGMENT_TAG_GAME
)
addOrShowFragment
(
childFragmentManager
,
liebaoGam
eFragment
!!
,
FRAGMENT_TAG_GAME
)
}
// 3 -> {
// if (kuYinyueFragment == null) {
...
...
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