Step-by-Step Instructions to Install and Use CoronaViewer for Android - with a glitch - HELP!

I have provided these Step-by-Step instructions because these steps sure would have saved me some time from having to figure it out how to run CoronaViewer on my device. I had never used GitHub before to download code, and it was not immediately obvious anywhere that CoronaViewer was something we had to build - I went crazy trying to find it on the AppStore. Hopefully, this post will help others and those responding can help me find the solutions necessary to make the CoronaViewer available and work well as advertised.

  1. I went to www.dropbox.com and created a new account - it’s free :slight_smile:

  2. I went to: https://github.com/coronalabs/CoronaViewer. From here, I clicked the Download Zip in the right margin and unzipped the files into a new folder I created on my computer called CoronaViewer - so far so good.

  3. Using my new Corona “Pro” subscription, which is required to use the CoronaViewer plug-in, I created a Build which generated CoronaViewer.apk - again, so far so good.

  4. I then uploaded this file to my own FTP location, as I normally would.

  5. I then accessed the web address for the uploaded file in order to download it onto my Android phone - again, so far so good.

  6. I then installed the CoronaViewer file on my Android phone - again, so far so good.

  7. The first time I ran the Corona Viewer, it took me directly to a dropbox.com location in which I had to “Allow” CoronaViewer access to my DropBox account - again, so far so good.

Two Questions:

Question #1 - ANDROID: I then downloaded my own application into the CoronaViewer folder on DropBox expecting it to operate as advertised, and I end up with a black screen everytime I run CoronaViewer now - what am I doing wrong?

Question #2 - iOS: How can I perform the build and the install to my iPhone device using Windows? If this cannot be done, then the advertising to encourage me to upgrade to Pro on the CoronaLabs Pricing page needs to be changed to reflect that “a Mac is required to use this feature for iOS” - just as this phrase is elsewhere in Corona land.

I would be very greatful to find out that I am mistaken - so that I may see my own application running on both Android and iOS as advertised. Thanks to anyone who can help.

Very kindly,

-Troy Lyndon

Android: You need to put all of your project files (main.lua, external modules, asset hierarchy) into your Dropbox -> Apps -> CoronaViewer folder, in your actual dropbox account. Basically, everything that you created to run your app needs to go into that folder.

iOS: You can’t build for iOS without a Mac. A ton of people have complained over the years that this isn’t obvious enough. I don’t work for CoronaLabs, so this is just my opinion, but I don’t know how much more transparent they could make it. It’s all over the documentation they have for first-time users. In addition, it might not be common knowledge to folks that aren’t deep in the devspace, but it’s not a secret that Apple will only let you develop for their products when using a Mac. 

You can use Macincloud to develop without a physical Mac in your possession. Again, I am not a CoronaLabs employee nor do I own stock in the company, but I do advocate for equal rights between consumers and companies whenever possible, and I don’t think this is a case of bait-and-switch. Just my $.02.

Thank you so much, Panc. And I very much appreciate your $0.02.

ANDROID: Can you confirm #1 that once CoronaViewer is installed, I am right #2 to remove its code from DropBox, since the App now runs on my phone, and then #3 place my own App code into the CoronaViewer folder on DropBox to see it on my Android phone? If so, I’ve now run two separate apps and still get a black screen. Other than my code and assets, would I need to include anything else in my DropBox/CoronaViewer folder?

iOS: I have encountered a young man overseas who has created his own Mac-inCloud service for only $55/mo (http://www.xcodeclub.com/) - when I asked how, if I was to use Xcode to Build CoronaViewer, how could I then get it to my iPhone - he answered me with a common and well-known solution that is used by many iPhone/Mac developers, known as TestFlight (http://www.testflightapp.com/).

I should mention that the CoronaViewer logo and title do appear for a split-second before the black screen appears.

Oy. Well, if that dude overseas has more than 3 people using his service, he is doing great. I personally refurbish older Macbook Pros and sell them to devs that need an Intel Mac but can’t afford the new spiffy models. You’d be able to buy one of mine for the equivalent to 6 months of what that dude charges. Not trying to advertise my wares, just saying that might not be the most cost-effective avenue. Also, Testflight shouldn’t be necessary, but again, I have no knowledge of his business model or process.

As far as Android goes, I think you’re going through a few more steps than you need to. The steps are as follows:

Download CoronaViewer code

If necessary, add your custom build.settings code to the CoronaViewer build.settings code. DO NOT OVERWRITE THEM. Add your code to the existing code. Also, replace their config.lua file with yours.

Build the CoronaViewer app

Install the CoronaViewer app on your device

Authorize CoronaViewer to access your dropbox account

Shut down the CoronaViewer app

Go to your dropbox account either through the desktop or web interface

Locate the Apps folder, and drill into it

Locate the CoronaViewer folder, and drill into it

Place ALL of your files into this folder. Basically, drag and drop your entire file structure from your project folder into this folder

Start the CoronaViewer app on your device

Allow the app to sync the files from your dropbox account

The CoronaViewer app should now run as though it is your project

If you’re still having problems, let us know and we’ll try to help. If you can grab the logcat and price the errors there that would help out as well.

EDIT: I forgot to mention, be sure to include any and all code about your custom fonts in the CoronaViewer build. Meaning, in step #2, put in the lines to enable your custom font in the newly merged build.settings file, and include the custom font file in the file structure of the CoronaViewer code. Then build. Consider this step 2a.

Thank you again, Panc.

  1. So I built a new CoronaViewer app ontop of the existing CoronaViewer code base.

  2. When I went to compile it, my PC Corona Simulator starts by saying, "The ‘viewer’ plugin is designed to be used on device.

  3. When I click “OK”, my app runs as normal on the PC Simulator.

  4. I then uploaded the file to my FTP site and;

  5. then downloaded it to the Android phone as I would any build;

  6. when I run it, it asks me to Allow DropBox access, which I do.

  7. the app runs fine.

  8. but when I change files in my DropBox, expecting them to show up on my Android phone automatically, nothing happens. Even when I make sure the app is not running on the Android and then run my app (named; Corona VIewer), it does not appear to download the latest files form my DropBox, nor does it ask me any further to allow - seeming to indicate it has access without any trouble. Why am I still not seeing dynamic changes? Also, the 4 finger touch doesn’t work in the app. Any help is much appreciated.

Let’s take a quick step back and talk about what is happening between steps 2 and 3. When you run your CoronaViewer code on the simulator, it should not at any point take you to your app. The CoronaViewer build, on the simulator, should always stay on the “Viewer only works on device” message. At this point, you need to jump back into my steps at #3. Don’t put your actual project files anywhere in the CoronaViewer app directory structure. Only put them in the dropbox->apps->coroanviewer folder.

Also, install the android sdk on your pc and use ADB to install the app on your phone. All that uploading gets old fast :slight_smile:

Adb is a much faster and cleaner way od doing it. Plus you need the android sdk tools in order to get debugging information from your device anyhow.

Trust me, it’s well worth the time it takes to set up :wink:

ADVANCED MOVE: Once you get everything moving correctly, follow these steps from Roaming Gamer to get multiple CoronaViewer builds running on one device. 

Still a problem…I have now successfully uninstalled what was the old CoronaViewer(1/2 my game) and installed a clean build of CoronaViewer to the phone. When I run the application, it asks for access to it’s DropBox folder and then shows the CoronaViewer title and logo for one second before switching back to the main menu on Android. When I look at Apps in memory, it still shows CoronaViewer as loaded. But again, when I attempt to go back to it, it shows the title and logo again for one second before switching back to the main menu on Android - while leaving itself in memory. Is this the normal behavior of CoronaViewer on an Android device?

I simply made an HTML file the Android browser can see with nothing on the page but a link to my Corona.apk. All I do is click the link every time I want to update - the download of about 30MB only takes about 5 seconds on my connection, so it doesn’t really get old.

But what interests me in your post is your comment about the need to get debugging information from the device. Doesn’t the Simulator do that in the Console? When would I need to debug it right on the phone itself?

To each his own :slight_smile:
I prefer just being able to do: adb install -r apkName.apk and have it install via usb.

Anyway… To answer your question, the Corona simulator doesn’t give you runtime console output from the device itself.

So to see your print statements, error messages etc when running the app on your device, you will need to use either ddms or the monitor application which come as part of the android sdk. You can also just use the command line (also requires adb) and enter the command: adb logcat

Then with your device connected via usb, You have access to the aforementioned data via an on screen console.

This goes without saying, but device testing is crucial and you need to be sure that things are outputting and running as expected on the device. The simulator has it’s caveats, that could trip you up on device (i.e no enforcement of case sensitivity for filenames), so it’s imperitive that you have access to the devices output.

Thats is why it’s better to just use adb, rather than side loading the apks, just use the tools provided, it makes for a easier workflow, trust me.

Hope this helps.

The time it takes to build the app, upload it to a server (or run a webserver on your computer and point your web directory to the build folder), then take the time to copy over the binary (uninstalling the previous one if necessary) vs. save the source file in your editor and watch the device  refresh.

Now as to why it’s not working, you need to look at your console log and see if there are errors (just like any other app on a device).  CoronaViewer has the complexity  of having to deal with two build.settings files.  If your app needs plugins, then your CoronaViewer needs to be built with the plugins too.

Rob

Did you ever get this figured out, Troy?

Android: You need to put all of your project files (main.lua, external modules, asset hierarchy) into your Dropbox -> Apps -> CoronaViewer folder, in your actual dropbox account. Basically, everything that you created to run your app needs to go into that folder.

iOS: You can’t build for iOS without a Mac. A ton of people have complained over the years that this isn’t obvious enough. I don’t work for CoronaLabs, so this is just my opinion, but I don’t know how much more transparent they could make it. It’s all over the documentation they have for first-time users. In addition, it might not be common knowledge to folks that aren’t deep in the devspace, but it’s not a secret that Apple will only let you develop for their products when using a Mac. 

You can use Macincloud to develop without a physical Mac in your possession. Again, I am not a CoronaLabs employee nor do I own stock in the company, but I do advocate for equal rights between consumers and companies whenever possible, and I don’t think this is a case of bait-and-switch. Just my $.02.

Thank you so much, Panc. And I very much appreciate your $0.02.

ANDROID: Can you confirm #1 that once CoronaViewer is installed, I am right #2 to remove its code from DropBox, since the App now runs on my phone, and then #3 place my own App code into the CoronaViewer folder on DropBox to see it on my Android phone? If so, I’ve now run two separate apps and still get a black screen. Other than my code and assets, would I need to include anything else in my DropBox/CoronaViewer folder?

iOS: I have encountered a young man overseas who has created his own Mac-inCloud service for only $55/mo (http://www.xcodeclub.com/) - when I asked how, if I was to use Xcode to Build CoronaViewer, how could I then get it to my iPhone - he answered me with a common and well-known solution that is used by many iPhone/Mac developers, known as TestFlight (http://www.testflightapp.com/).

I should mention that the CoronaViewer logo and title do appear for a split-second before the black screen appears.

Oy. Well, if that dude overseas has more than 3 people using his service, he is doing great. I personally refurbish older Macbook Pros and sell them to devs that need an Intel Mac but can’t afford the new spiffy models. You’d be able to buy one of mine for the equivalent to 6 months of what that dude charges. Not trying to advertise my wares, just saying that might not be the most cost-effective avenue. Also, Testflight shouldn’t be necessary, but again, I have no knowledge of his business model or process.

As far as Android goes, I think you’re going through a few more steps than you need to. The steps are as follows:

Download CoronaViewer code

If necessary, add your custom build.settings code to the CoronaViewer build.settings code. DO NOT OVERWRITE THEM. Add your code to the existing code. Also, replace their config.lua file with yours.

Build the CoronaViewer app

Install the CoronaViewer app on your device

Authorize CoronaViewer to access your dropbox account

Shut down the CoronaViewer app

Go to your dropbox account either through the desktop or web interface

Locate the Apps folder, and drill into it

Locate the CoronaViewer folder, and drill into it

Place ALL of your files into this folder. Basically, drag and drop your entire file structure from your project folder into this folder

Start the CoronaViewer app on your device

Allow the app to sync the files from your dropbox account

The CoronaViewer app should now run as though it is your project

If you’re still having problems, let us know and we’ll try to help. If you can grab the logcat and price the errors there that would help out as well.

EDIT: I forgot to mention, be sure to include any and all code about your custom fonts in the CoronaViewer build. Meaning, in step #2, put in the lines to enable your custom font in the newly merged build.settings file, and include the custom font file in the file structure of the CoronaViewer code. Then build. Consider this step 2a.

Thank you again, Panc.

  1. So I built a new CoronaViewer app ontop of the existing CoronaViewer code base.

  2. When I went to compile it, my PC Corona Simulator starts by saying, "The ‘viewer’ plugin is designed to be used on device.

  3. When I click “OK”, my app runs as normal on the PC Simulator.

  4. I then uploaded the file to my FTP site and;

  5. then downloaded it to the Android phone as I would any build;

  6. when I run it, it asks me to Allow DropBox access, which I do.

  7. the app runs fine.

  8. but when I change files in my DropBox, expecting them to show up on my Android phone automatically, nothing happens. Even when I make sure the app is not running on the Android and then run my app (named; Corona VIewer), it does not appear to download the latest files form my DropBox, nor does it ask me any further to allow - seeming to indicate it has access without any trouble. Why am I still not seeing dynamic changes? Also, the 4 finger touch doesn’t work in the app. Any help is much appreciated.

Let’s take a quick step back and talk about what is happening between steps 2 and 3. When you run your CoronaViewer code on the simulator, it should not at any point take you to your app. The CoronaViewer build, on the simulator, should always stay on the “Viewer only works on device” message. At this point, you need to jump back into my steps at #3. Don’t put your actual project files anywhere in the CoronaViewer app directory structure. Only put them in the dropbox->apps->coroanviewer folder.