Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

android - List of all activities in App

Is there any way, how to get list of all activities in running app?

I have tried:

ActivityInfo[] list = getPackageManager().getPackageArchiveInfo(
                    "/sd-ext/app/cz.eman.smartstore.android-1.apk",
                    PackageManager.GET_ACTIVITIES).activities;

but it doesn′t return a list with all of them.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If the app is running, then use getPackageInfo(), instead of getPackageArchiveInfo().


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...