Jump to content
Smartphone Gurus
Sign in to follow this  
SupremeAC

Recreating the Winphone 'Glance' screen in Android

Recommended Posts

The Guru    1,458
The Guru

This is indeed a cool project, might be an idea for you to write up the processes involved once completed.

Share this post


Link to post
Share on other sites
SupremeAC    3
SupremeAC

Update on my automate tinkering.

I haven't been able to sort the 'location get' issues out, Chi didn't prove very motivated to look into it.  My solution: I downloaded an app that shows you your location, and have it open up a few seconds before I try to fetch my location.  It isn't handsome, and leaves an extra app open (no closing apps without a rooted mobile), but at least it guarantees I get my location.  I then open up my home screen on top of it (through another app that emulates pressing the home button) and then close the background processes.

The 'personal activity' sensor, that checks if I'm driving or not is kind of iffy as well, so I've added a check to see if my phone connects to my car over bluetooth as to prevent false positives.  I've gone ahead and made the flow turn bluetooth on when I'm driving and off when I stop, I only ever use it to connect to my handsfree anyway.

So far the pitfalls, here's a short list of how the flow works:

- check if I'm driving
- switch Bluetooth on
- check if the Bluetooth connects
- when it disconnects, turn off bluetooth, boot up the location app, bring the homescreen to the front
- check if I'm at location 1 then bring up a menu asking if I want a ticket for a day, none, or a ticket that I need to cancel when I leave.
- if I'm not at location 1, repeat for location 2
- if I ask for a ticket for a full day, send the message, wait 24 hours and 5 minutes, and check my location again to see if I need a new ticket once the 24 hours have passed.
- If I ask for a 'regular ticket', send the message.
- wait for me to start driving again, turn bluetooth on and ask if I want to end the ticket, and end it automatically if I haven't made a choice after 150 seconds.
- repeat from start

I've polished it up over the last few days and will test it in the wild for the first time tomorrow.

And I've already started a new project: I'm creating an alarm clock that you don't turn off with a button, but by moving your phone.  Main reason for creating this is that I often turn off my alarm in the mornings when I mean to set it to snooze.  This way I can add in a failsafe so that the alarm keeps ringing every so many minutes if it detects that I just nudged it and didn't get out of bed and started moving myself and my phone about.

Share this post


Link to post
Share on other sites
tonybro    371
tonybro

Well done, again.

Keep us informed on how the testing goes.

Share this post


Link to post
Share on other sites
The Guru    1,458
The Guru

@SupremeAC Kudos here, you are doing sterling work. Have you looked at Tasker at all, supposed to be the best automation system and on reduced price offer at the moment - I bought it last night ready for testing out.

Share this post


Link to post
Share on other sites
SupremeAC    3
SupremeAC

Well, testing so far didn't go as hoped.  I have to rethink how I handle the bluetooth.  For some reason my bluetooth didn't switch off at one point, and it messed everything up.  Already made a few small changes, hope that everything is resolved now, but of course, I'll need to wait till tomorrow to be able to test again.

2 hours ago, The Guru said:

@SupremeAC Kudos here, you are doing sterling work. Have you looked at Tasker at all, supposed to be the best automation system and on reduced price offer at the moment - I bought it last night ready for testing out.

I stumbled upon Automate before I learned about Tasker.  As ever, Automate is free to a certain degree, which I do prefer.  I've bought it since though.  From checking the android app store pictures, automate seems like a much more visual experience, where you're dragging and linking your commands, where tasker just lists them?  One advantage seems to be that tasker allows for you to change what the home button and such do, which I haven't been able to pull off in Automate.
Automate is free up to 30 command blocks active at any time, so you can check that out as well if you're interested.  There's a lot of stuff the community makes that will run with less than 30 blocks.  You can even have both apps work together to some extent, as there's a block in automate that allows for tasker plug-ins of sorts.

Share this post


Link to post
Share on other sites
The Guru    1,458
The Guru

Thanks for that when I get around to doing the testing I'll look at Automate as well.

Share this post


Link to post
Share on other sites
SupremeAC    3
SupremeAC

My testing is starting to show better results now.  It managed to ask me for the ticket yesterday, after which it started a delay of 24 hours as I had chosen the ticket for a full day.  Up comes the next problem: I work in a concrete block, Automate can't get my location when I'm at work to check if I need a new ticket.  I'm going to add in a wifi check instead, to be tested next week.

Making progression with my alarm clock as well.  It's a bit tricky to get it working without automate checking the day of the week every second, but the 'smart snooze' is already working.  I'm sure I could do it neater if I knew how to actually program and could use some of the more advanced blocks and options.  Would love to keep this under 30 blocks so it's a 'free' flow that doesn't require a subscription.  I'm trying to add a notification as well that tells you for what day and hour the alarm is set.  It's possible to do so if it's set for just one day, not so sure I can pull it off if you'd set an alarm for say all weekdays.  Anyhow, the notification would definitely bring the app over 30 blocks.

Share this post


Link to post
Share on other sites
The Guru    1,458
The Guru

Cool, still not found time to do any more experimentation myself

Share this post


Link to post
Share on other sites
SupremeAC    3
SupremeAC

For me it's perfect as it's on my phone.  I can literally change a few blocks while waiting for water to boil when I'm cooking.  If this were on PC and I had to sit down to tinker with it, I wouldn't have been able to try out anything.

Share this post


Link to post
Share on other sites
The Guru    1,458
The Guru

Yep agreed, mobile solutions like this are ideal. Back in the days of yore (LOL) I used to love programming on the move on the Psion 5MX.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×