Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 109

farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
02/14/13 04:02 AM (12 years ago)

How to use geo block with buzztouch

Hi guys, I need to use a geo block on a Buzztouch app, is it possible? The app should only be used from within UK for legal reasons. I have searched on Google and nothing relevant came up. Any wizard out there with a possible solution pretty please? Thanks, Farcat
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/14/13 04:36 AM (12 years ago)
You will need to access core location to find where the phone is, you cannot force this upon the user as it will pop up allow core settings or whatever. For this reason it may not work. The likes of BBC iplayer are blocks it due to there server picking up where it is being streamed to from there backend and then decides whether to stream or not.as an example. As privacy rules are very strict you can't alter this using the device. You could set up a custom screen, a button that will ask them to enable core location settings, if it matches the device location it will progress to the next screen if not it will provide an error message. But remember these things can always be got around
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/14/13 05:15 AM (12 years ago)
If you don't mind, explain to me what 'Geo-Block' is... Is it 'blocking' a region from something? Is that what you're asking? Basically you'll need to 1) Set you app NOT to work unless you get coordinates... 2) Setup your app to obtain coordinates 3) Do the math to ensure the measured coordinates fall between points (typically north-west to south-east that are worked into a "geo-fence" rectangle. 4) Proceed to the app if valid, send them to a 'sorry bout that' screen if not valid. I did this fooling around with Windows and Vehicle trackers last year... But not Mobile apps. You can also limit which country your app is distributed within the App store... Can't remember about Google Play.... Cheers! -- Smug
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
02/14/13 05:33 AM (12 years ago)
@Farcat You know that on iOS you can just select UK release only within your developer console on iTunesConnect, same goes for Play. I know that doesn't answer as users could leave the country with the app on their phone but just checking that you are aware! What is the nature of the content that you want to block, is it the entire app or certain screens such as video etc. If the content is hosted on your server as opposed to being native in the app there are a few dirty workarounds/solutions, some paid some free, some complex and some simple. If it is hosted web server content have a look at your .htaccess to block countries other than UK from accessing the data. So do the block server side as opposed to getting your hands dirty in corelocation and so on. Off topic... @Kittsy One of the best wee workarounds I have come across since I moved to US is a browser extension in Firefox called FoxyProxy. With a couple of other bits of magic thrown in it allows me to stream iPlayer over here. I don't watch a lot of TV but did miss aunty beeb. 7am here, off to walk coffee and drink some puppy.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/14/13 06:26 AM (12 years ago)
@macapple yeah geofencing is ok for everday app users but if people want the content they will find a way to get it
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
02/14/13 06:29 AM (12 years ago)
Thanks all for your great (and quick) feedback, as usual! Please allow me to elaborate: 1- The app will contain some online content (games,server hosted) that can be used in UK only per law. 2- All the other screens should be accessible by everyone. I know that I can restrict the app to UK iTunes but it is not enough. So the intended effect is: you open the app from outside uk you get a prompt to allow location. If you allow location while outside UK you can only access the other screens but not the games screen. If you allow location while in UK you will have access to all content. The client would prefer a native solution (to block through .htaccess is the next best option). @Kittsy, setting up a custom screen sounds like what I want to do. How would I go about it? @SmugWimp, thanks for your suggestions. I am going to need to question you all all of these points now... :) Thanks, Farcat
 
Suvinay pawa
buzztouch Evangelist
Profile
Posts: 599
Reg: Aug 01, 2012
location unknow...
9,890
like
02/14/13 06:34 AM (12 years ago)
i dont know about ios but in android you can upload location based apk.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
02/14/13 08:41 AM (12 years ago)
Hey, you can setup the app to load a diferent bt_config file depending on their location. You have two config_files (two apps in the control panel, or not) and one is the complete version with all the content for UK users if in the UK, and one for users outside the UK. I'm working on a plugin for this, but will still be a while. Cheers. Miguel
 

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.