TForsman
Android Fan
Profile
Posts: 25
Reg: Oct 31, 2012
Sweden, Kolbäc...
1,700
05/28/13 12:29 PM (12 years ago)

Best way to update source in eclipse?

Hello, Let's say I don't use push notification update, want users to update from google play only. And I add few stuff in my source and downloads it, how do I update it in eclipse without overwrite the files I changed in eclipse last source I downloaded? Is there a way to merge it, or how does it work? Don't want to do alot of changes locally and it gets wiped out as soon I re-downloaded a new source from buzztouch. thanks in advance.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
05/28/13 01:41 PM (12 years ago)
I do not know about the best general way to update source in eclipse, but here is what I do. First of all, once you download the source code from the BuzzTouch server, you do not need to download it ever again. It may seem that you have to download it every now and then, and actually you don't have to. All the changes that you need to do come from the "cloud", i.e. from the server that your app looks up to when executing. You add menus and screens and it all gets updated on the fly. When I do need to bring a new version of the app to the local machine, I click on the JSON option in the main app menu, and copy it with Ctrl-A and Ctrl-C to my BT_config.txt file in the assets folder in the Eclipse project tree. After saving it, I have all the "freshness" from the control panel that I need. Note that I did NOT download the zipped version of the app, just copied the JSON text. Now, there is a files folder in the control panel and it seems you would need to upload the images and various other files to the server so that you can name them on the fly while creating menus. I found out that the files are NOT copied to the local machine with the zipped file, so that there was no need to upload the images only to falsely expect them to be downloaded as a package. Instead, I put the images that serve as icons in menus into the /res/drawable folder and just file names to tell the system which image to use. To cover the need to have small and large images for phones and tablets, I create two files per image, once up to 100 x 100 pixels in size (I called these files "small") and the other is larger, up to 200 x 200 or so, to be used in tablets. Both versions of an image go to the /res/drawable folder, and once again I just need to state the exact file name and the Android software will handle the rest. For instance, for an image file called cucumber_soup.jpg, I have two files that I actually use -- cucumber_soup_small.jpg and cucumber_soup_large.jpg. There is a program called Picture Resize Genius, which can resize pictures as a batch process, so I don't have to do that manually. To change the names of the files I also use another program called Metamorphose-2, which is free. There is a definite need to change the source Java files when exporting to the Play store. For instance, I change the code to avoid crashing with phone dialer, to avoid auto refresh message and to avoid the spinner of death problem. I have written down all the steps I routinely do just before publishing the app, so that I can consistently proceed with the publishing. If you want to add the advertisements into your app, you must change the source code too, so write down those steps just as well, one procedure for installing and one procedure for deinstalling the SDK, in case the advertising creates problems for users. I have also found that I do not use the emulator any more. With my phone plugged directly to the Eclipse and DDMS, I test directly on the real thing. If I add only the screens through the control panel, there is no need to re-compile the app at all. If I add images to the /res/drawable or BT_Docs folders, then I deinstall the app from the phone and recompile it. There everything works like a charm. I hope this answers the question you posed.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
05/28/13 02:45 PM (12 years ago)
@Dusko said : "First of all, once you download the source code from the BuzzTouch server, you do not need to download it ever again." This used to be very true, and we never had to download more than once. However...with the introduction of the ability to select the plugins you want to include with your project, you may find yourself needing to download more than once, if you add a screen in your control panel that doesn't have the corresponding plugin code already downloaded. That happened to me with a person I was working with today. The easy way around this is to select all the plugins at the first download, but then that defeats the purpose of the selection boxes! Anyway...if you can anticipate the plugins you want to include in your app (now and in the future), then select those, and everything else @Dusko says will be spot on. Otherwise, if you download with only the plugins you've configured select, and then add a different screen later, you'll need to download the project again to pick up the new code. Mark
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
05/28/13 10:56 PM (12 years ago)
@GoNorthWest Right. However, the ability to choose plugins to download is still somewhat experimental and only available through buzztouch.com. I exclusively use self-hosted control panel, so I haven't had the opportunity to take that into account.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
05/28/13 11:20 PM (12 years ago)
@Dusko - good point!
 
TForsman
Android Fan
Profile
Posts: 25
Reg: Oct 31, 2012
Sweden, Kolbäc...
1,700
like
05/29/13 01:47 PM (12 years ago)
Thanks all for the information. Might need to start using the way you suggested with JSON, thanks.
 

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.