Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 25    Views: 163

UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
11/15/12 04:52 PM (13 years ago)

Is IOS BT_config.txt file the same as Android BT_config.txt

I successfully wrote a Map App for iOS in May 2012. I got my $99 Apple Developer account, and installed the App on my iPhone 4, current iOS. I use it, it works! Recent update to the current iOS - and maps - did not break anything. It is an address-book of business places, in Europe - where I am traveling. The structure is: * Welcome screen * Text List of Countries * Tap on a Country to get text list of Cities * Tap on a City to get list of business types in that City * Tap on a business type to get Map of businesses in that City, red pins, pulsing blue dot for my iPhone Geolocation. In my BT account, I built the App for One Country, One City, One Business type, One Business. I created a SQL Table on my web server of all of the Businesses I wanted to feature in my Map App. Each record is precisely formatted with Country, City, Business Type, Business Name, Lat/Lng, Address (for display purposes only since I get the Lat/Lng from Google before I insert the record into my SQL Table). I downloaded the Manually created App from my BT account, and the BT_config.txt JSON file, and studied its organization. I then wrote a PHP script which creates a new BT_config.txt file, based on the structure of the one created manually in my account (for ONE Country/City/Type/Business...), but now containing all 300+ Businesses in my SQL Table. (I've written several hundred PHP scripts in the past 7 years, on top of 27 years of Mac use, and high end Adobe products, Apple Final Cut Pro video editing and DVD authoring). It took a few hours of study, to write a script that outputs precise java code structure and punctuation! Looks and works great on my iPhone. I've travelled in Berlin, Birmingham, Manchester, Liverpool, Nottingham, Cardiff, London, Bristol since I wrote the App... works great! Now I am creating the Android version. My basic question: is: Have you found that the iOS BT_config.txt file is the same as the Android BT_config.txt file? As far as I can tell from the manually created (One Country/City/Type/Business) file from my BT Account, the two files are the same - unless now at 11:30pm, my eyes are blurry and I'm not catching some subtle difference. I drag and drop the bigger BT_config.txt file into Eclipse, the same BT_config.txt file that works on my iPhone, replacing the tiny one manually created..,. And run the ADV 2.2. On the home screen, it displays my App Icon! (Hooray!). I click on my App Icon, and it loads slowly, then the error window: [My App icon] Something's not right! There was a problem loading the app's configuration data. See the LogCat (console) output in Eclipse (2); Which is: [2012-11-15 23:06:17 - BT_activity_root] Android Launch! [2012-11-15 23:06:17 - BT_activity_root] adb is running normally. [2012-11-15 23:06:17 - BT_activity_root] Performing com.myApp.BT_activity_root activity launch [2012-11-15 23:06:17 - BT_activity_root] Automatic Target Mode: launching new emulator with compatible AVD '2' [2012-11-15 23:06:17 - BT_activity_root] Launching a new emulator with Virtual Device '2' IN RED: [2012-11-15 23:06:21 - Emulator] WARNING: Data partition already in use. Changes will not persist! [2012-11-15 23:06:22 - Emulator] WARNING: Cache partition already in use. Changes will not persist! [2012-11-15 23:06:23 - BT_activity_root] New emulator found: emulator-5556 [2012-11-15 23:06:23 - BT_activity_root] Waiting for HOME ('android.process.acore') to be launched... [2012-11-15 23:07:20 - BT_activity_root] HOME is up on device 'emulator-5556' [2012-11-15 23:07:20 - BT_activity_root] Uploading BT_activity_root.apk onto device 'emulator-5556' [2012-11-15 23:07:20 - BT_activity_root] Installing BT_activity_root.apk... [2012-11-15 23:07:52 - BT_activity_root] Success! [2012-11-15 23:07:52 - BT_activity_root] Starting activity com.myApp.BT_activity_root on device emulator-5556 [2012-11-15 23:07:53 - BT_activity_root] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.myApp/.BT_activity_root } IN RED: [2012-11-15 23:07:54 - BT_activity_root] emulator-5556 disconnected! Cancelling I revert to the tiny version created manually, and it doesn't work either! It doesn't error and quit, but It doesn't do the menu sequence described. It only shows one menu item - Not the Country, not the City, but right to the "Type of Business" menu. And clicking on that does NOT go to the Map of the city with the pin, and clicking on the left or right buttons doesn't do any good, either. Eclipse seems to be OK, although configuring it was a two-day headache because 1) It took a while to find any kind of tutorial for Mac, and 2) Never did find any tutorial new enough, and Mac enough, to match the current Eclipse for OSX version, with its current (Mac) features and menu design... One thing that has me concerned: in (some) tutorials it says the src should be com.myapp.com, but Eclipse creates com.myapp , no trailing .com. No pesky red errors cited in another post recently. I Picked Google 2.2, and the red errors that were there, went away as promised!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/15/12 04:58 PM (13 years ago)
Hi @nickbaer, The short answer to your title question is that they are the exact same file. Exact same data and everything. If you compare them, there should be no differences. It's exactly this feature that allows you to design once for both platforms. The differences come in on how each platform deals with the JSON in those files and draws things like menu lists, etc. There's a good section on configuring for Mac here: https://www.buzztouch.com/files/howtos/buzztouch_For_Android-A_Users_Guide.pdf Mark
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/15/12 05:02 PM (13 years ago)
Thanks. This will be my starting point tomorrow morning, when I start the new day.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/15/12 05:15 PM (13 years ago)
Although, something just flashed thru my mind about Android wanting image file names all lower case... Mine are mixed case, which work fine on iPhone. That means I'd have to look into the file names for both. That will be another issue to resolve. Although my Map App menus are black text on color, I do have a couple of menu overlays that are pngs (pngs of white text transparent background). But my App Icon showed up on the home screen, and it is mixed case.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
11/15/12 06:43 PM (13 years ago)
'Data partition already in use. Changes will not persist!' etc That sounds like an emulator issue, like the adv hasn't closed down. Try a reboot. The package name is sort of arbitrary as long as it's unique when submitting to marketplaces/installing on devices. You might have 'com.something.something.else' or 'org.something.anotherthing', it doesn't really matter as long as the structure's right.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 08:03 AM (13 years ago)
I'm going to first work through why the manual project I built in my BT Account (for Android) is skipping 2-3 top menus, displaying a lower end menu, which is not clickable. I do get these errors at that point in LogCat: In Red Print: Handling network change notification:CONNECTED MapActivity(298): Couldn't get connection factory client This is in the AVD - Google 2.2 / 8
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 08:54 AM (13 years ago)
I'm wondering if the problem has to do with this: MapActivity(298): Couldn't get connection factory client That the AVD can't/isn't connecting to the Map server. I built this manual App in BT account in May 2012. "itemType": "BT_screen_map", Works in iOS.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/16/12 09:20 AM (13 years ago)
When you say you built this "manual app," are you saying you coded it from scratch, instead of using the BT control panel to piece it together and then download the source code? Lots of time when a menu isn't clickable, it's because there is no screen attached to the menu item. So, if the user touches, there's nohwhere to go. And, for the menu items with no text, did you enter any? Mark
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 12:00 PM (13 years ago)
I'm not going to pursue making the manually built App from May work, that works in iOS, because apparently I did several things in XCode, that I have yet to get to in Eclipse. This Eclipse step has been a real dragged-out learning curve. Three occasions over 3 months, lots of do-overs. Trying to learn Mac Eclipse with old tutorials based on WIN, is tough. I'm half-way through the 3rd new Android lesson. I stopped because 1) it's WIN, 2) the audio volume is soooo painfully low, and 3) I was still numb from the length of the first 2. But I got my business work done today, and my grilled chicken salad at McD's was especially well (as in correctly) done tonight, so I am warm and happy in this 50°F weather here in southern England, and will move forward with the rest of the lessons tonight, to try to get to the next step. I'm a Mac person, but I know more people have various Android devices than iOS devices. I started collecting stats on my web sites of the OS and Browser of my viewers. So I'm going to put the focus on Android. Plus I have a long standing relationship with Amazon marketplace.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/16/12 12:03 PM (13 years ago)
I've used Eclipse on both Mac and Windows (primarily), and have not found them to be all that different. I can get the same thing accomplished basically the same way. Install is different for sure, but the rest is very similar. Post if you have specific issues we can answer, and we'll get you good to go! Mark
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 12:07 PM (13 years ago)
I'm not going to pursue making the manually built App from May work, that works in iOS, because apparently I did several things in XCode, that I have yet to get to in Eclipse. This Eclipse step has been a real dragged-out learning curve. Three occasions over 3 months, lots of do-overs. Trying to learn Mac Eclipse with old tutorials based on WIN, is tough. I'm half-way through the 3rd new Android lesson. I stopped because 1) it's WIN, 2) the audio volume is soooo painfully low, and 3) I was still numb from the length of the first 2. But I got my business work done today, and my grilled chicken salad at McD's was especially well (as in correctly) done tonight, so I am warm and happy in this 50°F weather here in southern England, and will move forward with the rest of the lessons tonight, to try to get to the next step. I'm a Mac person, but I know more people have various Android devices than iOS devices. I started collecting stats on my web sites of the OS and Browser of my viewers. So I'm going to put the focus on Android. Plus I have a long standing relationship with Amazon marketplace.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 04:45 PM (13 years ago)
Interesting way to end the day... Took all of the Android classes, after dinner. Learned stuff. Came away not feeling there were enough practical applications to my situation of wanting to get my BT Control Panel App to work, but in any event they reinforced what I understood from iOS in May. Didn't need the Lessons to do this: I ran Debug,,, window now said the JSON was invalid!!!! Same BT_Config.txt that runs fine on my iPhone. So I ran it through a JSON Validator, and it said there was commas missing between child items!!! So I pasted some in, and now it works in AVD! The menu structure, the screens, with and without .png graphic underlays... Pins drop on map, but map itself does NOT appear... just red pins on grey gridlines on white background. Fascinating! So now I need to consider why iPhone works fine? I certainly validated my JSON code during the process of studying the JSON structure, to create the PHP script that created the new BT_Config.txt JSON file, all of the []'s and {}'s, for all 300 Country, City, Type, Business listings... Do I risk breaking my iPhone App by changing the BT_Config.txt file it uses? or leave well enough alone until I get the Android App all sorted out? Although I am a Mac person, I did buy a £70 Android phone with Google's logo on the back of it, at VodaPhone when I last tackled this in July, so I'd have a physical device to test with. No service plan, yet, just a phone that does WiFi. I probably have a Pay As You Go SIM in it, that I could put £10 on tomorrow. I guess I should next figure out how to attach it to my computer and put the App on it?? Like I did with my Apple Developer account with my iPhone? Hopefully not as rigid as with Apple? I guess I'm looking for the good link to that!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/16/12 04:53 PM (13 years ago)
Something is amiss with your configuration file. If it's the exact same one as you got for your iOS app, which it should be, there should be no issues. You can also grab your config file by hitting the Configuration Data link in your control panel, copying that text, and pasting it into your BT_Config.txt file. It's all the same info. Map tiles won't show up in Android until you get your Google Maps API key and you create a signed APK for your app, and run it that way. It's a HUGE pain in the butt, but haven't been able to figure out a way around it yet. There are TONS of docs in the How-To section that show you ways to do most of this. Give them a read...bet they answer most of your questions. As for installing on your device...you can create an apk, email it to yourself on the device (or, put it somewhere like on DropBox and access it that way), and just tap it to install. Or, you can install via Eclipse. Mark
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 05:04 PM (13 years ago)
That's the direction I'll pursue tomorrow! I have had a Google Maps Key for 2 years now, its what I use in building my Library of Google Maps PHP/Java/JSON scripts, that I have written to manage my travels, contacts and customers. Would be interesting if one key fits all, or if I need to separate key for this. It's not a big deal either way. I'll pursue installing the App on the Android phone via Eclipse. In this part of England, there aren't an over-abundance of mobile phone stores, like in other UK cities. But I don't mind spending £10, it will last quite a while.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/16/12 05:09 PM (13 years ago)
This particular Google Maps API key is for Android apps. You have to obtain it using the MD5 fingerprint of the release and debug keys you'll sign your app with. So, unless you have done that already, it'll be different.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/16/12 05:11 PM (13 years ago)
Haven't done that yet. I'm glad you're providing the road map for navigating this...
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/17/12 07:05 AM (13 years ago)
I got my Google Maps API Key. I edited the strings file. (Instructions could have been a bit more straight forward). Set debug to false. (Instructions could have been a bit more straight forward). Still can't figure out how to Run the ADV to see the Map Tiles. ADV emulator-64.arm shows all the correct menu structure, the final screen of the Pins is still on a grey grid. I even tried zooming out, which sometimes is a trick to force refresh a Map Tile. I opened the same on my iPhone and the 12 Pins for Birmingham are in the right place, matching the 12 pins on the ADV - that has no Map Tiles. I exported a ADK (after changing true to false, and edited the API Key). On the ADV itself, there's no option to import the ADK file. I'm still looking for option in Eclipse to (somehow) put the ADK file on my Android phone. How To docs are kind of old. BTv1.5 and c1.4. There may be Tons of docs, but they could and should be sorted, as they are getting old. Old as in Archive is good, but old as in follow this for current release, is not necessarily - unless they have been tested going foreward.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/17/12 02:08 PM (13 years ago)
8 hours later, ADV still won't show Map Tiles. Got the Google Maps API Key, but Mark says I need 2 Keys - one for ADV and one for the real world. The Google reference method for getting the debug key fails. Eclipse installs the ADVs as .android files, and on Mac, . files are not that easy to see. Suggestion to find keystore MD5 Fingerprint is not found. Using Terminal works to get the real worls MD5, but trying the get the debug MD5 Fails.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/18/12 02:40 AM (13 years ago)
I had to wait 12 hours for my Under-18 web browsing Restriction to be removed from my £70 Vodaphone Google Android phone, BUT... The .apk installed and works! I sent the link to the .apk via e-mail to myself, clicked on the link, the phone downloaded the .apk, and after a couple of security warning screens that I had to OK to proceed, the App ran pretty much as it does on my iPhone. Only difference is the Map Tile(s) isn't as pretty, and one transparent .png isn't. So while I can't Run in Eclipse and see the Map Tiles, the App works on the phone itself. Now that I have that much success (reward), I can further develop the App, and further ding with Eclipse. I love Maps so probably will continue with Maps. I might try some other forms of media Apps, as well.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/18/12 02:46 AM (13 years ago)
Another thing I need to pursue: Android Tablet. Since iOS requires all those different images for regular and 2X double-wide retina devices, I need to figure out if my App runs on an Android tablet as is, or will I need to do more...? At the Voda store yesterday, after they initiated my Under-18 Restriction lift, they showed me the brand new Lenovo SmartTab II Android Tablets for £140. Smaller screen that iPad, smaller price. 4GB of RAM with a micro-SD slot for your choice of add-on portable memory. Does that mean, we can do file saving and uploading (and sharing between hardware) like we do with a portable USB drives with laptops/desktops?
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/18/12 02:49 AM (13 years ago)
And, what about the Nook and Kindle Fire hardware.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/19/12 03:08 PM (13 years ago)
So Sunday I got the apk on my Android phone, and am happy about that. Today, Eclipse broke! In the window, none of the 2 installed software packages (SDK & AVD) are shown. I went to Install New Software, and it said SDK was already installed! What super frustrates me about this, beyond what I documented above, is that I have to do the Eclipse step, to make the apk from the BT config. I completely make all the screens in my BT_Comfig.txt file myself... not in BT. Including constantly adding new Business listings to my App, not as an update to the App, but to the config.txt file on my server. There's a screen for each Country, Cities in a Country, Business Tyles in a City, and then the map of all businesses (by Type) displayed on the Map. So if I add a new business in a new country, city, the config.txt file makes the new Country screen... etc. very smooth, glad it works. Maybe someone else - even a Windows person - could make the apk file for me? My BT zip file is 1mb, including a barebones config.txt file! I host the fully featured config.txt file on my own server.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/20/12 02:29 AM (13 years ago)
So 12 hours later, Eclipse decided to launch properly, and include SDK and ADV in the Window menu! Was yesterday an Eclipse holiday?
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/20/12 02:45 AM (13 years ago)
So 12 hours later, Eclipse decided to launch properly, and include SDK and ADV in the Window menu! Was yesterday an Eclipse holiday? 15 minutes later this morning, I did the Project > Properties > Android > Google check box... Apply, Save, Project > Clean... Deleted the readme and instructions files, Project > Clean... and IT WORKS! Another day, another dollar.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/20/12 04:25 AM (13 years ago)
The new App works on my phone -- EXCEPT user location is not showing. This is my second Map App - the first is also on my phone, and user location is showing fine. Just tried it. The 3 permissions lines of code are in the Manifest, when I installed the App the phone asked if I wanted to allow location, and I keep tapping the Options button and Show Location. Sad.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/03/12 06:20 PM (13 years ago)
Just in passing, I recently obtained a Samsung Galaxy II 7" tablet so I could do my Android testing somewhat outside of the simulator... I've found (keeping in mind I haven't released anything, still testing much) that the Android version of my apps do fine without any modification, but I needed to populate both the "large" and "small" image choices when using images on your screens. I don't know about android phones with a smaller screen, but the tablet looks fine, provided you supply the resources it wants. Cheers! -- Smug
 

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.