android-package-managers

How do I create an intent to launch any e-mail app?

别说谁变了你拦得住时间么 提交于 2019-12-04 14:17:33
I have found various topics here and elsewhere on creating an intent for sending e-mail and that seems to be pretty straightforward. I'm looking for an intent to just launch any e-mail client the user might have. Here is the code I've seen for sending an e-mail ( posted just for reference, this doesn't serve my needs as I don't want to send a new message ): Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(Intent.EXTRA_EMAIL , new String[]{"recipient@example.com"}); i.putExtra(Intent.EXTRA_SUBJECT, "Subject of the message"); i.putExtra(Intent.EXTRA_TEXT , "Body of

How to detect new apps in an Android device

老子叫甜甜 提交于 2019-12-04 14:02:51
问题 I want to detect when the user installs or deletes an app, and I didn't find a BroadcastReceiver that does this. In my app, I get the information about the installed apps with the class PackageManager , but I don't want to scan the apps periodically. Is there any BroadcastReceiver that does this? Or any ContentObserver ? Is it possible to get a notification that an app has been installed or removed? 回答1: You can register a BroadcastReceiver using Intent.ACTION_PACKAGE_ADDED (and also Intent

Call broadcast receiver at time of uninstalling application in android [duplicate]

≯℡__Kan透↙ 提交于 2019-12-04 05:29:52
This question already has an answer here: Receiving package install and uninstall events 4 answers I want to clean up the junk created by my application at time on UnInstalling the Application. Using ManiFest File:- Added in Manifest File: <receiver android:name="com.netdoers.com.ui.CleanReceiver" > <intent-filter> <action android:name="android.intent.action.PACKAGE_REMOVED" > </action> <data android:scheme="package"/> </intent-filter> </receiver> Created Receiver to catch the BroadCast Event public class CleanReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent

Get All Activities by using package Name

我怕爱的太早我们不能终老 提交于 2019-12-04 05:11:09
I want to get all activities present in Application as a list by using PackageInfo. Please tell me is there any way to do this. Thanks in advance. Bharath Kumar Bachina I got answer to my question as follows. public static ArrayList<ActivityInfo> getAllRunningActivities(Context context) { try { PackageInfo pi = context.getPackageManager().getPackageInfo( context.getPackageName(), PackageManager.GET_ACTIVITIES); return new ArrayList<>(Arrays.asList(pi.activities)); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); return null; } } Try below code: final PackageManager pm =

How to detect permission access of other apps?

柔情痞子 提交于 2019-12-03 20:52:46
I'm searching for a way to detect permission usage of other apps. The key idea is to detect, when other apps are accessing media or sensors (e.g. microphone). I want to implement a service, which is looking for any permission usages, so that the service can inform the user, once any app is accessing the microphone or camera. Does anybody know how to do this? I already found out, that I can read all granted permission of an app using the PackageManager, but I'm more interested in "real" permission usage. Thanks in advance! I think detecting permission requests isn't possible in that way. Since

Remove Activity as Default Launcher

帅比萌擦擦* 提交于 2019-12-03 18:48:14
问题 I set my activity as a default launcher to intercept home button clicks like so: <activity android:name=".ExampleActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> When my activity, ExampleActivity is launched, if i click the

How to pull List of installed App name, package name and icon drawable

老子叫甜甜 提交于 2019-12-03 16:35:53
I'm trying to figure out how i can implement this code into my existing source code. Currently i have some source that displays a list-view of all the installed apps and on-click will send intent to the application. I'm needing some support on how to pull the icon and add this into the list view. Any help, source code editing, links, etc would help me resolve this. Thank you ListInstalledActivitiesActivity public class ListInstalledActivitiesActivity extends ListActivity { // Buffer used to store package and class information, and also determine the number of installed activities private

Delta update for Android App updates

喜夏-厌秋 提交于 2019-12-03 12:42:32
I am trying to setup my own Server to host apk files which will be available for installs and updates in the client App. On new version update of apk, only the updated part should get downloaded at the client end. I am able to generate a patch file using "bsdiff" at the server end. But at the client, how should I merge the patch file with the original apk and install the update. Based on your question, it looks like you are looking for some kind of patching system. Normally Google play store takes of managing this. When you upload a new version of APK, it only download the difference on client

How to get information of an APK file in the file system (not just installed ones) without using File or file-path?

南楼画角 提交于 2019-12-03 09:18:14
Background My app ( here ) can search for APK files throughout the file system (not just of installed apps), showing information about each, allowing to delete, share, install... As part of the scoped-storage feature on Android Q, Google announced that SAF (storage access framework) will replace the normal storage permissions. This means that even if you will try to use storage permissions, it will only grant to access to specific types of files for File and file-path to be used or completely be sandboxed (written about here ). This means that a lot of frameworks will need to rely on SAF

How to detect new apps in an Android device

送分小仙女□ 提交于 2019-12-03 08:51:35
I want to detect when the user installs or deletes an app, and I didn't find a BroadcastReceiver that does this. In my app, I get the information about the installed apps with the class PackageManager , but I don't want to scan the apps periodically. Is there any BroadcastReceiver that does this? Or any ContentObserver ? Is it possible to get a notification that an app has been installed or removed? You can register a BroadcastReceiver using Intent.ACTION_PACKAGE_ADDED (and also Intent.ACTION_PACKAGE_REMOVED and/or Intent.ACTION_PACKAGE_CHANGED if necessary). For instance, void