LightBlog

samedi 14 janvier 2017

Create an On-Demand Train Schedule/Delay Notifier with Tasker

Recently, we've shown you how to create profiles to save your parking spot or to start navigation while avoiding tolls/highways/ferries. Continuing our trend on commute-related Tasker scripts, we will create a script aimed at people who frequently use public transportation. This Tasker project will create a schedule of train departures and delays to give you the information you need to plan your commute. If Google Transit covers your particular locale, this profile should work for you.

For quite awhile now I have been trying to get the train schedules and delays on request.  I have noticed that Google Now can show you the train schedule and delay card, but the card isn't available until you actually reach the train station. I plan some of my journeys ahead of time and I find entering each train ticket to receive the "Leave Now" card very impractical. A few tests later I was able to display this card with a live train table on request, however, there were some caveats:


Limitations

Because Google Now tries to cleverly serve your information, cards are only displayed on your device when Google thinks you need it, not necessarily when you would actually like to see one. This means that there are situations when the card with the train schedules and delays may not be displayed even though you have a calendar event with a location in the same city within the next few hours! Removing the location from the event fixes that and the Google Now Card should report correctly.

While the train updates show up instantly, going back to the original location may take a few moments. Bear in mind that this will mess up your %LOC variable in Tasker until the next GPS fix is available. If these limitations do not bother you, then read on to implement this on-demand train schedule notifier!

You will need:
Android version: 4.0+,
Apps: Google App (with Google Now enabled)
Plugins:  AutoLocation, AutoToolsAutoVoice (optional)
Needs: Mock Location enabled (see developer options)


Train Schedule and Delays with Tasker

For the purpose of this tutorial I will split the request into two triggers:
Train schedules and delays Tasker

Dialog request

Manual Lookup

  Manual Lookup          Abort Existing Task          A1: AutoTools Dialog [ Configuration:Dialog Type: List  Title: Pick the train station  Icon: /storage/emulated/0/Material-Icons-011017-121644/res/drawable-xxxhdpi/ic_train.png  List Type: 0  Texts: Yarn,Manchester  Text Size: 20  Text Color: #E3F2FD  Button Text Color: #E64A19  Image Width: 100  Commands: 54.4939:-1.3516,53.4774:-2.2309  Dim Background: true  Top Margin: 16  Bottom Margin: 16  Bottom Buttons Top Margin: 16  Bottom Buttons Bottom Margin: 16  Close On Select: true  Separator: ,  Command Variable: atcommand  Cancelable: true  Turn Screen On: true Timeout (Seconds):60 ]           A2: Variable Split [ Name:%atcommand Splitter:: Delete Base:Off ]           A3: Variable Set [ Name:%lat To:%atcommand1 Recurse Variables:Off Do Maths:Off Append:Off ]           A4: Variable Set [ Name:%lon To:%atcommand2 Recurse Variables:Off Do Maths:Off Append:Off ]           A5: AutoLocation Mock Location [ Configuration:  Starting Mock Locations  Persistent Notification: true  Notification Title: We are set your location to %attext  Notification Text: Don't worry it will get cancelled soon.  Latitude: %lat  Longitude: %lon  Accuracy: 10 Timeout (Seconds):0 ]           A6: Variable Set [ Name:%LocationTimeout To:%TIMES+180 Recurse Variables:Off Do Maths:On Append:Off ]  


In this scenario, the coordinates for each station have to be assigned manually. This is a great way of adding your train stations for regular commutes. To start, we will need to use Google to find the exact coordinates for each station in question. Google Maps won't show you the GPS coordinates directly if a named location is displayed, but you can find it in the URL of the location. For example, the coordinates for Leeds Station is bolded in the URL below:

  http://ift.tt/2jjDxPC53.7943125,-1.5497304,17z/data=  

The Latitude is first (53.7943125) and the Longitude second (-1.5497304). We need to format it so we can use it with the AutoTools Dialog action:

  53.7943125:-1.5497304 (please note the colon)  

A1

My AutoTools Dialog action stores the names of the stations in the Text field (separated by comma) and the associated coordinates are stored in the Commands field  (also separated by comma):

  • Yarm, Manchester
  • 54.4939:-1.3516,53.4774:-2.2309

The dialog will be closed once the option is selected.  You can find this behavior in advanced settings.

A2-A4

I need to split these when the appropriate option is pressed and separate the coordinates with the splitter ':' (colon) Next, just store the %atcommand1 in %lat and %atcommand2 in %lon using two Variable Set action.

A5

These values will be used in the AutoLocation Mock Location action as the Latitude and Longitude entries. I will also pass the %attext in the associated notification because I'm fancy like that!
Accuracy of 10m is enough to get trigger Google Now's train card.

A6

Lastly, I will create a timeout by setting the variable %LocationTimeout to %TIMES+180 (or however long in seconds you wish to keep the fake location on for). Select 'do math'. That action will trigger our canceling profile later.

Voice request

Voice Request

  Profile: Lookup any Train station          Event: AutoVoice Recognized [ Configuration:Command: "show me trains at*. (regex)" ]  Enter: AutoLocation lookup (81)          A1: AutoLocation Info [ Configuration:Coordinates Search Query: %avcommnofilter  Coordinates Max Results: 1 Timeout (Seconds):60 ]           A2: AutoLocation Mock Location [ Configuration:  Starting Mock Locations  Persistent Notification: true  Notification Title: I'm pretending that you are at %avcommnofilter  Notification Text: I will reset the location soon  Latitude: %alcoordenatelatitudes1  Longitude: %alcoordenatelongitudes1  Accuracy: 10 Timeout (Seconds):0 ]           A3: Variable Set [ Name:%LocationTimeout To:%TIMES+180 Recurse Variables:Off Do Maths:On Append:Off ]   

A1

The AutoLocation profile is used to get the coordinates of the train station. I'm limiting the results to one entry only. This way I will know where in the %alcoordenatelatitudes() and %alcoordenatelongitudes() arrays. (Please note the spelling mistake in the variable – this is how AutoLocation names the variable. The developer is aware of this and plans to fix it in his next update.)

Profile

To pass the name of the train station, I'm using the AutoVoice Recognize event. The command filter is: show me trains at*. (regex)  (using the hard way option). The name of the train station will be stored in the %avcommnofilter variable, which is used to perform the AutoLocation Info action for the coordinates search.

A2

Once the coordinates are known, I simply use the AutoLocation Mock Location action again to start the mock location service with Latitude = %alcoordenatelatitudes1 and Longitude = %alcoordenatelongitudes1 (I would limit my results to 1 for more precision).

A3

Lastly, I'm adding the same action Variable Set as mentioned earlier to trigger the end of location spoofing. Set the %LocationTimeout to %TIMES+180 (or however long you want to wait before timing out).

Cancel Location Spoofing

Cancel the location spoofing

  Profile: End fake location (84)          Time: From %LocationTimeout  Enter: Cancel fake location (82)          A1: AutoLocation Mock Location [ Configuration:  Stopping Mock Locations Timeout (Seconds):0 ]           A2: Variable Clear [ Name:%LocationTimeout Pattern Matching:Off ]  


A very simple task in which the AutoLocation Mock Location gets unchecked and canceled, and the variable %LocationTimeout is cleared.


Conclusion

Sadly the Train schedules and delay Tasker profile can't be used for now to get the same information from coach stations. I hope this will change in the future. I find this project to be a very handy solution whenever I want to check the status of a train I'm trying to catch.

Download the project file on AndroidFileHost!

In order to import a Tasker project file, download the above file and save it anywhere in your internal storage. Open up Tasker and check to make sure that "beginner mode" is disabled in the preferences menu. Then, long-press on the "home" icon in the bottom left hand corner and click on "import". Find the prj.xml file you saved earlier, and select it to import it. You will now see a new tab in the bottom row containing all of the profiles and tasks we referenced in this article.

We hope you enjoy this little creation of ours, and let us know if you think we can make any enhancements!



from xda-developers http://ift.tt/2juZngX
via IFTTT

vendredi 13 janvier 2017

Pure Nexus ROM on the Pixel XL

In this video, Miles shows us one of the most customizable ROMs available for the Pixel XL. Pure Nexus is one of the hottest ROMs for Pixel XL right now and it's definitely ready to be your next daily driver.

One of the highlights of this ROM is the Substratum integration. This theme engine is a favorite among the XDA community and offers so much in customization options. You'll also find tons of tweaks for your lock screen, notification menu, status bar, navigation bar, power menu and more.

"The Pure Nexus Project aims to bring stability and features to your Nexus/Pixel device, while keeping Google's vision in line and not straying too far away from that. If you are looking for a stable ROM with true tested features and minimal bugs, then this is the place to be."

BeansTown106

To see a full list of features and download this ROM for yourself, see the official XDA thread.

Download



from xda-developers http://ift.tt/2jgfEJe
via IFTTT

Google Maps v9.43.2 Update Integrates Ridesharing Service Uber

Whether it be to avail promotional discounts on whichever service is offering one currently, or it be to look for lower surge pricing, or simply for checking which provider has the nearest cab: a lot of us rely on information from multiple apps to get the best deal for our needs. Google Maps v9.43.2 brings all such information into one convenient place — right on our maps. A past update to Maps displayed limited information regarding estimated price and driver info, but the newest update increases the scope of the information displayed. You can see the location of all drivers around you across different services displayed pictorially on the map, along with bifurcations for different types of cab rides.

Ridesharing service integration goes one step further if your primary choice is Uber. The latest update to Google Maps allows you to book a ride, track your driver, complete, and pay for the ride without ever leaving Maps — even if you do not have Uber installed on your phone!

Google has put together a video depicting the whole process:

You do need to sign into your Uber account, or make a new one to make use of the integration. Google Maps also has useful information regarding your destination such as business hours and menus, so you are always informed about relevant information regarding your destination throughout your journey.

The update to Google Maps has begun to roll out for both Android and iOS. Google's announcement post does not mention integrating other ridesharing providers such as Lyft as of now, but we can assume functionality will expand to include the service in the near future.


Source: The Keyword



from xda-developers http://ift.tt/2iQKGnD
via IFTTT

Smart Home & Home Automation Protocols Guide: Creating Your IoT Paradise

Smart home popularity has risen substantially over the past few years, and even the past few months. CES 2017 set the scene for another small explosion of these devices as Apple, Google, and Amazon all expanded their smart home ecosytems – albeit at different rates – with Amazon's Alexa assistant boasting the most growth.

Thrust into the spotlight by the success of voice-assistant enabled speakers such as the Amazon Echo and Google Home, the devices which they control have now taken center-stage. Sharing that attention, is the all too obvious struggle to maintain continuity between these technologies. With so many systems and protocols employed in the pursuit of home automation, the plight of the consumer is much like that of the creators – find a lasting and useful standard.

In the ongoing effort to help technologies find their proper homes, here's the definitive guide to the IoT enabled home – as it stands today. Let's start with a breakdown of the five main technologies being used to create these ecosystems.

 1. Wi-Fi

Pros: No central hub required. Supports AES 256-bit encryption.

Cons: As always, speed and signal strength are dependent on your router and your internet service provider – a dependency that may not be ideal for some. It's also the most resource-heavy protocol, demanding more power, and consequently larger size from products which are often battery powered and require a small footprint.

Notable devices/platforms: WeMo Philips Hue Apple HomeKit Samsung Smartthings Insteon*

*Insteon uses a combination of RF and power lines, aiding reliability in the event of an obstructed pathway. Unfortunately, this benefit isn't applicable to devices such as door locks, which must work on RF only. Security and interoperability are chief concerns here. On this subject, Insteon says the following:

"Possible encryption methods include rolling-code, managed-key, and public-key algorithms. In keeping with INSTEON's hallmark of simplicity, rolling-code encryption, as used by garage door openers and radio keyfobs for cars, is the method preferred by INSTEON."

Insteon

2. Bluetooth/Bluetooth LE

Pros: No central hub required. AES 128-bit encryption.

Cons: Bluetooth/BLE is limited to its usual 30-foot radius, not only creating the issue of dead zones but also disqualifying it from controlling any devices which are not within its range, i.e. turning off lights or locking doors when the user isn't home.

Notable devices/platforms: Apple HomeKit

3. Z-Wave

(Communicates via the 908MHz and 916MHz frequencies)

Pros: Uses a mesh network which means more devices, more coverage and no signal degradation. Utilizes AES-128 symmetric encryption, and an open source code.

Cons: Central hub required. May lose support as protocols advance.

Notable devices/platforms: Samsung Smartthings Over 1,500 interoperable devices, including a host of light switches, locks, and sensors.

4. Zigbee

(Communicates via 915MHz and 2.4GHz frequencies)

Pros: Uses a mesh network. Utilizes AES-128 symmetric encryption, and an open source code. Built on the IEEE 802.15.4 radio standard, Zigbee potentially has a leg up in future compatibility with IP-based protocols.

Cons: Central hub required.

Notable devices/platforms: Nest Samsung Smartthings Over 1,100 interoperable devices, including some set-top cable boxes, and a host of light switches, locks, and sensors.

5. Thread

Speaking of compatibility and future protocols, Google (and a fair amount of other companies) have entered into development of what they hope will become the standard smart home protocol – Thread.

Pros: Uses a mesh network and AES-CCM cryptography. Built on the IEEE 802.15.4 radio standard, Thread has a version of open source code and natively supports IPv6, allowing it to be controlled by internet protocols such as LTE, Wi-Fi, and Ethernet. Using an adaptation layer called 6LoWPAN, Thread can communicate with non-IP devices, namely those using Zigbee – not only offering a level of backwards compatibility but also potentially eliminating the need for a hub.

Cons: Not yet released – seemingly dependent on the successful rollout and integration of other Google services, specifically Android Things and Weave.

Meant to be a standard operating system for smart home devices, Android Things (formerly Brillo) is the stripped-down version of Android which Google hopes to implement underneath Thread-enabled devices. On top of this, they hope to integrate Weave as the bonding agent for other radio and smart device technologies, new and old.

It may sound like a tall order, but if the success of Android Things meets Google's expectations, the layering of this, Thread, and Weave would provide an infrastructure wherein API's are shared across platforms and updates can be rolled out by developers OTA – enabling a level of support and security heretofore unseen by most smart home devices.

Notable devices/platforms: Nest Samsung Smartthings

Voice Assistants

Amazon Echo, Google Home, and other voice-assistant-enabled devices can be both useful and fun as standalone products. Providing users with everything from current events, weather, and note taking, to music, interactive games, and shopping – all done through voice – these assistants are no doubt capable and ripe for expansion.

Google Tops Amazon in Search, No Surprise.

Right now, Google Assistant commands an unsurprising lead over Alexa in search functionality, not only finding more answers but also enabling the user to ask follow-up questions in a more conversational manner. For instance, asking Google Home "Who is the President of the United States?" gives you the answer "Barack Obama." As a follow-up question, you can ask "Does he have any children?" In response, Google Home will provide you the appropriate answer. Unfortunately, you must preface any follow-up question with the wake-up command "OK Google" – an already clunky phrase which serves to degrade this feature, especially. Topic-specific focus can continue for a series of questions with Google's assistant. Attempting this same line of questioning with Alexa, however, will require you to restate the subject in the question each time. This aside, the search functionalities are relatively equal.

Amazon Takes the Lead in IoT

When it comes to compatibility and support, however, Alexa has some distance between it and the pride of Mountain View. Having been released nearly 18 months ago, the Amazon Echo and Alexa are 16 months older than Google Home and its built-in assistant. In that time, Amazon has taken every opportunity to allow Alexa to be developed and integrated – free of cost, which has certainly paid off. In addition to being freely integrated by any manufacturer who's interested, Alexa has enjoyed over 5000 new skills made by developers via the Alexa Skills Kit (ASK). These skills added a wealth of abilities, including additional device fluencies and expanded app integration.

This past November, Amazon also granted developers access to Amazon Lex, which facilitates creation of Amazon-connected chatbots by leveraging the speech recognition and natural language processing technologies on which Alexa is built. Though Google has recently taken similar actions, Amazon's earlier start remains evident in the Echo's device compatibility and widespread use of its Alexa service.

Meanwhile, the fight for Google Assistant on non-Pixel smartphones rages on. As of yet, unwilling to extend support to OEM Android phones, Google appears to be taking the opposite approach with their voice-assistant. The company does invite developers to create for the platform but does not offer free implementation as Amazon does – only recently announcing integration with the handful of devices running (or soon to be running) Android TV. Google has hinted at upcoming implementations of their proprietary assistant, though how quickly and widespread this may be remains to be seen.

"Over time, you'll also see the Assistant come to other new surfaces, like smartwatches running Android Wear 2.0, Android-powered in-car infotainment systems and many other types of devices…"

Sascha Prueter, Director Android TV

Communication With All Devices

Unfortunately, neither the Echo nor Google Home possess smart home connectivity beyond Bluetooth and Wi-Fi. As such, a communication hub of some kind is needed for most setups. When picking a hub, it's important to consider your goals, be they simplicity or customizability. A hub worth considering should, at the very least, be compatible with Wi-Fi, Zigbee, and Z-wave to offer the best range of compatibility. Samsung's Smartthings Hub is popular for this very reason. Although a handful of others exist, Smartthings offers the most customization and the most partnerships. A lesser known competitor may be the Wink Hub, offering the same protocols at a slightly lower price. The Wink hubs greatest asset, however, is also its greatest weakness, as its simplicity results in less customization. Again, choosing the proper hub will come down to your personal preference, but for all intents and purposes the Smartthings hub will not disappoint. Pair this with some Zigbee/Z-wave outlets and light switches, and you're well on your way. You can also add in motion sensors, water leak sensors, door locks, and Wi-Fi cameras all with specified rules and actions defined within the Smartthings app. One such rule may include instructions to turn off the lights, lock the doors, and enable a security camera when a specific phone leaves the house.

Sadly, IR capability is one feature you won't yet find in these hubs, effectively excluding entertainment systems from basic home-automation. For now, an additional hub – the Logitech Harmony Hub – is required. To console you for buying this extra hub, Harmony made sure to make it worth your while. Able to learn every function for nearly any IR device in existence, the Harmony Hub can control air conditioning, heaters, lights, sound systems and more – essentially sweeping up any devices left over by the Smartthings or Wink hub.

Once you have all your devices plugged in and configured, simply run a discovery in the Alexa app and everything you've connected can now be controlled via voice-command – even changing channels –  thanks to the Smartthings, Wink, and Harmony Skills made for Alexa. Currently, Google Home only supports one of these hubs – Smartthings and as such requires a few IFTTT recipes to bridge some of the gap. In the instance of the Harmony Hub, IFTTT can only add the ability to turn your entertainment system on or off. Channel/volume control, and other IR devices cannot be controlled. Though it's to be expected that Google will soon add Harmony Hub support, as of right now, it remains on the sizeable list of devices that the Echo has and Google Home doesn't.

Speaking of IFTTT, if you don't already use it, you may want to get familiar. IFTTT can enable some stunningly seamless automation from your phone, Echo, or Google Home. For instance, a simple IFTTT recipe for Alexa can create a Google Docs spreadsheet of every song you play through the Alexa app. Or you can tell Google Home to block out an hour on your calendar. Using Evernote or Onenote? Set up IFTTT to take dictated shopping lists from Alexa and save them instantly into your preferred note-taking app. Through IFTTT [almost] all things are possible.

But what about Apple HomeKit?

Ah, yes. HomeKit. Though this year's CES saw a flurry of new HomeKit-enabled devices (and surely many more to come) Apple is still quite far behind. Lacking support for Zigbee, Z-wave, or any of the aforementioned hubs, HomeKit is relegated to proprietary systems like Insteon (who provide their own HomeKit-enabled hub) or other HomeKit-specific devices. Running only on Wi-Fi and Bluetooth LE, HomeKit devices do not require a hub unless the user desires device control when away from home. For this, the user must have a third-generation Apple TV (or higher) set up as their HomeKit Hub. The creation of a proper Siri Hub remains to be seen.

The Fragmentation of Things

Though the Internet of Things still has a fair amount of fragmentation, this does not preclude a fully working, useful smart home solution. There are currently thousands of reliable and easy-to-set-up devices on the market and most of them have a "Z" in their name. Not so coincidentally, the hub you'll need to control them is internet connected. Add in voice-controlled AI, and you have all the workings of the smart home that science fiction always promised us. Might a new standard come along and banish these devices to the land of obsolescence? Not any time soon. At this juncture, it seems the winning horses have already been picked, earning the coveted prize of future interoperability. If you choose wisely, you can share in that glory. Or, if you'd like to be a part of it now, follow the links below to begin developing.

Think another winner is set to emerge? Please share in the comments below.

Useful Links



from xda-developers http://ift.tt/2iQGAfa
via IFTTT

HTC Will Only Release 6 or 7 Phones in 2017

At the recent launch of the HTC U Ultra and U Play in Taipei, Engadget's Richard Lai interviewed Chialin Chang, HTC's President of Smartphone and Connected Devices business. During the interview, Mr. Chang confirmed that HTC is only planning to release 6 to 7 smartphones during 2017.

The move will be a significant drop in the number of phones launched by the company compared to recent years. Chang reports that the idea behind this is to allow HTC to focus on the core features of their phones, and therefore release higher quality products to contend with other manufacturers. Chang went on to say that the main selling point of these devices would be their machine learning integration, which several OEMs are currently experimenting with. No other major Android device manufacturer produces so few phones each year, as Samsung for example released over 30 phones in 2016.

According to Phandroidthe number of devices that HTC has released in previous years are as follows:

  • 2016: 15 Phones
  • 2015: 25 Phones
  • 2014: 34 Phones

It is no secret that HTC has been struggling financially and this move could help assuage the problem. Q3 for 2016 saw the Taiwanese company make operating losses of NT$2 Billion ($63.3 million USD) and net losses after tax of NT$1.8 billion ($57 million USD).

It will be interesting to see how this works for HTC and hopefully they can release a few great phones rather than a large number of average ones. The U Ultra and U Play look to be a good start for HTC though and if you are interested in either device be sure to visit the HTC U Ultra and U Play forums!

Source: Engadget



from xda-developers http://ift.tt/2jscP51
via IFTTT

Google Adds Private Channel Apps to the Managed Play Store

Towards the end of last year, Google rebranded their Google Apps for Work platform into G Suite. They've been doing this to a few of their technologies lately, for whatever reason, but things have been business as usual for the Mountain View tech giant.

They recently announced App Maker for their G Suite customers, acquired a company to help improve the audio quality of their Hangouts users, and this week they've announced a change to the managed Play Store.

Google allows companies who pay for G Suite services to develop unique applications for their employees. This is where the App Maker came into play as it helped these businesses deploy an application much faster than before. These applications were considered private, but were still available in the Play Store application. They were just hidden in a secret tab that was labeled the same name as the company.

Google wanted to make these applications easier to access, so they have moved them into a category called Work Apps. Instead of being the last category within the Play Store, this category has moved into the 3rd position (which is right after Top Charts and Games). They want to use this Work Apps category as a place to store all the applications your employee may need in order to get their job done.

So instead of only listing private applications here, the G Suite admins will be able to add in a list of public applications as well. Google has also made it so that there is no longer a need to manage different access controls for employees. The controls for the private and public applications within this Work Apps category will be consolidated in the managed Play Store and there will be a simplified whitelisting process for mobile applications.

Source: G Suite



from xda-developers http://ift.tt/2iPTxpu
via IFTTT

Galaxy S7 & S7 Edge are Finally Receiving their Android 7.0 Nougat Update (Currently for Beta Testers)

Samsung has been doing a beta test for their Nougat update for a couple of months now. Many people hoped that they would have started this beta test earlier (since Android 7.0 officially released in August of last year, after all), but they didn't announce their first beta test of the update until around November.

This seemed a big strange since Google began doing developer tests of the update all the way back in March of last year.

Google did this to let Android developers test out the new software and get their apps ready for the update, but they also did it so that OEMs could get their hands on the update faster. Their attempt to help OEMs push out the major update wasn't as successful as they had hoped, though. Samsung waited a little over 2 months after the official release to even publicly beta test their update, and it took them an additional 2 months to start the official roll out.

But thankfully that time has come. We're starting to see screenshots circulate around the community that show the new OTA update is being pushed to them. The screenshots SamMobile has published showcase an update from the Nougat beta to the final version (which is just under 215MB in size). We haven't seen any screenshots showing that they are pushing out the Nougat update to current Marshmallow users though. If you were on Marshmallow and received the Nougat OTA update, we would love to hear from you.

So even though Samsung delivered the update later than some were hoping for, they actually beat their own schedule. The beta software team over at Samsung said they were planning on rolling out the update sometime around the 17th of this month. This could be when Marshmallow Galaxy S7 and Galaxy S7 Edge owners start getting their OTA update, but either way it looks like they were done a week early.

Source: SamMobile



from xda-developers http://ift.tt/2jfcV2M
via IFTTT