lundi 1 mai 2017
dimanche 30 avril 2017
How to get Google Assistant on your Windows, Mac, or Linux Machine
Google Assistant is Google’s answer to Amazon’s Alexa smart home assistant. Initially only available with limited functionality in the Google Allo application, Google Assistant later rolled out with the Google Home and Pixel smartphones to bring the full power of Google’s assistant to consumers.
After a few months of waiting, smartphones running Android 6.0+ also received Google Assistant, and just a few days ago Google launched the Google Assistant SDK which allows Assistant to be run on basically any platform. Today, we will show you how to install Google Assistant onto your Windows, Mac, or Linux machine using Python.
Note: at this point in time, this is purely for educational purposes. There’s no fancy GUI for you to play with, and installing Assistant requires you to use the command line.
Get Google Assistant on Windows/Mac/Linux Machines
Requirements:
You’ll need to have Python installed no matter whether or not you are using Windows, macOS, or a GNU/Linux distribution. Installation is fairly simple and already well-documented by the Python wiki, so we won’t go into many details about getting Python up and running on your machine.
Once you’ve got Python working on your machine (you can confirm it is working by opening up a terminal/command prompt and then simply typing python.) If you see the terminal/command prompt return the current Python version on your computer, then you’re golden.
Next, before we can install the necessary files to get Google Assistant working, we need to enable access to the Google Assistant API in the Google Cloud Platform Console.
Configure the Google Assistant API
What follows are step-by-step instructions walking you through the process to enable the Google Assistant API in the Cloud Platform Console so you can access Google Assistant through the Python program. All of these steps are platform independent, meaning that the steps are the same for Windows, macOS, and GNU/Linux users.
- Go to the Projects page in the Google Cloud Platform Console.
- Click on “Create Project” up top.
- Name the Project “My Google Assistant” and click “Create.”
- Wait a few seconds for the Console to create your new Project. You should see a spinning progress icon in the top right. After it is done creating your Project, you will be brought to your Project’s configuration page.
- Click this link to go straight to the Google Assistant API page. Up top, click “Enable.”
- Google will warn you that you need to create credentials to use this API. Click “Create credentials” in the top right. This will take you to a setup wizard page where Google helps you figure out what kind of credentials you need to use this API.
- Under “where will you be calling the API from”, select “Other UI (e.g. Windows, CLI tool)“. For “what data will you be accessing” select the “User data” circle. Now tap “what credentials do I need?”
- Google should recommend that you create an OAuth 2.0 client ID. Name the Client ID anything you want, for example, your name + Desktop. Once done picking a name, click “create client ID.”
- Under “product name shown to users” enter “My Google Assistant.” Click continue.
- Click “done.” There’s no need to click download here as we only need the client secret, which we will download next.
- Now under the list of OAuth 2.0 client IDs, you should see the client ID you just made. All the way to the right, click on the download icon to download the client_secret_XXX.json file, where ‘XXX’ is your client ID. Save this file anywhere on your computer, ideally in a new folder called “googleassistant.”
- Go to the Activity controls page for your Google account and make sure that “Web & App Activity”, “Location History”, “Device Information”, and “Voice & Audio Activity” are enabled. This is so Google Assistant can actually read you personalized information.
We have now created a mechanism for a client, in this case our Windows/Mac/Linux machine, to access the Google Assistant API under our Google account. Next we need to set up the client that will access the Google Assistant API.
Install the Google Assistant Sample Python Project
Although Google recommends that you set up Python virtual environments to isolate the Google Assistant SDK and its dependencies from other Python system packages, we’re going to skip this step as it’s unlikely that you’ll play around with this for more than a few minutes. You can easily go back to the Cloud Platform Console and disable the API if you’re worried about the potential for other programs to access your Google account.
Open up a terminal/command prompt window and go through the following steps. First, enter this command:
py -m pip install google-assistant-sdk[samples]
You should see a whole bunch of dependencies being downloaded and installed when you enter this command. These are needed for the sample Python project to work. Wait for it to finish.
Once it’s done, next enter the following command (make sure to adjust the path):
py -m googlesamples.assistant.auth_helpers --client-secrets path\to\your\client_secret_XXX.apps.googleusercontent.com.json
In the command prompt, you will see a response telling you to visit a URL in order to authorize the application.
Copy and paste this URL into your browser. Select the same Google account that you used to configure the Google Assistant API. On the next page, you will see a text box that contains your client’s Access Token.
Copy that Access token and paste it into the command prompt where it asks you for the authorization code. If done correctly, you will see a response that your credentials have been saved.
Test the Google Assistant
The first thing you’ll want to test is whether or not Google Assistant is able to record audio from your microphone. Enter the following command into a command prompt, which will record 5 seconds of audio and play it back to you:
python -m googlesamples.assistant.audio_helpers
If you hear your audio played back to you, then enter this command to begin talking to Google Assistant:
python -m googlesamples.assistant
Wait for the command prompt to say “press Enter to send a new request”, then press Enter to begin talking to Google Assistant. After you’re done speaking, the command prompt will display a transcript of what you just stated and then play back the response. If you see a warning afterwards, just ignore it.
Have fun playing with Google Assistant on your Windows, macOS, or GNU/Linux machine! I played with it for only a few minutes before getting bored with it. It’s not particularly useful in this format, but it is a very quick demonstration of the possibilities that the new Google Assistant SDK represents. Perhaps we may see desktop apps or browser extensions taking advantage of this functionality in the near future.
from xda-developers http://ift.tt/2pxJBY6
via IFTTT
samedi 29 avril 2017
Speaki Reads your Notifications Out Loud using Android’s Text-to-Speech
Looking for an app that reads your notifications out loud? Check out Speaki by XDA Junior Member dEVshr. This free app reads your notifications out loud using Android’s Text-to-Speech capabilities. You can control when notifications are read out loud by restricting which apps to read from, which audio output device your phone is currently connected to, and choose whether or not to read the full notification content. There are some other features we’re glossing over, but check out the thread if you’re interested!
from xda-developers http://ift.tt/2qq7nCo
via IFTTT
Today Weather – The Best Weather App for S8, S8+ and AMOLED Displays
With everyone getting their new Galaxy S8 phones, we wanted to focus on a weather app that works great on AMOLED displays. Today Weather is a newer weather app that we reviewed a while back. This app is free on the Play store and features a dark theme that is perfect for the Galaxy S8’s AMOLED screen.
The simple design of this weather app also packs a huge amount of data in a small space. Using awesome little icon animations and graphs, the app will show you temperature, humidity, UV index, visibility, dew point and pressure.
We thank Today Weather for sponsoring this post. Our sponsors help us pay for the many costs associated with running XDA, including server costs, full time developers, news writers, and much more. While you might see sponsored content (which will always be labeled as such) alongside Portal content, the Portal team is in no way responsible for these posts. Sponsored content, advertising and XDA Depot are managed by a separate team entirely. XDA will never compromise its journalistic integrity by accepting money to write favorably about a company, or alter our opinions or views in any way. Our opinion cannot be bought.
from xda-developers http://ift.tt/2qip5Zi
via IFTTT
vendredi 28 avril 2017
F-Droid’s Android App Finally Gets a UI Makeover
While Android is based off of open source code, the same cannot be said of most of the apps that make the OS worthwhile to use. Most modern day smart functionality of Android is accomplished through closed source, proprietary apps. Considering the amount of data we store in our phones and the permissions we grant to these apps, there is little that can be done to conclusively trust these apps without studying their source codes.
F-Droid serves as an alternative to such scenarios, as it aims to provide Free and Open Source (FOSS) software on the Android platform. Think of it as a Play Store alternative, but with apps that are entirely free and have their up-to-date code up for inspection and even for building directly from the source code.
F-Droid has been around in the Android space since 2010, and the app’s UI has had minimal changes since its initial release. But finally, this changes with the upcoming v0.103 release of the F-Droid client.
The F-Droid team mentions that they have been hard at work bringing a modern UI to F-Droid. The newest update brings with it some long awaited and much appreciated feature additions:
- Screenshot and feature graphics
- Bulk download and install
- Improved notifications for downloads and pending updates
- Ability to translate apps metadata
F-Droid is conducting further field tests to ensure that usability issues with the new design are identified and resolved before the alpha releases for v0.103 is rolled out to the public. The team is also inviting feedback and suggestions to further improve the client. Additionally, the team mentions that this is one of the many improvements happening to the broader F-Droid ecosystem in 2017, and there’s more to come.
Do you use F-Droid? What do you like about it? Have you considered replacing Google Play and its services with FOSS alternatives? Let us know in the comments below!
Source: F-Droid Blog
from xda-developers http://ift.tt/2qg8lCa
via IFTTT
Announcing New Perks for Recognized Developers – Excel and Become One!
XDA was founded by developers for developers. To give our valuable contributors some form of recognition, we had decided to create a special title: those who work on custom ROMs, kernels, mods or applications can become Recognized Developers or Senior Recognized Developers. It’s a huge group of users, as right now over 700 of them are Recognized.
In the past few years, Android and other operating system underwent many changes. Back in the old days, creating a custom ROM required a specific set of near-esoteric skills. There were no guides or commits ready to cherry-pick. Things have changed drastically, and building a ROM is not that difficult if you know the basics and what to look for, and there are a plethora of guides floating around the Internet and within our forums that make learning much easier. Nevertheless, we would like to bring back some well-deserved glory to the Recognized Developer program.
For some of you, RD is just a title. While this is kind of true at the moment, there are a lot of perks coming with it:
- Increased private message quota
- Increased maximum signature size
- Increased attachment quota
- Ability to open/close your own threads
- Ability to delete tags on your threads
- Ad-free template (it’s MUCH faster)
- Access to the Recognized Developer Private Chat which provides:
- Share work-in-progress projects with fellow developers
- Communicate with fellow developers
- Communicate with members of the moderator and admin teams
- Free premium file hosting services
- Access to the XDA Build Server
- A special feature that will be available soon that will give RDs more control over their threads
Getting a Recognized Developer title isn’t easy. The Developer Committee is trying to find only the best candidates and give the title only to those users who truly deserve it. If you have any questions regarding the program, feel free to send us a message. Developer Committee members are Senior Moderators. They will be reviewing the applications, and they will apply disciplinary actions on developers that breach the forum rules and Recognized Developer Code of Conduct.
Plans, plans
We want a “Recognized Developer” to earn his or her title, it’s a reward for their hard work. If someone isn’t an active developer but holds the title, it can devalue that of others. To make sure the Recognized Developer title holds its meaning, unfortunately, we need to retire some of inactive developers. We are commencing a re-review process of current developers to find those who decided to quit our forum or focus on other things. We expect to finish the process in approximately one month. After this, we are hoping to expand the Senior Recognized Developer group. SRDs are the most skilled and experienced developers of our site. It’s really hard to get the title, as developers vote to nominate their colleagues to be promoted. We will, of course, inform you about the changes using the XDA Portal.
Sounds good. Sign me up!
If you believe that you should be recognized, feel free to apply using our application form. Before applying, take a moment to read the minimum requirements. Applicants that don’t meet the requirements will be denied and blocked from applying for 6 months. A candidate is expected to know how to code, follow licensing rules and guidelines, and maintain the threads actively. It’s also highly recommended to keep the OP of your thread clean and informative. Providing detailed changelogs is a good practice and keeps the thread free from pointless questions or spam.
Join our group, don’t be shy! We have cookies. If you have any questions, feel free to contact the Developer Committee members or post your comments in the section below.
from xda-developers http://ift.tt/2qfDzJp
via IFTTT
Pay What You Want: The Ultimate Android Development Bundle
This fantastic bundle of courses contains everything you’ll need to learn how to build Android apps. Explore 88 hours of content from 6 different courses valued at $861. Right now this is a pay-what-you-want deal for this hands-on deep dive into building and monetizing Android apps. Here are the courses included in this bundle:
- The Complete Android Developer Course: Go From Beginner To Advanced
- Android: From Beginner to Paid Professional
- How to Make a Freaking Android App
- Android App Development: Create a Streaming Spotify Clone
- The Complete Android & Java Developer Course: Build 21 Apps
- Android Mobile Apps: Beginner to Published on Google Play
Purchases made through XDA Depot benefit XDA. Our sponsors help us pay for the many costs associated with running XDA, including server costs, full time developers, news writers, and much more. While you might see sponsored content (which will always be labeled as such) alongside Portal content, the Portal team is in no way responsible for these posts. Sponsored content, advertising and XDA Depot are managed by a separate team entirely. XDA will never compromise its journalistic integrity by accepting money to write favorably about a company, or alter our opinions or views in any way. Our opinion cannot be bought.
from xda-developers http://ift.tt/2qnhEzo
via IFTTT
