How can I know (in an Activity for example) that the app was installed and runned from Eclipse (plugged in mobile through USB)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All applications are signed by a certificate. Even when launched by eclipse. When using the android SDK in eclipse, a debugging keystore was created by default and used each time you use the IDE to build and push your application to the device/emulator.
You can grab information about the keystore in your code and verify if it is your own signed code, or something else. I used the quick and dirty code below on my application in eclipse:
The result was:
Better structured code and credit goes to this link:
http://thomascannon.net/misc/android_apk_certificate/