NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
11/01/15 07:52 AM (9 years ago)

The app doesn't work without an internet connection. It used to.

Hi all, I'm redoing my app under Android Studio. I don't know if the difference I'm noticing comes from Studio vs Eclipse or from a change in the buzztouch config. As it worked with Eclipse : On the first use, the user needs internet to download some pdfs from buzztouch server. Once they're downloaded, the user can open the app and the pdf without internet connection. If the pdf is not downloaded, the user can still open the app without internet connection and walk in it, but not open the pdf. Now with my redone version with Studio : No matter what, if the internet connection if off the user cannot open the app and sees the message "There was a problem loading the app's configuration data. See the Output Console in your development tool (Eclipse, Android Studio, etc.)" The logcat says it's failing to connect to Buzztouch.com . Why does my app require a connection to Buzztouch.com at the opening ? It didn't need to before ? Looking at the log and this message, it points to the BT_config.txt in Assets, but I can't tell if it's really those lines that might cause the problem. "dataURL":"https://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA88C46BFEB9557C70C6FDC4C&apiKey=4874A25B78F3B2D65803A32&apiSecret=BB4830444A33F2D3ADFC2C1", "reportToCloudURL":"https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA88C46BFEB9557C70C6FDC4C&apiKey=4874A25B78F3B2D65803A32&apiSecret=BB4830444A33F2D3ADFC2C1&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "registerForPushURL":"https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA88C46BFEB9557C70C6FDC4C&apiKey=4874A25B78F3B2D65803A32&apiSecret=BB4830444A33F2D3ADFC2C1&deviceId=[d Any idea ? Thanks !
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
11/01/15 08:24 AM (9 years ago)
If I suppress those 3 lines, the app does open without internet connection, but am I doing anything wrong somewhere else ? I don't really understand them. Cheers Nico
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/03/15 09:28 AM (9 years ago)
A little known resource I found invaluable was the BT documentation for v1.5 http://www.buzztouch.com/docs/v1.5/ granted, not 'all' of the information applies, but 90% of it still does, or is only slightly different to accommodate some new apple/android feature or limitation or update. The 'dataURL' is the app data, aka 'BT_config.txt', updated from the server for the latest copy. Normally what you'll want to do is paste the most recent copy of the 'json configuration data' from your control panel, and updates from that point can be 'over the air' as needed. What is 'supposed' to happen is the initial config file is read into cache, and used. each time the app is started, 'if' a connection is available, it checks for the latest version of the config data... but you're right. It shouldn't balk just because the resource isn't available. (FYI, I found a fix for the Live/Debug mode as outlined in this post: http://www.buzztouch.com/forum/thread.php?tid=D406249C46561CC4ABDF570&currentPage=1) The 'report to cloud' URL is basically just a statistics URL that gathers information and puts it in your database for things like the map, etc... the 'register for push' is only needed if you utilize push notifications. With few exceptions, all of my apps are kind of designed for offline use as much as possible, to save on the users data plan, if any. I haven't played with it 'recently', but my last released app (around July for Android) didn't have that problem. That was my last released project on eclipse though, and although I'm plodding through learning Android Studio, I haven't released anything out of it yet. So, the short answer is you don't 'need' those URLs. depending on how you want to present your app. The biggest drawback is no updates other than through the Play/App store. Mark wrote a decent tutorial on it that should be located here: http://www.buzztouch.com/resources/Understanding_App_Refresh_and_Offline_Apps_v1.0.pdf Let us know how it goes... Cheers! -- Smug
 
NicoRacing
Lost but trying
Profile
Posts: 78
Reg: Oct 25, 2013
Hyeres
3,680
like
11/03/15 11:44 PM (9 years ago)
Hi smug, Thanksnfor the info. I've released that app removing those three lines. I didn't think about the update issue so we'll see if that becomes a problem. I have to update another app soon (similar to the other app but different language) so I'll put my head into it and try your suggestions and come back on the topic. Cheers! Nico
 

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.