Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 20    Views: 140

magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
05/12/12 11:30 AM (13 years ago)

Instruction screen at start-up

Does anyone know if it is possible to present a user the first time they open a BuzzTouch App with a screen instructing them to do a refresh? The "Refresh Dialog" does not appear the first time you download the App. And being caching quite an issue in the otherwise awesome Buzztouch architecture, I wonder if there are smart ways to give on screen instructions to a first time user. Thanks very much for the attention.
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/12/12 11:37 AM (13 years ago)
Hi magister. I do not know how to display a screen only once, but I use a splash screen with brief instructions on it and a (fake) button for users to push to move on to the actual app. Just use -1 in the transition of the splash screen.
 
magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
like
05/12/12 12:02 PM (13 years ago)
That's very, very cool. I love the ingenuity Red Dog. But I do not quite understand how to do it. What would I do, starting from my actual splash screen, that is just a logo that stays on for 4 seconds and fades away in 3 seconds? Which screen do I assign the -1 to? Thanks for taking the time to answer.
 
magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
like
05/12/12 12:08 PM (13 years ago)
Sorry, I did not read the instructions properly. It's hour number 14 (of work) today :) Thanks very much.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/12/12 12:19 PM (13 years ago)
I like that solution, but perhaps we could take it up a notch. Home Screen a HTML doc with instructions. Make the HTML doc, Word doc, Image, Button Menu one (button) with instructions. When the user updates App would refresh and cache update. Second time user would see the results of the cached Config file. Fred
 
magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
like
05/12/12 12:34 PM (13 years ago)
That is excellent Fred. I will work on it and see if I got what you mean. I try right now. Thanks for taking the time.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/12/12 12:40 PM (13 years ago)
I rewrote the steps, find it in my Guide MySkylla'a Guide to Buzztouch www.MySkylla.com HTML > Buzztouch & JSON FRED
 
magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
like
05/12/12 11:15 PM (13 years ago)
Thanks Fred and Red Dog. I actually found the solution I was looking for, by copying in XCode the configuration txt file as it is on the Buzztouch control panel. It should be highlighted BIG time, as a MUST do for anyone using Buzztouch and publishing in an App store. If first impressions are the most important anybody missing this could give a very bad first impression. And having a paid app that is not performing straight away as you intended, could put you out of business before you even start. Happy I found out the week before I submitted. Thanks again to all.
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
05/12/12 11:50 PM (13 years ago)
You can also do one thing. I have Added EULA. After the user install the app, when they open your app first time they will see a pop-up screen with terms/Condition or say instructions etc. Here are the steps how can you do that . . . 1. first open notepad and write what ever you want to display. 2. save the file name as EULA in Assets folder with "no extension" means .txt should not be their. 3. now create a new class inside "src>your_project>" namely Eula.java and write the following code .......................................... //package com.google.android.divideandconquer; package com.yourpackagename; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.SharedPreferences; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.Closeable; class Eula { private static final String ASSET_EULA = "EULA"; private static final String PREFERENCE_EULA_ACCEPTED = "eula.accepted"; private static final String PREFERENCES_EULA = "eula"; static interface OnEulaAgreedTo { void onEulaAgreedTo(); } static boolean show(final Activity activity) { final SharedPreferences preferences = activity.getSharedPreferences(PREFERENCES_EULA, Activity.MODE_PRIVATE); if (!preferences.getBoolean(PREFERENCE_EULA_ACCEPTED, false)) { final AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setTitle(R.string.eula_title); builder.setCancelable(true); builder.setPositiveButton(R.string.eula_accept, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { accept(preferences); if (activity instanceof OnEulaAgreedTo) { ((OnEulaAgreedTo) activity).onEulaAgreedTo(); } } }); builder.setNegativeButton(R.string.eula_refuse, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { refuse(activity); } }); builder.setOnCancelListener(new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface dialog) { refuse(activity); } }); builder.setMessage(readEula(activity)); builder.create().show(); return false; } return true; } private static void accept(SharedPreferences preferences) { preferences.edit().putBoolean(PREFERENCE_EULA_ACCEPTED, true).commit(); } private static void refuse(Activity activity) { activity.finish(); } private static CharSequence readEula(Activity activity) { BufferedReader in = null; try { in = new BufferedReader(new InputStreamReader(activity.getAssets().open(ASSET_EULA))); String line; StringBuilder buffer = new StringBuilder(); while ((line = in.readLine()) != null) buffer.append(line).append('\n'); return buffer; } catch (IOException e) { return ""; } finally { closeStream(in); } } private static void closeStream(Closeable stream) { if (stream != null) { try { stream.close(); } catch (IOException e) { // Ignore } } } } ................................................. 4. Open your BT_screen_menuListSimple or menuButton there find the onCreate function line no 120 copy and paste "Eula.show(this);" after "BT_debugger.showIt(activityName + ":onCreate");" Example :- ................................. //onCreate @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); this.activityName = "BT_screen_menuListSimple"; BT_debugger.showIt(activityName + ":onCreate"); Eula.show(this); ...................................... That's all .. .
 
magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
like
05/13/12 12:02 AM (13 years ago)
That is very professional stuff! Thanks a mighty lot. And explained step by step is the way to go, when giving tech instructions. Often tech brained people make the mistake of assuming others understand them. Yes, eventually they do, but it's just a matter of how long it takes. Isn't it? Will try your suggestion immediately and report back. Thanks again, very appreciated.
 
magister
I hate code!
Profile
Posts: 66
Reg: Feb 16, 2012
firenze
660
like
05/13/12 12:24 AM (13 years ago)
There is only two entries in this forum regarding EULA. I am in XCode and do not quite understand how to translate: "create a new class inside "src>your_project>" and the: "Eula.java and write the following code .......................................... //package com.google.android.divideandconquer; package com.yourpackagename; import android.app.Activity; import android.app.AlertDialog; __________________________ in IOS language. Will try to work it out. Thanks.
 
Yash Kumar
buzztouch Evangelist
Profile
Posts: 66
Reg: Jan 29, 2012
Jharkhand
660
like
05/13/12 12:31 AM (13 years ago)
Sorry no idea about XCode :(
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/13/12 07:21 AM (13 years ago)
@Yas Kumar, excellent. @Magister, yes the Config file needs to be updated before you publish. But by using the method I described above you can display a screen only when the app is opened the first time. Fred
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
05/17/12 07:36 PM (13 years ago)
Fred, I want to try what you suggest, but can't find the right article in mySkylla.com. Will you give a complete url? Thank you!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/17/12 07:53 PM (13 years ago)
MySkylla'a Guide to Buzztouch www.MySkylla.com GUIDE > JSON, HTML, JavaScript & CSS > Buzztouch & JSON Solely as it sounds but since I use Dropbox my URL don't post correctly.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
05/17/12 08:18 PM (13 years ago)
Thank you, Fred! Found it. I am not sure I get it yet. Is this part right: The home screen that is displayed when the user first downloads the app will be an html screen. The html screen asks the user to refresh the app by touching the page--maybe just a screen that shows a fake "Touch here to enter" button, (so the user wouldn't really know they were refreshing the app). This solves the problem of the necessity to refresh the initial downloaded app when the user doesn't see the request to refresh. Do I have this part right? The part I don't get is how you have this html screen only display the first time the app is opened. Thank you for your help with this, Fred.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/17/12 08:51 PM (13 years ago)
SIMPLE app : home screen - HTML doc package the app and publish Now create rest of the app. Home screen - Menu Item 1 - item 2 - item 3 - User opens app sees HTML doc When app is updated user sees menu with 3 items HTML doc could be one of the three items but doesn't have to be. If not linked to a screen it's still in the app, but user has no access to it.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
05/18/12 07:40 AM (13 years ago)
Thank you, Fred. I get it now. The published version is only one page....forever. The user immediately refreshes, and goes to the real app. Quite a brilliant solution. As my dad would say, it uses "creative ingenuity" to solve a problem. Anything new added to the app would need to be linked as url's. Has anyone got this past the App Store approval process? Not sure it would fly with Apple. An approach may be to file the one page, enter all of the real app data, and then the Apple reviewer would see the final app when he/she refreshed to review it. Every app I have submitted has taken exactly one week to approve.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/18/12 07:55 AM (13 years ago)
It doesn't have to be one page. It could be the entire app. Example : Home screen - Html doc Right bar Nav button takes you to rest of app. When you refresh the app is resorted. Fred
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
05/19/12 10:58 AM (13 years ago)
I think I get it. I put code in the home screen that when executed not only refreshes but resorts the app at the same time. It is beyond my coding skills today, but maybe not soon! It would be a great solution to the initial refresh problem. Thank you, Fred!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/19/12 12:22 PM (13 years ago)
This is a non-coding solution. All the user has to do is refresh the app's data. All you have to do is package the app with the older Config file. When you update the menu structure, after copying the older Config file into the Source Code, in the Control Panel you have set up the app to update. Fred
 

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.