Showing posts with label world. Show all posts
Showing posts with label world. Show all posts

Connect With the World Around You Through Nearby APIs

| 0 comments |

Posted by Akshay Kannan, Product Manager

Mobile phones have made it easy to communicate with anyone, whether they’re right next to you or on the other side of the world. The great irony, however, is that those interactions can often feel really awkward when youre sitting right next to someone.

Today, it takes several steps -- whether it’s exchanging contact information, scanning a QR code, or pairing via bluetooth -- to get a simple piece of information to someone right next to you. Ideally, you should be able to just turn to them and do so, the same way you do in the real world.

This is why we built Nearby. Nearby provides a proximity API, Nearby Messages, for iOS and Android devices to discover and communicate with each other, as well as with beacons.

Nearby uses a combination of Bluetooth, Wi-Fi, and inaudible sound (using the device’s speaker and microphone) to establish proximity. We’ve incorporated Nearby technology into several products, including Chromecast Guest Mode, Nearby Players in Google Play Games, and Google Tone.

With the latest release of Google Play services 7.8, the Nearby Messages API becomes available to all developers across iOS and Android devices (Gingerbread and higher). Nearby doesn’t use or require a Google Account. The first time an app calls Nearby, users get a permission dialog to grant that app access.

A few of our partners have built creative experiences to show whats possible with Nearby.

Edjing Pro uses Nearby to let DJs publish their tracklist to people around them. The audience can vote on tracks that they like, and their votes are updated in realtime.

Trello uses Nearby to simplify sharing. Share a Trello board to the people around you with a tap of a button.

Pocket Casts uses Nearby to let you find and compare podcasts with people around you. Open the Nearby tab in Pocket Casts to view a list of podcasts that people around you have, as well as podcasts that you have in common with others.

Trulia uses Nearby to simplify the house hunting process. Create a board and use Nearby to make it easy for the people around you to join it.

To learn more, visit developers.google.com/nearby?utm_campaign=nearby-api-714&utm_source=gdbc&utm_medium=blog.

Read More..

Young people who are changing the world through science

| 0 comments |


(Cross-posted on the Google for Education Blog.)

Sometimes the biggest discoveries are made by the youngest scientists. They’re curious and not afraid to ask, and it’s this spirit of exploration that leads them to try, and then try again. Thousands of these inquisitive young minds from around the world submitted projects for this year’s Google Science Fair, and today we’re thrilled to announce the 20 Global Finalists whose bright ideas could change the world.

From purifying water with corn cobs to transporting Ebola antibodies through silk; extracting water from air or quickly transporting vaccines to areas in need, these students have all tried inventive, unconventional things to help solve challenges they see around them. And did we mention that they’re all 18 or younger?

We’ll be highlighting each of the impressive 20 finalist projects over the next 20 days in the Spotlight on a Young Scientist series on the Google for Education blog to share more about these inspirational young people and what inspires them.
Then on September 21st, these students will join us in Mountain View to present their projects to a panel of notable international scientists and scholars, eligible for a $50,000 scholarship and other incredible prizes from our partners at LEGO Education, National Geographic, Scientific American and Virgin Galactic.

Congratulations to our finalists and everyone who submitted projects for this year’s Science Fair. Thank you for being curious and brave enough to try to change the world through science.
Read More..

Episode 40 Material World

| 0 comments |
This time, Tor and Chet talk with Nicholas Jitkoff from the Material group about... Material Design. And design in general. And engineering. And splash screens. And other stuff.

Favorite words: Materiality. Skiamorphic.

Subscribe to the podcast feed or download the audio file directly.

Relevant Links

Material Design
Zombo

Nicholas: google.com/+NicholasJitkoffJ, @alcor
Tor: google.com/+TorNorbye, @tornorbye
Chet: google.com/+ChetHaase, @chethaase

Thanks to continued tolerance and support by our audio engineer, Bryan Gordon.
Read More..

Building Brillo iant devices with Weave for a Connected world

| 0 comments |

Posted by Gayathri Rajan & Ryan Cairns

Earlier this year at Google I/O, we previewed Brillo and Weave, our complete solution for building connected devices. Since May, we’ve opened up the Brillo operating system (OS) and Weave communication platform to early access partners. Today, we’re extending this to the broader developer community as part of our invite program. Read on to find out how you can receive an invitation.

Brillo brings the simplicity and speed of software development to hardware by offering you a lightweight embedded OS based on Android, core services, a developer kit, and a developer console. You can choose from a variety of hardware capabilities and customization options, quickly move from prototype to production, and manage at scale with over the air (OTA) updates, metrics, and crash reporting.


Watch this video to learn more about Brillo:



Once you’ve built your connected device, you’ll need to find a way for it to communicate with other devices and allow users to interact with it. That’s where Weave comes in. With Weave, you can build interoperable communications directly into your devices. Weave provides a messaging service that enables phones and devices to talk to each other locally and remotely through the cloud. The Weave cloud server handles remote communication and access to your web-connected device, safely and at scale. With Weave you also get a set of services to securely set up the device and provide controlled access. Additionally, Weave works seamlessly with, and is actually built right into, Brillo; but, you can also use Weave libraries with your existing Linux-based OS.


Check out this video we created to help you understand the power of Weave:



Weave comes with a mobile SDK for both iOS and Android, so that you can build apps to control and enhance the connected device experience for mobile users. If you’re an app developer interested in extending the reach of your apps to the physical world of devices, you can use Weave mobile and web APIs to control multiple Weave devices across brands in a single app.

Both Brillo and Weave are open, extensible, and secure by default to support a variety of devices and use cases. Brillo and Weave provide the platform, tools and services, so you can do what you do best: build great device and app experiences.

In addition to the Brillo and Weave platforms, we’re also unveiling our Weave compatibility program to ship certified Weave-branded devices as well as a hardware program for silicon vendors to build and sell Brillo-compliant hardware.

If you’d like to be part of our developer invite program, visit our website and request an invite. We’ll send you more details as well as access to our code, documentation and developer console. We look forward to making the Internet of Things better, together!

Read More..

Hello World to open photo using Intent ACTION OPEN DOCUMENT with FloatingActionButton and Snackbar

| 0 comments |
This example work on last post "Updated Android Studio now provide template of Blank Activity with FloatingActionButton and Snackbar", modify the default Hello World to open image with ACTION_OPEN_DOCUMENT,  display on ImageView.


edit layout/activity_main.xml, to modify the icon of the FloatingActionButton, android:src inside <android.support.design.widget.FloatingActionButton>.
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout


android_layout_width="match_parent"
android_layout_height="match_parent" android_fitsSystemWindows="true"
tools_context=".MainActivity">

<android.support.design.widget.AppBarLayout android_layout_height="wrap_content"
android_layout_width="match_parent" android_theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar android_id="@+id/toolbar"
android_layout_width="match_parent" android_layout_height="?attr/actionBarSize"
android_background="?attr/colorPrimary" app_popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>

<include layout="@layout/content_main" />

<android.support.design.widget.FloatingActionButton android_id="@+id/fab"
android_layout_width="wrap_content" android_layout_height="wrap_content"
android_layout_gravity="bottom|end" android_layout_margin="@dimen/fab_margin"
android_src="@android:drawable/ic_menu_gallery" />

</android.support.design.widget.CoordinatorLayout>


layout/content_main.xml, its the main layout of our app.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout



android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
app_layout_behavior="@string/appbar_scrolling_view_behavior"
tools_showIn="@layout/activity_main"
tools_context=".MainActivity">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_margin="20dp"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold"/>

<ScrollView
android_layout_width="match_parent"
android_layout_height="wrap_content">

<LinearLayout
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_orientation="vertical">

<TextView
android_id="@+id/texturi"
android_layout_width="wrap_content"
android_layout_height="wrap_content" />
<ImageView
android_id="@+id/image"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_adjustViewBounds="true"/>

</LinearLayout>
</ScrollView>
</LinearLayout>


com.blogspot.android_er.androidhello.MainActivity.java
package com.blogspot.android_er.androidhello;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

import java.io.FileNotFoundException;

public class MainActivity extends AppCompatActivity {

private static final int RQS_OPEN_IMAGE = 1;

ImageView imageView;
TextView textUri;

Bitmap bmOriginal = null;
Uri targetUri = null;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Open photo", Snackbar.LENGTH_LONG)
.setAction("OK", snackbarOnClickListener)
.show();
}
});

textUri = (TextView) findViewById(R.id.texturi);
imageView = (ImageView) findViewById(R.id.image);
}

OnClickListener snackbarOnClickListener = new OnClickListener(){
@Override
public void onClick(View v) {

bmOriginal = null;
imageView.setImageBitmap(null);

Intent intent = new Intent();

if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.KITKAT) {
intent.setAction(Intent.ACTION_OPEN_DOCUMENT);
} else {
intent.setAction(Intent.ACTION_GET_CONTENT);
}

intent.addCategory(Intent.CATEGORY_OPENABLE);

// set MIME type for image
intent.setType("image/*");

startActivityForResult(intent, RQS_OPEN_IMAGE);

}
};

@TargetApi(Build.VERSION_CODES.KITKAT)
@Override
protected void onActivityResult(int requestCode,
int resultCode, Intent data) {

if (resultCode == Activity.RESULT_OK) {

Uri dataUri = data.getData();

if (requestCode == RQS_OPEN_IMAGE) {
targetUri = dataUri;
textUri.setText(dataUri.toString());
updatImage(dataUri);
}
}

}

private void updatImage(Uri uri){

if (uri != null){
Bitmap bm;
try {
bm = BitmapFactory.decodeStream(
getContentResolver()
.openInputStream(uri));
imageView.setImageBitmap(bm);
bmOriginal = bm;

} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

}



download filesDownload the files (Android Studio Format) .

Related:
- Using Intent.ACTION_OPEN_DOCUMENT, for KitKat API 19 or higher

Next:
- Apply photo effects using Media Effects APIs

Read More..