GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
07/13/12 02:43 PM (12 years ago)

Five Minute Tutorial : Android Helper App Install for Emulators

Hello! Today's Five Minute Tutorial is going to be short on text, and just under five minutes on video. The topic today is "Android Helper App Install for Emulators." If you want to skip the text, and head straight to the video, here are the links: HD Link: http://www.youtube.com/watch?v=5Ohlah9xTv0&hd=1 Standard Def: http://www.youtube.com/watch?v=5Ohlah9xTv0 Short Link: http://youtu.be/5Ohlah9xTv0?hd=1 [Edit: If you like the video, feel free to give it a thumbs up! And, or course, if you don't like it, thumbs down.] Many of us who use buzztouch have created apps that contain documents in various formats: .pdf, .doc and .xls are some common examples. We've done our due diligence and included the file with the app for faster loading, or configured the screen with the correct source URL, but when we run our app in the Emulator (or even sometimes on a device), we get messages stating the system doesn't know what to do with that file! What we expect to happen is that we can read the document, but it turns out that for Android, we often need a "helper app" in order to accomplish that. This is not typically an issue on iOS where docs of these types get handled natively. The answer to this problem is relatively simple: install the correct app that can be used for that document type. That's what a user with a real device has to do, and that's what you need to do in your Emulator. But, the Emulator doesn't come with the Google Play app (at least the Android 2.2 Emulator doesn't), so you can't easily download what you need. There are multiple ways around this, fortunately, and this tutorial highlights one of the: the use of 'adb' to install the app. The process is actually quite simple, but is most easily explained in a video, which is why I'm doing it that way this time. But, for those of you who may be more advanced, there are the basic steps, using an app called "AdobeReader.apk" as an example. * Get your Emulator up and running. You can do this via Eclipse, or by going into your android install folders and running the "AVD Manager.exe" file for Windows; or for Mac, bu going through Eclipse. * Copy the AdobeReader.apk file into your <android install folder>/platform-tools folder (same folder you can find the adb executable in) * Open up a Command Window (Windows) or Terminal Window (Mac) and change into the platform-tools folder noted above. Use the 'cd' command to get there. * [Edit] @raveyd makes the suggestion to run 'adb devices' to make sure it discovers the emulator first. I've never had to, but it sounds like a good idea! * In the Command/Terminal Window, once in the platform-tools folder, run the command 'adb install AdobeReader.apk' * Watch as the adb program uploads the apk to the Emulator and installs it! This process absolutely makes more sense via video, so I encourage you to check it out. The process can be used for any apk file you want to install...including ones generated by you, or sent to you by other people. Again, this is only one way of doing it, but very effective for me. I hope this helps relieve some of those error messages you experience while trying to open documents in your app! Mark
 
lsills81
Apple Fan
Profile
Posts: 469
Reg: Mar 19, 2012
location unknow...
14,090
like
07/13/12 04:10 PM (12 years ago)
You are a huge asset to the Buzztouch community.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/13/12 04:30 PM (12 years ago)
Thanks! Just trying to have some fun with all this! Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/13/12 04:35 PM (12 years ago)
Hi Mark, just a note. You usually need to find the emulator first, so when you change to platform-tools run adb devices to find the emulator, then run adb install once it's found.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/13/12 04:41 PM (12 years ago)
Hi @raveyd, I've never had to do that! I've always just gotten the emulator up and running that I want, and running adb install installs it to the current running emulator. In the past, I've started the emulator by running 'emulator @buzztouch_v1.5' instead of going through the AVD Manager. Works the same both ways for me (as you can see!). Here is the link that I learned from, and which I based the method off of: http://www.androidaz.com/development/how-install-application-and-copy-files-android-emulator Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/13/12 04:53 PM (12 years ago)
The joys of Android development! winxp sp2. Maybe it makes a difference? I often need to run adb devices a few times before it finds the emulator. Once that's done, the apk usually installs ok, but not every time. I also find it works slightly better directly from the avd manager, rather than through eclipse.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/13/12 04:59 PM (12 years ago)
Totally agree on doing it better through AVD Manager. That seems to work much better. On my older, slower home computer running Win 7, I often get the message that it can't find the emulator. So, I try the install command multiple times. Sometimes it works, sometimes I have to shut down the emulator and try again. And sometimes I just give up. On my faster laptop running Win 7, it's never failed to work. So, perhaps memory/processor power has something to do with it? I'll have to try the adb devices command sometime. I wasn't aware it existed, but it could be helpful! Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/13/12 05:08 PM (12 years ago)
I think processing power and windows! I don't think linux users have even half as many problems. adb devices is also useful for finding a phone if you want the apk in a real environment but with logcat output. 'Give up', yeah that's also a regular option!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/13/12 05:10 PM (12 years ago)
I have it all running on my Mac mini as well, and it generally works better than on Windows. Though, with my current laptop, which is a fairly decent one, it runs pretty well.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/13/12 05:18 PM (12 years ago)
Ahh, I really want a mac. I look at the apps people are creating with bt for iOS, then look at apps for Android and they just don't compare. A whole lot more work and headaches to produce anything even close to iOS. And all the fabulous mac tools that people are regularly linking to. Us android devs are still the poor relations! Sorry, wandering off topic. Tired.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/13/12 05:20 PM (12 years ago)
Totally agree! We should start a new "Woes of the Android Developer" thread!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/13/12 05:21 PM (12 years ago)
It would be long and varied!
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
07/13/12 07:05 PM (12 years ago)
Thank you for writing this up as well as doing a video! It is handy to have the instructions written down.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/13/12 11:49 PM (12 years ago)
Hi Mark, Thanks for yet another great resource for beginning devs. This will save me having to pinch my son's android phone to check that all my BT_docs work! cheers
 
hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
like
07/26/12 07:45 AM (12 years ago)
Hi everyone, first time poster and new to Buzztouch, and I have to say Mark has been amazing with his help. I am trying to use a pdf file and watched the video on how to install acrobat reader. Question is where is a good place to obtain the adobereader.apk or even other apk's such as word, excel etc if needed. Thanks again, Howard
 
hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
like
07/26/12 08:01 AM (12 years ago)
Hi everyone, first time poster and new to Buzztouch, and I have to say Mark has been amazing with his help. I am trying to use a pdf file and watched the video on how to install acrobat reader. Question is where is a good place to obtain the adobereader.apk or even other apk's such as word, excel etc if needed. Thanks again, Howard
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/26/12 11:31 AM (12 years ago)
Hi Howard, I Googled "adobereader.apk" and came up with a few links. This one looks good: http://www.iapktop.com/tag/adobe-reader-apk For office docs, there are a few apps that read them, but I don't think any of them are free. You probably need to do some research on that. Mark
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.