android


Selectively displaying apps in Android


i'm making a launcher app and i would like to know how to selectively display apps on my launcher based on user input. Like other launchers will show all the apps normally, but in my launcher the user can, if they want, choose not to show some apps.
So how would i call PackageManager to show/not show a few select apps?
My current way is-
Query all apps from PackageManager and keep it in a <ResolveInfo> list
Keep the apps not to show in another <ResolveInfo> list
Subtract the lists and pass the new list to populate my launcher
I need help in step 3
You can use this code to compare user selected app to hide with installed app and generate new list to show in your launcher:
List<PackageInfo> packageInfos=getPackageManager().getInstalledApplications();
List<PackageInfo> newList=new ArrayList<>();
for (PackageInfo packs:
packageInfos) {
if(!packs.packageName.equals("User input package name"))
newList.add(packs);
}

Related Links

Android Activity & Async SQLite communication Optimalization
Can not find symbol variable
Update row in a ListView in a fragment in a TabLayout
How to check internet connection before app starts and while it is running?
marker is not stick to given position on map while spinning the map
Webview loadUrl exceeds 2097152 characters
Sound visualization library for Android [closed]
Choosing Which Online Database to use for my Android App to Access
How to use publishNonDefault but deploy only one artifact to maven
Failed to read key hailun_logistics from store “/Users/yangshin/Documents/hailun_logisticskey.jks”
How to build apk from source code of android web browser?
Android:Bottom view should not appear above keyboard When soft keyboard open But Scroll should work. How to achieve?
getting Data from getDefaultSharedPreferences always return empty values
Android ellipsis at a particular position
android download the image from url store in internal memory then display that image in imageview
Android screen rotation detection

Categories

HOME
django
grok
oracle12c
prism
nvd3.js
jmx
interface
themes
alarm
echo
jax-ws
crystal-lang
special-characters
commonjs
reactive-programming
windows-ce
supervisor
onedrive-api
renjin
package-managers
feathersjs
vuejs
jersey-1.0
delphi-xe5
swagger-2.0
oledb
selinux
backpack-for-laravel
pchart
aggregation
jquery-callback
dynamically-generated
xunit
windows-server-2003
xcode-ui-testing
surveymonkey
wcag
sqsh
boost-asio
panoramas
mobx
database-comparison
kodi
pop3
installscript
roblox
raft
sim-toolkit
lint
release
apns-php
branching-and-merging
microsoft-metro
lpsolve
fwrite
stdmap
sandcastle
restore
grails-plugin
centrifuge
beamer
jodd
rspec2
phpwebsocket
findfirst
jnlua
spring-retry
character-replacement
custom-errors
boomerang
decimalformat
java-money
rubaxa-sortable
binomial-theorem
ocra
liquid-layout
pyobjc
diff3
cakephp-2.7
ejb-2.x
delayed-execution
at-job
beatsmusic
android-cookiemanager
viewer
human-computer-interface
winginx
dot42
buffering
rfc5322
gwt-openlayers
bin
sphinxql
jammer
ie8-compatibility-mode
code-duplication
ebay-lms
script#
inappsettingskit
superscrollorama
bjyauthorize
booksleeve
mkv
xcode3.2
pinch
matlab-load
unattended-processing
globals
object-database
binomial-heap
entitykey

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App