Eclipse - running on real device - android

I have started testing my app in my Samsung Note 2 (real device). In installed it using this guide. However I have few questions if someone please help me:
1) Once I run my app in the device, does it install anything in my mobile (i have database use as well)? If so, what is the proper way to close the connection so that all installed things get deleted automatically?
2) If I change my code and run it again to check, what happens to the previous installation? Does it override or so?
3) When I use AVD with 5.7 inch screen, it shows menu button perfectly. But in my Note II, 3 menu button (out of 5) are shown in the bar, but rest are missing though I set android:showAsAction="ifRoom" for all of them.
Thanks,

1) installed in /data/com.yourapp.pkgname/ , no auto delete, you should uninstall it manually
2) Old one will be overrided
3) It might because your AVD is m-dpi/h-dpi but your phone is h-dpi/x-hdpi

1) Yes, it does perform a "normal" installation of your app. There is no automatic cleanup, so you have to remove any installed packages manually.
2) It will install the changed package to your device, any previous installation of your package will be gone. It will keep any application private data though.
3) Probably there is not enough room to display all of them, you did request "ifRoom" so it will only place them there if it fits.

1) Once I run my app in the device, does it install anything in my mobile (i have database use as well)? If so, what is the proper way to close the connection so that all installed things get deleted automatically?
Answer: When u install your app on device, it will get create a database, sharedperferences and other files that u have created in your application. but to delete the databases you have manually install the app or clear the data from Setting --> app.
2) If I change my code and run it again to check, what happens to the previous installation? Does it override or so?
Answer : The newer version of the app will be overridden by older one, and you can see the new changes from the app.
3) When I use AVD with 5.7 inch screen, it shows menu button perfectly. But in my Note II, 3 menu button (out of 5) are shown in the bar, but rest are missing though I set android:showAsAction="ifRoom" for all of them.
Answer: When u run the app on actual device, os will detect what ever the available space to display the menu items.. so it is not your hand, but you can decide which item you want first.
Hope this help you..
Enjoy..!!!!

Related

Android Emulator Scroll Down Doesn't Work in Home Page

I am new in Android Studio. I am using Android Emulator for call rest API for my backend. Before, i scroll down basicly in main android page. But after i wanted to tried scroll down, as if i right clicked, Home Setting, Widgets and Wallpaper pop-up show me. What is the solution about that. I never changed any setting.
Thanks for reply.
It looks like your emulator is frozen. It happens quite often.
I would suggest you to try these:
Restart your computer and try to run your app in the emulator. After it successfully runs, now try to clear the app cache.
If that didn't help, create another emulator. I recommend to choose different device and API level than the current emulator device but it is not necessary. This should solve your problem.
Tips
If you want to clear data, clear cache, uninstall app, clear cache and restart the app and so many such actions from android studio without touching your emulator then you can use ADB Idea plugin.
For that, in android studio go to Settings -> Plugins
search for ADB Idea in marketplace. Install it.
You need to restart android studio.
To use it:
You can press shift key in your keyboard twice and search for Adb in search window. You will get all the options from the plugin
From android studio menu... Tools -> ADB Idea and then you will see all the options available.

Android Studio choosing the emulator instead of running last one automatically

I am trying to test multiple screen sizes and is annoying having to shut down the emulator then open a new one just to check the size (there is a new font so I can't view it in the editor).
I open multiple emulators but the box doesn't appear to select the emulator it just runs the previous one.
I searched the answers here and they said go to Run > Edit
Configurations and Select emulator as Target or simply check the
checkbox Use same device for future launches.
I am obviously wanting the opposite so it would be unchecked. The thing is the box is unchecked but it is not giving me the option to select.
Thanks in advance
It should work if the box is unchecked. Probably a bug of android studio? In any case, I've found that clicking stop and then running again gives you the option to select device.
Click the stop button on the right to kill the app and then run again.

Android Emulator on Mac OS X issues clicking

Really weird issue but when I try to click once it doesn't register on the emulator but then I click again and the click registers. This is using AVD. Every other click seems to trigger in the proper place. This has nothing to do with my app just base image.
Take a look at this:
https://www.youtube.com/watch?v=axvxtGj4HPo&feature=youtu.be
and notice the first click doesn't register.
I notice the age on this thread, so not sure if you have already figured this out. I ran into something similar like this today in which no clicks were being registered at all. This issue still persisted even after closing and reopening the simulator. One thing I did notice is that the power button still worked.
I ended up fixing this by:
Clicking and holding the Power Hard Key
Restarting the device OS by clicking the Restart
After the OS Reboots, everything seems to work again.
Note: the Hard Key for power is the power button next to the volume controls on the right.
In my case it usually happens when the size on disk is very high (see in AVD Manager) and the solution in my case is to make a Wipe Data
Update #1 (Because the solution from above not always works)
Another thing I found is that when you want to swipe up from the Google bar does not open the apps menu. Then I open first the Messages app or Chrome and close again. From there the Swipe up works again.

Android custom home for tablet

Im develping an app using apk 12 for 10.1 inch galaxy tablet. I would like to design a home screen only with my apps icon so that user will not be able to access anything else. Can I do that ? If yes, how ??
I would like to design a home screen only with my apps icon so that user will not be able to access anything else. Can I do that ?
Yes, it is possible to create a home screen application.
If yes, how ??
There is a Home sample app in your Android SDK installation (assuming you installed the samples from the SDK Manager). It largely boils down to having an activity with an <intent-filter> using CATEGORY_HOME.
Note that the user who installs your app will have the option of choosing between your home screen and the built-in one. Even if they make your home screen the default one, they will still be able to revert that decision by removing your app:
by booting in safe mode
via the Android SDK (e.g., adb uninstall)
by getting into Settings through notifications and the like
possibly other means
For ur knowledge lot many thing are diff for honeycomb.
For your knowledge, nothing changed in this area with Android 3.0.

AVD - Changes not applied?

I made changes to an app, just changing the icons. That worked, I was able to see the results when I launched the emulator.
I tried to create a new app but when I launched the emulator again I saw my previous app. I have tried to wipe the user data but it doesn't change anything.
Edit: I saw my previous app but the new app didn't appear.
I eventually deleted the projects, the source code and then restarting eclipse but I'm still having the problems. When I launch the virtual device again it's still showing the original app. I've also tried creating a new emulator as well but I have the same .
Anyone else having this problem or know what's going on?
P.S I also tried loading the Halo theme but it doesn't load.
(Using Mac OS X Lion & Eclipse Classic 3.7 (32 bit))
Did you change the name of your applicaition package to cause this behaviour?
Just uninstall the old app from the emulator.
Menu -> Settings -> Applications -> YourApp -> Uninstall

Categories

Resources