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 how to make EditText editable inside a ListView
What is android.permission.SET_PROCESS_LIMIT used for in an android application?
Manifest Defined Broadcast Receiver for email CRUD
How can I disable Activesync if I detect a rooted phone on Android?
Drawing Low Resolution Images Really Big
Why is my Android intent filter for URL host not working?
couldn't install android development tools on eclipse
The import android.nfc.INfcSecureElement cannot be resolved
Android GridView Speed Up Scrolling
AsyncTask in Mono for Android
XMPP aSmack MultiUserChat server continues to send already received messages
How to I use horizontal scroll view in a XML based Android app?
How do Google/Android/iPhone recognize street addresses in emails and other text?
Browser callbacks and Android Activity stack madness
Tumblr Xauth Android - 400 Bad Request Error
How to write entire Logcat in to sdcard?

Categories

HOME
batch-file
sonarqube
django
go
fabricjs
design-patterns
delphi-7
eslint
dns
apache-jena
camera
composite-primary-key
sitecore
spring-data-redis
opendj
static-site
database-normalization
switch-statement
mapbox
okhttp
pattern-matching
ibeacon-android
distribution
endpoint
intercom
onedrive-api
dynatrace
plink
flash-player
esoteric-languages
job-scheduling
google-content-api
delphi-xe5
kendo-mobile
undertow
string-concatenation
exit
google-api-client
pic32
progress-bar
custom-controls
quickfixj
linkedhashmap
reverse
lubridate
numpy-broadcasting
apic
openproject
demo
jvmti
opensmpp
news
unordered-map
parser-generator
subclipse
tcc
flask-login
opencmis
flask-restful
qtranslate
azure-cli
css-transforms
reshape
monkey
objectscript
vibrate
structuremap4
renaming
stripe-connect
hadoop-2.7.2
tinkerpop3
greatest-n-per-group
mta
vorpal.js
mediametadataretriever
lua-telegram-bot
cortex-m
database-relations
exim4
ascii-art
linklabel
zscript
angular-gettext
sql-scripts
paw
lnk
winginx
file-not-found
qscrollarea
windows-embedded-standard
embedded-fonts
dtmf
tlf
neos-server
poker
node-blade
insert-id
http-status-code-410
idn
fragmenttransaction
mapping-by-code
infobright
entity-attribute-value
saxparseexception
drawtobitmap
w3c-geolocation
event-receiver
xui
facebook-iframe
addchild
duplex
wysiwym
java1.4
soappy
wspbuilder
pnrp

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