| Index | Android apps - Running the app |
Check that your app has OK code, or it won't run.
Plug your Fire Kindle into your computer's USB socket. Switch the Kindle on. Enter the PIN.
In AndroidStudio, click on Run at the top. Then Run app.
It will come up with a box asking which device you want to use. Your Fire Kindle should be there. If so, click on OK. That should start up your app.
If your Fire Kindle is not there, you may not have plugged it in or switched it on. Do so. If you have a dodgy USM socket, like me, joggle things around a bit or take plugs out and put them in again. Go and have a look at Windows Explorer to see if the Fire Kindle has connected. Swear at things a bit...
If your Fire Kindle has gone to sleep, then AndroidStudio may start up the app OK, but naturally you can't run it until you wake up the Fire Kindle. No doubt there are different types of snooze.
You can bypass the box which asks which device you want. This might be tempting, as you always want the Fire Kindle. However, I prefer to say Yes each time, as it gives me a chance to get the Kindle, or kick it awake (metaphorically speaking). It is also helpful, because this box doesn't appear if you have red exclamations outstanding, which you need to sort out. You get told this elsewhere, but the appearance or not of the device request box is the type of big obvious clue which I prefer.
So far, I haven't explored AndoidStudio's debugging facilities. I've had bugs, naturally, but they've been obvious, so far. So, sorry - I can't help you with that! I've had a numerical exception (input something non-numeric and tried to treat it as a number) and that just terminated the app and took me back to the homepage of the Fire Kindle.
You can alter any code, check for the green arrows again, then run the app again in exactly the same way. The Fire Kindle will probably have gone to sleep again (sigh).
Android actually installs your app on your Fire Kindle and it stays there, so you can use it in future. If you don't want it any more, then you can uninstall it as you would any app. (Touch the icon for a bit, and some options should appear. You want to delete it from the device, not just the carousel.)
You can run your app on an emulator within AndroidStudio. I haven't investigated this. I prefer to run things on the device that I intend to use them on. Still, it's up to you. Obviously useful if you want to make an app useful across lots of devices.
One last point: When you run the app, there is a running commentary starts up below your listing. I have steadfastly ignored this (the items look terrifying!) But if you want to get rid of it when you go back to coding (to get more room on the screen), then you can hide it. Find the line that says Android Monitor. Follow it across the screen, to an icon with an arrow pointing downwards. Click on it and that stuff disappears.
© Jo Edkins 2016 - Index to Android app index