Applist
Applist copied to clipboard
Image does not exist in this directory
I got the apps list, but there were two problems: the icon of apps does not exist in this directory and Google Maps was not included in the list.
On the way the image noticed the name "ionic" but I do not use ionic use the "Visual Studio Cordova".
Can someone help me? I need to get the icons of apps.
Hey,
Have you looked in your device's sd card directory: sdcardd//com.ionicframework.xxx/Cache/ ?
Let me know if you find them there. This only gives you the user installed apps, not the system default apps. Do you want to contribute and create a flag for it? (I can tell you where and how!)
Already I looked this directory does not exist. I do not have memory card on the phone
Do you have a file manager app and can see external storage? (with path /storage/emulated/0" or something like that)
yes, there is a directory "/storage/emulated/" but does not have any files
No files at all or no "com.ionicframework.xxx/Cache/"?
this directory does not exist: "com.ionicframework.xxx"
I see.. I might need some logs to see what is the error.. Can you send me the cat logs from your device? Also, try creating the directories, and see if it can place images in or not.
I don't think an app has permission to write sdcard after android 5.0 and later. Apps may write to
/storage/emulated/0/Android/data/com.company.app_id
PS: com.company.app_id
is application's app id such as com.facebook.katana
Awesome comment! Then we just need to change lines 103 - 105 to get applications directory instead. Would you be able to give it a quick try?
I've changed three lines (103, 105 and 121) manually. It did not create directory. But it was created it worked. I installed file plugin. File plugin created the directory. So my problem partially solved. But this plugin should replace com.ionicframework.xxx with app_id automatically and should create directory itself, without need of file plugin.
I have created a pull request for this purpose. https://github.com/jmrezayi2/Applist/pull/7
I don't know android java programming. This is probably not working. So you should correct this code:
String app_id=context.getPackageName();
How ionic3 calls to get the installed app list ? (<any>window).Applist.createEvent('', '', '', '', '', (app_list)=>{ alert(JSON.stringify(app_list)); console.log(JSON.stringify(app_list)); }, (app_list)=>{ alert("Oopsie! " + app_list); console.log("Oopsie! " + app_list); });
error: TypeError: Cannot read property 'createEvent' of undefined
(<any>window).Applist.Applist.createEvent('', '', '', '', '', (app_list)=>{ alert(JSON.stringify(app_list)); console.log(JSON.stringify(app_list)); }, (app_list)=>{ alert("Oopsie! " + app_list); console.log("Oopsie! " + app_list); });
error: TypeError: Cannot read property 'Applist' of undefined
Based on the comments of @coolman7. I have updated the path. So I am able to get the path of the package name.
But now I am getting this error at saving the file, like this java.io.FileNotFoundException: /data/io.ionic.starter/cache/sun.way2sms.hyd.com.png (No such file or directory)
Is there any solution for this?