Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

FREE Android app - Garda safety vans

  • 03-06-2011 1:58pm
    #1
    Closed Accounts Posts: 17


    Hi all,

    I've written a free (yes, free) app for Android that warns you when you are in range of one of the new Garda Safety Van zones.

    I posted this in another internet forum (not borads.ie) and didn't want to cross-post, but it got a good reception and since it's free and something of use I assume it's ok to let people know, if not, mods feel free to re/move this post.

    The app is on the android market and is called Irish Safety Camera Locations, be gentle and hopefully I get some positive feedback.
    It's simple, but effective, & requires no data usage - so it costs nothing to use. The app uses your GPS location to determine if you're close to one of the zones - and warns you if you are.
    It ain't all singing, it doesn't even dance, it just does the safety camera zones!

    It's part of a college project I'm doing and it'd be great if people left comments or gave ratings (hopefully good ones :D ) on the android market.

    Thanks, enjoy the bank holiday weekend, and keep 'er lit,
    Al

    P.S. Note it doesn't include Gatsos, or the tens of thousands of places someone might be standing at the side of the road with a hairdryer - it'd be ringing in your ears all the time if it did


Comments

  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Feel free to kill people.

    edit: Am kinda jealous, none of my apps are this dangerous :(


  • Registered Users, Registered Users 2 Posts: 9,060 ✭✭✭Kenny Logins


    Stuck on 'installing database', with no option to cancel/quit.


  • Registered Users, Registered Users 2 Posts: 1,906 ✭✭✭deckie27


    what phones is it tested on?


  • Closed Accounts Posts: 17 althinking


    Stuck on 'installing database', with no option to cancel/quit.
    Hi Kenny,
    It should take 90 seconds or less for the database to install.
    My brother had a similar issue (HTC Desire iirc) with the database install. His phone had been having problems previously though - it was running slow, wifi icon wouldn't show etc. He uninstalled some of the dodgy apps he had, rebooted his phone, and the install went fine.
    Let me know how you get on.

    In any event, I'm working on speeding up the database install.

    Thanks,
    Al


  • Closed Accounts Posts: 17 althinking


    deckie27 wrote: »
    what phones is it tested on?
    I tested it on a Nexus One.
    Any issues let me know, I want to sort them out :)

    Edit: other guys in class tested it on their phones, don't have a list of the types though.

    Al


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Show a progress bar if it's downloading stuff, otherwise people will think it doesn't work.


  • Registered Users, Registered Users 2 Posts: 9,060 ✭✭✭Kenny Logins


    HTC Desire, and this is the dodgy app. :P


  • Registered Users, Registered Users 2 Posts: 29,089 ✭✭✭✭_Kaiser_


    it installed ok on my Desire HD - did take about 2 minutes for the database to install - but can't test how effective it is yet as Im in the office right now :)


  • Closed Accounts Posts: 17 althinking


    HTC Desire, and this is the dodgy app. :P
    lol, touche! It's been fine on his phone since, just the install glitch. That's 2 out of 200+, still that's two too many.
    Did the reboot and retry work? If not, can yo let me know the exact type of Desire you have please?
    srsly78 wrote: »
    Show a progress bar if it's downloading stuff, otherwise people will think it doesn't work.
    That's true. There is a progress dialog while the app installs the database. The problem here is the dialog stays there - from what I can tell it doesn't get the "I'm finished" message.
    The database install is done locally on the phone. Once the app is downloaded to the phone from the market - it doesn't connect to the internet ever again.

    Al


  • Registered Users, Registered Users 2 Posts: 1,906 ✭✭✭deckie27


    about 3 minutes and still oging on installing database

    HTC Desire

    Edit: finished install OK after about 4-5 mins


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,060 ✭✭✭Kenny Logins


    When the database install fails there is no option to quit, and you're left with the notification icon. Is it downloading separately? Can it be packaged with the app?


  • Registered Users, Registered Users 2 Posts: 9,060 ✭✭✭Kenny Logins


    Check your manifest, I don't see internet permissions on this...

    Never mind, read posts above ^^


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    althinking wrote: »
    lol, touche! It's been fine on his phone since, just the install glitch. That's 2 out of 200+, still that's two too many.
    Did the reboot and retry work? If not, can yo let me know the exact type of Desire you have please?

    That's true. There is a progress dialog while the app installs the database. The problem here is the dialog stays there - from what I can tell it doesn't get the "I'm finished" message.
    The database install is done locally on the phone. Once the app is downloaded to the phone from the market - it doesn't connect to the internet ever again.

    Al

    In your "handler" for the progress event messages you need two different events:
    a) update progress
    b) finished

    Put breakpoints to make sure your finish message is being caught. If you got part (a) working then (b) is almost the same, just a different message payload. Also you will need a partial wake lock to make sure download finishes if user locks phone. Screen may timeout+lock in middle of download otherwise.


  • Closed Accounts Posts: 17 althinking


    deckie27 wrote: »
    about 3 minutes and still oging on installing database

    HTC Desire

    Edit: finished install OK after about 4-5 mins
    Great, definitely need to try speed that up.
    When the database install fails there is no option to quit, and you're left with the notification icon. Is it downloading separately? Can it be packaged with the app?
    The notification icon indicates that the service is running on the phone i.e. that it's checking your location against the database of locations. You're absolutely right about packaging the DB with app, I'm trying to find out how to do it or even it's even possible. It'd be the best solution though!
    Re the download - there's no downloading form the internet. The app doesn't have permission to access the internet. So there's no need to worry about the app using your data connection. The database install is parsing the locations (from a local file on the phone) and writing them to the database (also on the phone).
    Having a cancel option on the install is something I should also look at. Good point!

    Kaiser2000 wrote: »
    it installed ok on my Desire HD - did take about 2 minutes for the database to install - but can't test how effective it is yet as Im in the office right now :)
    Cool.

    Really appreciate the feedback guys :)
    Al


  • Closed Accounts Posts: 17 althinking


    srsly78 wrote: »
    In your "handler" for the progress event messages you need two different events:
    a) update progress
    b) finished

    Put breakpoints to make sure your finish message is being caught. If you got part (a) working then (b) is almost the same, just a different message payload. Also you will need a partial wake lock to make sure download finishes if user locks phone. Screen may timeout+lock in middle of download otherwise.
    Interesting, could the timeout & lock interfere with the install process - it's all local to the phone? My bro' did say this phone timed out during the initial install. Hmmm.

    @Kenny
    How is the install going?
    Can you let me know the values for the Storage used by the app? They are listed at:
    Settings > Applications > Manage Applications > Safety Camera Alert > Storage
    The values for Application & Data are what I'm looking for.

    Thanks and sorry the install didn't go smooth for you :o
    Al


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Yeah if your app doesn't request a wake lock it will get put to sleep along with everything else. Careful tho, misprogrammed wake locks can cause app to waste battery while phone is asleep. You only want wake lock during your install process, not during normal usage I would assume.

    http://developer.android.com/reference/android/os/PowerManager.WakeLock.html


  • Registered Users, Registered Users 2 Posts: 1,906 ✭✭✭deckie27


    Application 284kb
    data 136kb


  • Closed Accounts Posts: 17 althinking


    deckie27 wrote: »
    Application 284kb
    data 136kb
    Thanks - that's spot on. When my bro' installed it, the DB installed ok, it was just the notification hadn't been dismissed. So the numbers were correct.

    @srsly78 thanks. Yep, wake-lock just during install. It operates fine normally with the phone asleep; I've left it running for hours with the phone asleep and the safety zone notification was activated when in range.

    Al


  • Closed Accounts Posts: 17 althinking


    Props to @srsly78 it looks like the long-install is simply down to the screen timing out and thereby pausing the installation of the database. Will keep an open-mind in case there is a separate issue with HTC Desire.

    To test it on my nexus one I changed the Display Timeout from 2 mins to 15 seconds. So I left the phone alone and let it sleep, checked after 6 mins and again after 9 mins, and I managed to make the install last 10 minutes.

    The good thing is the database was installed correctly, it just took longer because the phone was asleep.
    For now I'll update the app description to advise people the install takes longer if the phone sleeps. I'll also work on the wake-lock solution, as well as optimising the db install (or package the DB with the app if possible).

    Thanks for the feedback guys, any more is most welcome.
    Have a safe and penalty-point free long-weekend :)
    Al


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    YW. Sounds like it's not actually pausing, just going reeeeallly slow. This is because the CPU clocks itself down when asleep. You are being a bit naughty tho and not respecting the sleep event (likely because your database loading is blocking your main thread) :) Would be bad in normal operation, but for a once off during install it's ok.

    Wake lock is just three lines of extra code dude:
    WakeLock lock = new WakeLock();
    lock.acquire();
    dostuffthattakesfookinages();
    lock.release();
    


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 10,912 ✭✭✭✭28064212


    Good concept app, but a couple of things would make it so much more useful:
    • Have the screen wake up when you're entering a zone. I often have the screen off when I'm driving, and probably won't hear the notification
    • More difficult, but would really make it an amazing app. The notification should appear when you enter a zone and disappear when you leave it. As it is, you don't know whether you're in it or not, and even if you're probably past it, you have to actually dismiss the notification if you want to be warned of the next one

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Closed Accounts Posts: 17 althinking


    srsly78 wrote: »
    Wake lock is just three lines of extra code dude:
    Cool, will work that in and include permissions.
    28064212 wrote: »
    Good concept app, but a couple of things would make it so much more useful:
    • Have the screen wake up when you're entering a zone. I often have the screen off when I'm driving, and probably won't hear the notification
    • More difficult, but would really make it an amazing app. The notification should appear when you enter a zone and disappear when you leave it. As it is, you don't know whether you're in it or not, and even if you're probably past it, you have to actually dismiss the notification if you want to be warned of the next one
    Thanks for the feedback. I like your suggestions, I had considered the second, but not the first.

    Waking the screen up when you enter a zone is definitely doable, the tricky part might be letting it know when to sleep again, this kind of touches on your second suggestion about letting you know when you exit a zone.
    I could implement a solution to the exit problem that would work in most, but perhaps not all scenarios; this could also dismiss the warning notification.
    I think I'd have to put the "wake-screen up on alert" as an option - it might not be something suitable to night-driving e.g. if you have a wind-screen mounted phone and you're driving a back-road at night with no street-lights and suddenly the phone switches on with full-brightness it could dazzle the driver. :eek:

    Aside:
    Currently the app will warn you every 15 seconds* when you are within a zone. So on a long zone you will get reminders, basically multiple alerts. Some zones are short, some are a few miles. The reminders let you know to, er, go safe :) But yeah, there's no explicit "you have left a zone", you just get no further reminders.

    * If you haven't travelled more than 200 meters since the last warning it won't repeat the warning. So if you're stuck in traffic

    Thanks again, now for the Ireland game!
    Al


  • Registered Users, Registered Users 2 Posts: 6,259 ✭✭✭Rowley Birkin QC


    Not sure exactly how it's supposed to work but I live in the middle of one of the zones and it doesn't seem to be alerting me.


  • Closed Accounts Posts: 17 althinking


    Not sure exactly how it's supposed to work but I live in the middle of one of the zones and it doesn't seem to be alerting me.
    Hi Rowley.
    If it picks up your location from the GPS signal and you're within about 250m of one of the zones* it'll sound.

    * It can happen (e.g. on long straight stretches of road) that you are in a zone, but not within 250m of one of the 'waypoints' for that zone, and it won't alert you until you get within 250m of a waypoint.

    Also you could check to make sure the database was created correctly:
    Settings > Applications > Manage Applications > Safety Camera Alert > Storage
    The value for Data should be in the order of 136kB

    Let me know how you get on,
    Al


  • Registered Users, Registered Users 2 Posts: 6,259 ✭✭✭Rowley Birkin QC


    althinking wrote: »
    Hi Rowley.
    If it picks up your location from the GPS signal and you're within about 250m of one of the zones* it'll sound.

    * It can happen (e.g. on long straight stretches of road) that you are in a zone, but not within 250m of one of the 'waypoints' for that zone, and it won't alert you until you get within 250m of a waypoint.

    Also you could check to make sure the database was created correctly:
    Settings > Applications > Manage Applications > Safety Camera Alert > Storage
    The value for Data should be in the order of 136kB

    Let me know how you get on,
    Al

    Hi, the van parks directly across from my front gate and the alarm isn't sounding when I start the service.

    I'll test it out again tomorrow and get back to you.


  • Closed Accounts Posts: 17 althinking


    28064212 wrote: »
    Good concept app, but a couple of things would make it so much more useful:
    • Have the screen wake up when you're entering a zone. I often have the screen off when I'm driving, and probably won't hear the notification
    • More difficult, but would really make it an amazing app. The notification should appear when you enter a zone and disappear when you leave it. As it is, you don't know whether you're in it or not, and even if you're probably past it, you have to actually dismiss the notification if you want to be warned of the next one

    Last night I released version 1.1 with a couple fixes and an enhancement:
    1. I've included the wake-lock to prevent the phone (CPU specifically) from sleeping during database install. The screen can still sleep during install, but not the CPU. Thanks to @srsly78 for this suggestion :)
    2. Fixed a bug where enabling GPS caused an error on some phones.
    3. Added a "Check Database" button, which will check the database is ok.
    "Listen to your users" was what the lecturer said, so that's what I'm doing (I hope!).
    @28064212 I'm planning on implementing both of your suggestions. So if it's technically possible to do them - then I hope to do them both (fingers crossed). :)

    Al


  • Registered Users, Registered Users 2 Posts: 9 Google_Android


    althinking wrote: »
    Great, definitely need to try speed that up.

    The notification icon indicates that the service is running on the phone i.e. that it's checking your location against the database of locations. You're absolutely right about packaging the DB with app, I'm trying to find out how to do it or even it's even possible. It'd be the best solution though!
    Re the download - there's no downloading form the internet. The app doesn't have permission to access the internet. So there's no need to worry about the app using your data connection. The database install is parsing the locations (from a local file on the phone) and writing them to the database (also on the phone).
    Having a cancel option on the install is something I should also look at. Good point!


    Cool.

    Really appreciate the feedback guys :)
    Al

    This is a very good idea for an app but I to had issue's with it very laggy and rely slows the phone down had to uninstall in the end But keep me posted and I would be happy to download it again.


  • Registered Users, Registered Users 2 Posts: 1,260 ✭✭✭harpstilidie


    Seems to work ok on my ZTE Blade, great idea!

    A couple of suggestions...

    I think it going off every 250m is too short a distance, can be really annoying and my brother who was in the car with me told me to turn it off :)

    I think it would be better if it alerted you as soon as you went into a zone and then made a different sound when you exit the zone.

    Apart from that, great job!


  • Closed Accounts Posts: 17 althinking


    This is a very good idea for an app but I to had issue's with it very laggy and rely slows the phone down had to uninstall in the end But keep me posted and I would be happy to download it again.
    */Me sounding like a proud parent* "Now that's a first, _my_ app would never do that!", lol. Seriously though, I'm really surprised to hear that. One of the main design considerations was making the app ultra-lightweight. It installs at less than 424kB, while running uses 4MB or less of RAM, and is asleep most of the time - it only gets a wakeup call from the GPS about 4 times every minute. If it's running for hours it still uses only seconds of CPU time.
    Needless to say I'd like to know the cause, especially if it is my app, so if you could give a bit more info I'd appreciate it:
    When you say it was 'laggy', how so? There's no moving images or anything in the app.
    Can you check the CPU usage? It should be available from:
    Settings > Battery Use > Safety Camera Alert > CPU total/foreground
    What make/model phone is it?
    Thanks again!
    Seems to work ok on my ZTE Blade, great idea!

    A couple of suggestions...

    I think it going off every 250m is too short a distance, can be really annoying and my brother who was in the car with me told me to turn it off :)

    I think it would be better if it alerted you as soon as you went into a zone and then made a different sound when you exit the zone.

    Apart from that, great job!
    Thanks. Yes I've got the feedback from a few quarters that the repetitive alarms are annoying more than helpful, so I'm changing that for the next release. A different sound when exiting a zone is popular too, so will be incorporating that too.
    Great to hear it's working well :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 15 scouserT


    Very good app, thanks.

    Presumably this updates when new locations are available?

    I like the bit about not sounding if you haven't travelled more than 200m since last alert. However, what happens if for example you're walking or cycling and you enter a zone ... d'ya get the initial alert?

    Anyway, the repetitive alarm thing is annoying. Agree it'd be better to have a different alert on exit.

    BTW, install of v1.0 on my Xperia probably took 5 - 7m but I let it sleep.


  • Closed Accounts Posts: 17 althinking


    Thanks @scouserT yes I can rollout a new update to the database if there are new locations (not sure the Gardai intent to do that, but if they do it's no preblemo.)

    Al


  • Closed Accounts Posts: 17 althinking


    I released version 1.2 this morning with 4 updates that should improve things:
    (The app is here, web market takes time to update; it's on the app market search for irish safety camera locations)
    1. When entering a zone: Screen wakes up (if asleep).
    2. When going through a zone: a short beep will periodically remind you; i.e. by popular demand - no repeating sirens, lol!
    3. When exiting a zone: The Warning Notification will automatically cancel itself, and give an audible alert, and the screen will sleep (if it was asleep before the alert).
    4. If GPS is disabled when the app starts, it will ask you if you want to enable GPS & bring you to the Settings screen.

    N.B. I tested having silence during a zone, but found that on long zones where it's a couple of minutes driving I wondered if the app was doing anything. I knew it was because I looked at the output on the laptop, but I found the beep reassuring that it was still detecting. There will be 4 or less beeps per minute.

    Hope this makes the app better to use, tbh enjoyed it more. It still ain't perfect, but it's improving imho.
    Thanks for you suggestions and please be generous with your rating on the app market :)

    Al


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    Consider possibly making the delay and notification noises user configurable.


  • Closed Accounts Posts: 17 althinking


    Slaanesh wrote: »
    Consider possibly making the delay and notification noises user configurable.
    Absolutely. From feedback I'm getting people want choice & customization:

    So the next release will have options so you can tell the app what do when entering a zone, while in a zone, and when exiting a zone. The options will be whether to play a sound, vibrate, switch screen on; each of which will be customisable for each of the above 3 scenarios.
    I'll also try to include picking the sounds from the sounds already on your phone. - it seems the siren is love/hate, so choice is power.
    [bugfix] I'll also get it to respect the mode the phone is in (silent/vibrate).

    Al


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Can I get the icon in corn-flower blue please?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,324 ✭✭✭tallus


    Working fine on my Desire HD.
    Thanks OP.


  • Registered Users, Registered Users 2 Posts: 169 ✭✭Lochlannach


    I seem to be having an issue with this on my desire. I installed yesterday evening and started the service (and gps) when leaving the office. My drive home takes me through two of our "safety" camera zones and I got no alert for either. Tried it again this morning but no better. It doesn't seem to be locking the gps - i.e. the icon seems to be constantly in search mode. As soon as I fire up anything else that uses the gps it is fine? Anyone have any similar issues?


  • Closed Accounts Posts: 17 althinking


    I seem to be having an issue with this on my desire. I installed yesterday evening and started the service (and gps) when leaving the office. My drive home takes me through two of our "safety" camera zones and I got no alert for either. Tried it again this morning but no better. It doesn't seem to be locking the gps - i.e. the icon seems to be constantly in search mode. As soon as I fire up anything else that uses the gps it is fine? Anyone have any similar issues?

    Hi Lochlannach,
    Firstly, thanks for the feedback :)
    1) Can you check the database is 100% (from version 1.1 on there's a button to do this)
    2) The app needs to have visibility of GPS satellites to get a location fix; so locating it on the car windscreen is optimal. Having it on the centre console tends to give unreliable GPS fix - unless of course you have an open-top car lol
    3) The app periodically checks the location - so it will tend to check - get a fix - wait - check - etc. If it can't get a fix then it will persistently blink while it searches.
    4) I've just released version 1.2.1 this evening - it contains a minor bug fix to do with playing media files - so not related to the issue you're reporting.

    Let me know how you get on.


  • Registered Users, Registered Users 2 Posts: 169 ✭✭Lochlannach


    1) Database confirmed as 100%
    2) I mounted it on the windscreen in the same way as when using it as a satnav. I also confirmed that the satnav software (sygic) was able to get a gps lock at the time I noticed the issue with this app.

    I will be travelling to and from Mayo tomorrow and therefore will be crossing in and out of several zones - I intend to use this as an opportunity to test the app and will post up tomorrow night with my results.


  • Registered Users, Registered Users 2 Posts: 6,344 ✭✭✭Thoie


    Just installed it on the HTC Desire Z and the install went OK. I'll take it out on the road for a trial tomorrow, there's a zone not too far from me so will see what happens.

    I pressed the "Test" button and nearly went through the roof though - glad I tried it out before hitting a zone or I might have crashed the car :) I was expecting a gentile beep, or a "You are entering a safety camera zone".


  • Advertisement
  • Closed Accounts Posts: 17 althinking


    I just road-tested the latest version (1.2.1) and it's working as expected.

    fwiw I always test the app before publishing it, when satisfied I publish it, then download the updated version directly from the app market and road-test it again.
    But there are so many different android platforms and potential bugs it's always possible something will pop-up. It's very helpful to developers when a bug is reported (hit the Report button). When you do that, the developer gets (anonymous) info indicating where in our code the bug appeared - then we can try fix it :)


  • Registered Users, Registered Users 2 Posts: 169 ✭✭Lochlannach


    Right I further tested this app on the road on Saturday. I'm not sure what happened the previous time I was attempting to use it but it worked fine for my Kildare - Mayo - Kildare run.

    I have a slight question mark over the accuracy of the detection of the zones. In Mountmellick I was apparently in a zone all the way through the town but there are in fact two zones at either end of the town - it may be that it tracked me as entering the zone one end though in reality I use the roundabout at the beginning of the zone from another direction and then didn't "let go" until I got out through the zone the other end of the town?

    Something else I noticed was the app doesn't appear to distinguish between the route being travelled and any crossing routes which may have zones on them. An example is the zone on th R417 which crosses the M7 near Monasterevin. The app gave me a warning while travelling on the M7 whereas the zone is on the R417. I must also check sometime whether it gives another false positive on the M7 between Newbridge and Kildare town - the zone is on the old Dublin road but this runs right beside the motorway.

    I would agree with the requests to make the alerts user configurable. I would also like to see the notification be a little more obvious - maybe a pop-up of the camera icon - as with the radio on it's not always easy to hear the notification and just having the screen turn on is not all that noticeable?


  • Closed Accounts Posts: 10,012 ✭✭✭✭thebman


    Would be great if you could integrate this to Navit.

    Their dbus page is here:
    http://wiki.navit-project.org/index.php/Dbus

    Would be awesome if you could get it to popup a message on this or something along those lines :)

    You can hop on their IRC to get more info I guess. I was on there earlier and they are friendly and helpful on IRC.

    I was talking to them about getting Loc8 integration so if we could get this and Loc8 integrated, Navit would be sorted for Ireland ;)


Advertisement