I have a keyboard, I want to make it easier to share. As if in the current application in which I find myself sending an Intent, and not choosing from the list of installed ones. This code is not exactly what you need
mPackageName = mActivityManager.getRunningAppProcesses().get(0).processName;