Google Blogoscoped

Forum

How to Program Google Android  (View post)

Nate [PersonRank 5]

Monday, November 19, 2007
8 months ago5,155 views

This is awesome, thanks!

neil young [PersonRank 0]

8 months ago #

Nice. Would you mind to publish WamF?

Regards

Raul [PersonRank 0]

8 months ago #

"WamF shows how far away you are right now from all the people in your address book, plots you and them on a map, and draws lines between you and any friends nearby."

Actually it shows how far away are you from their address.

Nice

Reto Meier [PersonRank 10]

8 months ago #

[put at-character here]Raul: True! But what if they published their location using the built in P2P stack? You could be updated to your friends positions in real-time... :)

[put at-character here]Neil: I'm thinking about tidying it up and making it open-source. What do people think?

Errioxa [PersonRank 1]

8 months ago #

Thanks for the example.

This is the future¡¡

JohnnyFry [PersonRank 0]

8 months ago #

I would love to see the source as well! I'm a c# web guy in real-life and would appreciate seeing someone else's take on Android.

Misty Fy [PersonRank 0]

8 months ago #

Hey thanks for sharing, I'm intruiged by the possibilties the SDK has...

stefan2904 [PersonRank 10]

8 months ago #

> "I'm thinking about tidying it up and making it open-source. What do people think?"

would be great!

Nick Spacek [PersonRank 1]

8 months ago #

I was actually kind of struck when I read the description too, I thought the phones _were_ publishing their locations, haha. That would be cool, but also a privacy concern! :)

Reto Meier [PersonRank 10]

8 months ago #

Got to leave something for version 2 :)

Would have made the example a lot more complicated too!

ME [PersonRank 7]

8 months ago #

> "I'm thinking about tidying it up and making it open-source.

Sounds like an excellent idea! :-)

Garett Rogers [PersonRank 10]

8 months ago #

Reto,
Great job on the app – and I agree that you should release this code into the wild. As you likely know, working examples, other than the ones they give you to play with, are few and far between...

Mac Beach [PersonRank 1]

8 months ago #

I vowed never to learn another programming language. Crisp tutorials like this give me second thoughts.

Well done!

Freiddie [PersonRank 6]

8 months ago #

Even though I don't think I intend to do anything Android, you've certainly shown me some enthusiasm.

Mark Huck [PersonRank 0]

8 months ago #

Reto, thanks for your great tutorial!

RC [PersonRank 9]

8 months ago #

Sweet stuff!

This is why I love this blog. Android blog should link it to this post. Great tutorial.

sunilforandroid [PersonRank 0]

8 months ago #

I have a question. You can query the local location provider for your location. Did you just choose random values for locations on people in your contact books?

When the real location provider gets implemented, there has to be some application on an user cell phone which can publish his location to a server
and other friends can pull it from there? similar to loopt?

once again...thanks for the tutorial on your app.

-sunilforandroid

Reto Meier [PersonRank 10]

8 months ago #

[put at-character here]sunilforandroid: I added the geo coordinates for my 'friends' to the Notes field in the address book. In real life it looks like there will be a way to translate their street address to geo coordinates using Android.

The alternative is to use the P2P Jabber stack to publish your coordinates to people in your contact book who also use WamF – that's what I'll be looking in to implementing :)

mnemo [PersonRank 1]

8 months ago #

Please don't use "+" for string concatenation in a loop. The StringBuilder is optimized for performance in such cases.

Reto Meier [PersonRank 10]

8 months ago #

I don't. The "+" string concantenation is joining local scope variables within the loop – I'm not concatenating with an external variable within the loop...

Ben Baril [PersonRank 0]

8 months ago #

To the last two comments:

The Java Compiler is smart enough to know if you are using + in a loop to concatenate strings, and the resulting bytecode will be a StringBuffer. So, if you are seeking clarity, you can easily use the + operator.

If you don't believe me, compile your source with both examples (StringBuffer and +) under Java 1.5 and compare them

BG [PersonRank 0]

8 months ago #

Great work, Thank you. I am working on an idea that required studying the location services. Your smart work is making my study time less. Will update you as I make progress. Once again : Thank you!!

Adam Martin {Fat Man Collective} [PersonRank 0]

8 months ago #

Hmm, 'Android', 'Open Handset Alliance' call me Yodic, but this is all starting to sound a bit Star Wars to me, perchance the first handset will be called the X-Wing or At-At and there's sure to be room for some people of restricted height talking too loudly on public transport into Googlic transponders whilst dressed in Lucian bear suits?

Google are late to the game and it's all a little desperate, let's listen in 12 months when all this hype about hype (clearly borrowed from the iPhone marketeers, which is and of itself akin to a surrogate child) shows some real results.

All talk and no touchphone maketh for hottish air.

Mohamed [PersonRank 0]

8 months ago #

Thanks Reto,

   This is a great jbo.

Live Crunch [PersonRank 1]

8 months ago #

Awesome post, yes I would love to get that 10mils as well :)

I am one of the developers :)

Bart [PersonRank 0]

8 months ago #

Just skimmed over the tutorial. My doubt is this:
Can I install the application on my Nokia N73 phone? How does one install Android applications? Help!

Reto Meier [PersonRank 10]

8 months ago #

[put at-character here]Bart: Sorry, no. You can only install Android applications on phones that are running the Android OS (as opposed to, say, Symbian or Windows Mobile). The worse news is that no such phones yet exist. We have to wait until mid next year before we have hardware to play with.

A. Vijayaraghavan [PersonRank 0]

8 months ago #

Hi,
Thanks for the informative tutorial!

NJ [PersonRank 0]

8 months ago #

then which phones were used by the ppl in android demo on youtube?

Reto Meier [PersonRank 10]

8 months ago #

They've got a very small number of 'demo' phones but I think you essentially need to be in the Android team to have one...

Chewie77 [PersonRank 0]

8 months ago #

You guys ought to check out AndroidGuys.com. They're looking for a developer to talk about their projects. They're the best fansite for Android and have news every day.

Chuck Norris [PersonRank 0]

7 months ago #

For Tutorials and an existing(!), non-fake(!) community visit anddev.org
~ 200 Articles and ~5-10 users always on!
See you.

[Unlinked URL – Tony]

Friedger [PersonRank 0]

7 months ago #

Why don't publish the code at locationevent at code.google.com?

HeHe [PersonRank 0]

7 months ago #

When could you publish the code?

Thank you in advance!

Go to Android [PersonRank 0]

6 months ago #

We invite you to manage your project with us, in gotoandroid.com
Good work.

Hong Xiaowan [PersonRank 10]

6 months ago #

Well, I planed a small project on Android, anyone help me?
Pasted a video here:

+ Show video

Anantkumar [PersonRank 0]

6 months ago #

Very good post, but I have one question you are using the code like
Intent intent = new Intent(LOCATION_CHANGED);
where did you find this LOCATION_CHANGED intent. I am struggling to find it in documents, may be you have created it can you post how to create LOCATION_CHANGED intent. Please also post your source folder structure only.
Thanks,
Anant.

Reto Meier [PersonRank 10]

6 months ago #

LOCATION_CHANGED is a reference to a string constant that you have to define within your project (preferably in the resource file). So you won't find it in the docs because you have to define it in your code :)

When you create a new Intent the constructor lets you pass in an arbitrary string that describes the action that will trigger the intent. There are a bunch of predefined Android actions, but LOCATION_CHANGED is one I defined to announce the action of having moved (according to my limits).

I've used a constant because I need to match the string exactly when creating a filter for it in the IntentReceiver.

Hope that helps!

Ps. I still plan on publihing the source code, some things have come up that make that a little more complicated right now.

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement
Find the right keywords for your campaigns at KeywordDiscovery.com Advertise here?

 

This site unofficially covers Google™ and more with some rights reserved. You can subscribe to the feed, email your tips and join our forum!