In my java application, I have tried to get the package name of an android application. I have tried it by executing command line argument. The command is :
aapt dump badging <apk file>
And this command returned whole meta data of the application.I have to extract the package name from the returned string suppose named 'result' ;