Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 57

AussieRyan
Aspiring developer
Profile
Posts: 148
Reg: Mar 21, 2012
Margate, QLD Au...
1,480
10/25/12 10:50 PM (13 years ago)

ios or android logic

Is there a means to provide logic code to hide or show a screen depending on the operating system? eg The Contact Card screen is ios only. Is there a way to include it in the BT app but not show it in an android package?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/25/12 11:15 PM (13 years ago)
Hi, Because the plugin is iOS only, when you download the source code for Android, there should be no code for it included. However, because the data configuration file is shared by both Android and iOS, if you configure a screen for one, and use that same configuration file for both, then it'll try and show up on both. One solution would be to edit out the screen you don't want from the BT_Config.txt file, and use that for Android. The downside there is that the app is then no longer tied to the control panel, and so you wouldn't see your changes reflected immediately. This is indeed an issue if you want to use the same control panel for an app in both OSs, but the plugin only supports one. You'll either have to modify the JSON in the configuration file, or create two separate apps. Mark
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/26/12 06:19 AM (13 years ago)
I'm not a guru, but if I had seen a solution discussed in a forum , I would have tried to use it myself! If you use a plugin that works in one OS but not the other, this takes you down the road of creating separate android and ios versions of what is essentially the same app, which many people seem to do. The pro's of this are that you get a better experience on some devices. It means more work and if there are a lot of data 'over the air' updates planned, that can be an issue.
 

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.