Re: [android-developers] Re: why is my app asking to access phone calls and storage?

2009-11-29 Thread Rachel Blackman
I think you didn't understand Dianne's answer.

Prior to 1.6, those operations did not require a permission; all apps could
get that information.  In 1.6 and later, those operations require the
appropriate permissions to work.

An app targeting 1.6 or later will have an appropriate manifest; if they
need the permissions they will ask for them.  An app targeting 1.5 did not
NEED to ask for them; if you just restrict them, those apps will break.  For
1.5 things to work reliably on 1.6 or later, you have to assume any "I was
written for 1.5" program might need those permissions.  If you assume they
do, you ask for a potentially unnecessary permission, but things won't
break.  If you assume they don't, you don't ask for unnecessary permissions,
but anything that DID need them will break.  The former situation is better
for both developers (who can target 1.5 without having things break on 1.6
or 2.0) and users (who don't download a 1.5 app on 1.6 and go "this doesn't
work!").

(That said, maybe it would've been better if the install screen
distinguished between "permissions the app requires" and "permissions that
might be needed to support an older app," or something.  Though that would
be difficult to make intuitive.)

On Nov 28, 2009 10:35 AM, "Max Binshtok"  wrote:

Diane, it seems to me that you did not understand the problem.

I (and I believe other people) do NOT ask for those permissions in the
manifest since I do not need them. But when the application is to be
installed they show up (it says that the app is asking for those
permissions). Please read the very first post. It says that "Hello
World" application when to be installed is asking for those
permissions although they are not present in manifest.


Regards,
Max.

On Nov 26, 1:46 am, Dianne Hackborn  wrote: > These are
new permissions added ...
> On Wed, Nov 25, 2009 at 10:17 PM, Max Binshtok wrote:

> > > > > I am having the same problem and I just want to confirm: > > > You
are saying that when yo...
> > android-developers+unsubscr...@googlegroups.com

>

> > For more options, visit this group at > >
http://groups.google.com/group/android-developers?hl=en...
> hack...@android.com

> > Note: please don't send private questions to me, as I don't have time to
> provide private suppo...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Question for OpenGL developers

2009-11-29 Thread Lior
This is not an efficient way to do it, not for 2D games, and not for
3D games. I'll explain:

For 2D games like you describe, you do need layers, but putting each
layer in its on view is wasteful, specifically in terms of
performance, since the Android framework has to manage the life-cycles
of all of them, and there's quite a lot of code running behind the
scenes for each one.

Other alternative examples are:
1. Redrawing the entire view, including the background on each frame -
on a single view
2. Drawing each layer into a bitmap, and then drawing all those
bitmaps to the (single) view on each frame
3. Optimizations can be done by redrawing only dirty-regions (for
example)

If you want to write high-performance games, you definitely need to
use SurfaceView, and not a regular view.

For OpenGL games, you can use the basic GLSurfaceView, and here as
well, you need to redraw the entire frame - every frame (Of course
there are all kinds of optimizations like back-face culling, clipping,
etc.)

If you want to create a 2D game using OpenGL, you can do it by
creating a 2D projection matrix (Here's a good tutorial:
http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL, note that not all
gl-commands mentioned are compatible with OpenGL ES - So you can't
just copy/paste this into your code, but explains the principles well)

Here's the best resource to get you started:
http://code.google.com/events/io/2009/sessions/WritingRealTimeGamesAndroid.html

Lior Gonnen
UltimateFaves / UltimateFavesPRO developer
http://ultimatefaves.wordpress.com/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: custom protocol handler...

2009-11-29 Thread Miguel Paraz
Hi all,
I'm having the same problem.

On Nov 19, 4:16 am, sdphil  wrote:
> ping...  still unanswered and unworking...
>
> On Nov 15, 9:48 pm, sdphil  wrote:
>
>
>
> > ping...
>
> > On Nov 13, 11:06 am, sdphil  wrote:
>
> > > okay, tried adding the ? mark.  same thing.
>
> > > i gotta believe someone else is doing this
>
> > > On Nov 13, 4:10 am, skink  wrote:
>
> > > > On Nov 12, 6:31 pm, sdphil  wrote:
>
> > > > > tried that, didn't work -- same result.
>
> > > > > Web page not available
> > > > > The Web page at myprotocol:///blah=42 might be temporarily down or it
> > > > > may have moved permanently to a new web address.
>
> > > > did you try:
> > > > -
> > > > myprotocol:///?blah=42
> > > > -
> > > > ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Selling apps in Market from Poland. Just a simple question, to Googlers;

2009-11-29 Thread vetch
when it will be possible ?

Give me a timeframe: half a year, year or never.

It is important for me, and many other developers, planning their
business.

Life is short, and we must EAT.

Regards

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: appwidget Image on Orientation Change Issue

2009-11-29 Thread Ryan
Ok I think I figured it out. In certain cases when the widget is
clicked i updated the RemoteViews to hide some on screen controls/
views using setViewVisibility on the remoteview, however I did not re-
set the setImageURI. When the screen rotated the Image dissappeared.
However this is odd because I would expect the image to dissappear on
updating the RemoteView without the ImageURI even without rotating the
screen. But it would only dissappear after rotating. When I did not go
through the routine that hid the controls/ did not set the
setViewVisibility, the image did not dissappear on rotation.

I am curious as to what happens to the RemoteView on orientation
change and why sometimes it seems to retain the ImageURI and others it
loses it.

In any case I have my workaround.

- Ryan

On Nov 28, 12:12 am, Ryan  wrote:
> I am building an appwidget that is displaying images from the sdcard.
> I am investigating how to get the appwidget to perform correctly on an
> orientation change. Currently I am setting the image on an image
> button in the remoteview from a Bitmap I created in the program.
> However it seems that when the orientation changes this bitmap is
> destroyed and the image won't display unless I update the remoteview
> of the appwidget after the orientation change.
>
> What should I do so that when the appwidget is remade after
> orientation change the image is able to be redisplayed automatically?
> The only thing I can think of is using a setImageViewURI() to point
> the remoteview to the image file itself using a URI (I am having
> issues getting this to work correctly thus far).
>
> It seems that none of my code is excecuted on this orientation change
> as it is only rebuilding the remoteview. Is there an accepted practice
> here? Thanks,
>
> - Ryan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Detect/intercept screen turning off

2009-11-29 Thread David Given
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dianne Hackborn wrote:
> Also you definitely do get paused when the screen is turning off, so you
> really should be able to fix things by doing whatever you need to there.

What I'm trying to do is to work around bug 3755:

http://code.google.com/p/android/issues/detail?id=3755

OpenGL apps don't get notified of surface destruction when the screen
turns off, which means they try to render onto an invalid surface, which
means the GL system gets itself knotted up and shifts into a state where
it won't work any more.

We do get onPause() when the screen turns off, but unfortunately it's
sometimes too late (there appears to be a race between surface
destruction and the onPause() being delivered). It just so happens that
with apps using GLSurfaceView this mostly works, and with our app (which
doesn't use GLSurfaceView) it mostly doesn't work!

Testing for ACTION_SCREEN_OFF is a reasonable workaround --- it allows
me to distinguish between the application being paused because it's
being backgrounded (which works correctly) and the application being
paused because the screen's being turned off (which doesn't); but
because it's arriving after the onPause(), it's still arriving after
surface destruction, which means it's too late to save the app, so all I
can really do is quit. But that's way better than crashing --- thanks!

(What I'd really like to do is to be able to detect the screen turning
off *before* it actually does so, so I can switch to a different
activity and therefore artifically force a paused-due-to-backgrounding
event. Unfortunately I don't think any such event gets delivered.)

- --
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "Under communism, man exploits man. Under capitalism, it's just the
│ opposite." --- John Kenneth Galbrith
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLEl8rf9E0noFvlzgRAlPRAKCjegDGvhGmko4osetZnWvMddp0mwCgnKNX
a8v790x7bO1nr/utrZRnFHY=
=Y/He
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: AutoCompleteTextView and setText()

2009-11-29 Thread Klaus Kartou
I tried to call setText before filling data into the CursorAdaptor, but this
isnt a very solid solution since I need to be able to call setText at any
time.
So I´m still in need of some ideas? :)


On Sat, Nov 28, 2009 at 6:26 PM, Klaus Kartou  wrote:

> Hi!
>
> I have a AutoCompleteTextView with a CursorAdapter with data. I need to be
> able to set a text in the AutoCompleteTextView programmatically without the
> autocomplete mechanism kicking in.
> If I use *setText *on the AutoCompleteTextView it will start the
> autocomplete.
> I tried calling *dismissDropDown() after setText, but this dosnt work
> because the drop down is not shown yet.*
> **
> Any ideas? :D
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Selling apps in Market from Poland. Just a simple question, to Googlers;

2009-11-29 Thread oxonom
I want to know the same for switzerland.

At the moment we can only speculate about the reasons:
- Checkout is not ready but will be.
- Android hardware is still crappy and they wait to lauch their
own. ;-)
- They don't care.

On 29 Nov., 11:58, vetch  wrote:
> when it will be possible ?
>
> Give me a timeframe: half a year, year or never.
>
> It is important for me, and many other developers, planning their
> business.
>
> Life is short, and we must EAT.
>
> Regards

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: custom protocol handler...

2009-11-29 Thread Miguel Paraz
Hi,
I tested this with an embedded WebView, and it works. Not sure why the
intent-filter isn't visible to Browser app.

On Nov 12, 1:09 am, sdphil  wrote:
> i want to do the following thing -
>
> when a user navigates to a web page, I want to have a link in there
> that looks like this:
>
>     Click here for fun.
>
> Then when the user clicks on that from the phone browser, I want it to
> launch my intent with that full url.
>
> In my AndroidManifest.xml file, I have the following info:
>
>     
>                 
>                 
>                      android:name="android.intent.action.VIEW">
>                      android:name="android.intent.category.DEFAULT">
>                      android:name="android.intent.category.BROWSABLE">
>                     
>                 
>     
>
> When I try this, when I click on the link on the web page from the
> phone browser, it says --
>
> Web page not available
> The Web page at myprotocol://blah=42 might be temporarily down or it
> may have moved permanently to a new web address.
>
> Any help here would be appreciated.
>
> tia.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Promote Your Apps

2009-11-29 Thread Vassilios Kirellous
Hello,

We've created a site that hopefully will help a lot of developers get some
much needed exposure for their apps.
Its called Mobilesoftee.com (http://www.mobilesoftee.com).

You can publish your apps, and we will review them for you - Totally free of
charge. Even if they are paid apps, we will purchase them and review them -
thoroughly!.

The advantages of mobilesoftee is that you can finally have up to 25 screen
shots to show off your app. With each screen shot, we give you the chance to
explain in as much detailas you want, how your app works. We will grade your
app, and offer you feedback to help improve it.

Once your app has been published on our site, we will then market it for you
through our channel partners after giving it one of 3 awards.

We are also looking for content writers. Please email me if you are
interested.

These are paid positions.

Good luck in your app development, and I hope this can be of some help to
you,

Thanks,
Vaz

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Intent to display SMS

2009-11-29 Thread westmeadboy
I've finally come up with this which sort of works. It uses the
message uri (e.g. "content://sms/123") to work out the thread_id.

Cursor cursor = getContentResolver().query(msgUri, new String[]
{ "thread_id" }, null, null, null);
long threadId = cursor.getLong(0);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("content://
mms-sms/conversations/" + threadId));
int flags = Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP;
intent.setFlags(flags);
startActivity(intent);

It seems odd to me that there is no way to bring up an individual
message (only a whole thread).

Is there a better way to do all this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Beginner Question

2009-11-29 Thread Wayne Wenthin
Give it some time.   The emulator is very slow to load.  Once its up it will
be fine.  Just don't shut it down everytime and you will be good.


On Thu, Nov 26, 2009 at 1:40 PM, LeBlanc217  wrote:

> Hey sorry this might seem kinda dumb but just recently I decided to
> try out programing for Android and wanted to start with simple hello
> world. My code is all correct and compiles correctly but when the
> emulator comes up only the word ANDROID stays on the screen and I have
> no idea why. Does anyone know what my problem is?
>
> -Peter
>
>
> Code:
>  package com.example.helloandroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>
>   @Override
>   public void onCreate(Bundle savedInstanceState) {
>   super.onCreate(savedInstanceState);
>   TextView tv = new TextView(this);
>   tv.setText("Hello, Android");
>   setContentView(tv);
>   }
> }
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Detect/intercept screen turning off

2009-11-29 Thread Dianne Hackborn
I wouldn't count on the screen off broadcast being delivered at some useful
different timing from onPause().  These are both part of the flow of turning
off the screen, they will happen pretty much at the same time.

On Sun, Nov 29, 2009 at 3:46 AM, David Given  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Dianne Hackborn wrote:
> > Also you definitely do get paused when the screen is turning off, so you
> > really should be able to fix things by doing whatever you need to there.
>
> What I'm trying to do is to work around bug 3755:
>
> http://code.google.com/p/android/issues/detail?id=3755
>
> OpenGL apps don't get notified of surface destruction when the screen
> turns off, which means they try to render onto an invalid surface, which
> means the GL system gets itself knotted up and shifts into a state where
> it won't work any more.
>
> We do get onPause() when the screen turns off, but unfortunately it's
> sometimes too late (there appears to be a race between surface
> destruction and the onPause() being delivered). It just so happens that
> with apps using GLSurfaceView this mostly works, and with our app (which
> doesn't use GLSurfaceView) it mostly doesn't work!
>
> Testing for ACTION_SCREEN_OFF is a reasonable workaround --- it allows
> me to distinguish between the application being paused because it's
> being backgrounded (which works correctly) and the application being
> paused because the screen's being turned off (which doesn't); but
> because it's arriving after the onPause(), it's still arriving after
> surface destruction, which means it's too late to save the app, so all I
> can really do is quit. But that's way better than crashing --- thanks!
>
> (What I'd really like to do is to be able to detect the screen turning
> off *before* it actually does so, so I can switch to a different
> activity and therefore artifically force a paused-due-to-backgrounding
> event. Unfortunately I don't think any such event gets delivered.)
>
> - --
> ┌─── dg@cowlark.com ─ http://www.cowlark.com ─
> │
> │ "Under communism, man exploits man. Under capitalism, it's just the
> │ opposite." --- John Kenneth Galbrith
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iD8DBQFLEl8rf9E0noFvlzgRAlPRAKCjegDGvhGmko4osetZnWvMddp0mwCgnKNX
> a8v790x7bO1nr/utrZRnFHY=
> =Y/He
> -END PGP SIGNATURE-
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: why is my app asking to access phone calls and storage?

2009-11-29 Thread Dianne Hackborn
Are you sure you are putting  in the right place?

And thanks Rachel for the explanation.  Trying to explain to the user some
subtlety about old applications here seemed pretty difficult, and not to
useful for a temporary situation.

On Sat, Nov 28, 2009 at 12:02 PM, Max Binshtok wrote:

> How do I overcome this?
>
> I have:
>  uses-sdk>
>
> If that is what you mean by "explicitly targeting API 4 or latter"
> then this does not seem to solve the problem. I don't need and don't
> want those permissions.
>
> Thanks.
>
>
> Slightly OFF TOPIC:
> I don't understand... Why do you want to tell people that my
> application requires phone permissions when it clearly doesn't? This
> is really, *really* bad! People are suspicious and hesitant to install
> apps that require not needed permissions. Moreover, PHONE_STATE
> permission has this weird interpretation in a smaller font - read
> phone state and identity (Identity!? People are terrified by all
> "identity theft" propaganda). At some point I asked for PHONE_STATE
> permissions to access the serial number to be able to tell different
> users apart. Do you know what this lead to? I had a real comment on
> the market from someone who claimed that I stole his password
> (whatever this means) and he had to spend 3 hours on the phone with
> TMobile to gain control of his phone (with foul language all over the
> comment) . I don't need those permissions and I don't want people to
> be suspicious and write stupid comments and this is not only me as the
> first message attests as well.
>
> Regards,
> Max.
>
>
> On Nov 28, 1:44 pm, Dianne Hackborn  wrote:
> > Yes, and I am saying this is the normal expected behavior for apps that
> are
> > not explicitly targeting API 4 or later.
> >
> > On Sat, Nov 28, 2009 at 10:35 AM, Max Binshtok  >wrote:
> >
> >
> >
> > > Diane, it seems to me that you did not understand the problem.
> >
> > > I (and I believe other people) do NOT ask for those permissions in the
> > > manifest since I do not need them. But when the application is to be
> > > installed they show up (it says that the app is asking for those
> > > permissions). Please read the very first post. It says that "Hello
> > > World" application when to be installed is asking for those
> > > permissions although they are not present in manifest.
> >
> > > Regards,
> > > Max.
> >
> > > On Nov 26, 1:46 am, Dianne Hackborn  wrote:
> > > > These are new permissions added to 1.6.  If an application is
> targeting
> > > > anything below API 4 (1.6), they will automatically be requested
> because
> > > in
> > > > 1.5 and lower there was no restriction on these operations.  As of
> 1.6
> > > these
> > > > permissions were added, and if you target API 4 or later you need to
> > > > explicitly request the permission in your manifest to be granted it.
> >
> > > > On Wed, Nov 25, 2009 at 10:17 PM, Max Binshtok <
> max.binsh...@gmail.com
> > > >wrote:
> >
> > > > > I am having the same problem and I just want to confirm:
> >
> > > > > You are saying that when you try to install over the air (just by
> > > > > downloading APK file) you get asked those permissions, but when
> your
> > > > > application is installed through the Android Market - you are NOT
> > > > > asked for PHONE_STATE and STORAGE? Is that correct?
> >
> > > > > From my side I can add that I had targetSDK=4 and when installing
> from
> > > > > APK over the air those permissions come up... (I have been banging
> my
> > > > > head on the walls for quite some time now). On 1.5 they don't come
> up!
> > > > > Not on the emulator and not on the device.
> >
> > > > > Regards,
> > > > > Max.
> >
> > > > > On Oct 8, 1:13 pm, Jarcikon  wrote:
> > > > > > Sorry about the double post.  I realized that because I was
> > > installing
> > > > > > the app directly from the .apk file instead of the market, the
> Phone
> > > > > > Calls and Storagepermissionsalways come up.  When it is put on
> the
> > > > > > Market, they are gone.  Don't think this was intended, but
> setting
> > > > > > targetSdkVersion does fix it.
> >
> > > > > > Mike
> >
> > > > > > On Oct 5, 3:36 pm, Jarcikon  wrote:
> >
> > > > > > > Chris,
> >
> > > > > > > I am having the same problem. This is due to the update to
> Donut
> > > (1.6
> > > > > > > SDK).  According to the docs, if you set targetSdkVersion in
> your
> > > > > > > manifest file to "4" thesepermissionsshould not appear unless
> > > > > > > specifically requested.  However, I have tried this and it is
> not
> > > > > > > working for me.
> >
> > > > > > > Does anyone have a solution?
> >
> > > > > > > Mike
> >
> > > > > > > On Sep 18, 8:54 am, ch13fw  wrote:
> >
> > > > > > > > I am working on a widget and have it pretty much how I like
> it,
> > > but I
> > > > > > > > have one problem.  When I package it and install it, it says
> in
> > > the
> > > > > > > > "allow this application to" portion that it wants access
> > > > > tophonecallsandstorage.  I know this will be a no-go if I want
> anyone
> > > 

Re: [android-developers] Android's dependency on Google Sync

2009-11-29 Thread Dianne Hackborn
Market is Google's application, not a part of the Android open source
platform.  I don't know about browsing the market, except that there is
probably some dependency of having you logged in or otherwise registered
through that connection to know what to do.  Keep in mind that Market deals
with a lot of sensitive things like forward locked applications, the user's
money, and simply causing apps to be installed on the device.

Maps mostly doesn't get pushes from Google servers; it just pulls data as
needed, and doesn't even need to have the user logged in to do that...
 though I wouldn't be surprised if things like Latitude are broken without
the GTalk connection.

On Sat, Nov 28, 2009 at 9:19 PM, westmeadboy wrote:

> This is a branch off an existing thread where I asked:
>
> Why is it necessary to sign into Google Sync to access the Market for
> free non-protected apps?
>
> and the response was:
>
> On Nov 29, 12:54 pm, Dianne Hackborn  wrote:
> > As far as market relying on Google Sync -- all of the Google services
> funnel
> > through a single underlying network connection that drives all of the
> sync
> > tickles, updates, and everything else going on with the google services.
>  If
> > this doesn't work, they will all be stuck getting anything pushed from
> the
> > google servers.  Market operates by pushing to the device a request to
> > install the app, so if you can't get those pushes, it won't install.
>
> Thanks, that explains why Google Sync is required to install an app.
> But what about to browse the Market?
>
> As a developer without Google Sync access, it would still be
> incredibly useful to at least read comments on my apps in the Market.
>
> Also, do you know how it works with Google Maps? I don't have any
> problems using that - i.e. there appears to be no Google Sync
> dependency.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Upgrading database for an app

2009-11-29 Thread Dexter's Brain
Is it sufficient if I change the database version? Or, first I will
have to back up the db programatically and then restore all the tables
with contents?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Drawing a Nine Patch image

2009-11-29 Thread Neilz
Hi all. I'm trying to create on of these images, but Eclipse won't
accept it once I've used the draw9patch tool.

I've found other people having the same problem, and saw this comment:

..."I discovered later that the problem I was having was caused by
the image not being exactly true to the nine-patch spec as defined in
the documentation.  Once I fixed the image to have a clean (i.e., no
gradients etc) one pixel border it was fine. "

I'm not much good when it comes to image design. What does this mean,
how do I create my original png file to meet the specification for
Nine Patch?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: custom protocol handler...

2009-11-29 Thread Miguel Paraz
On Nov 29, 11:17 pm, Miguel Paraz  wrote:
> Hi,
> I tested this with an embedded WebView, and it works. Not sure why the
> intent-filter isn't visible to Browser app.

I got mine working. It only works as a browser link, and not using the
"Go" dialog box.

As it turns out, no surprise - even a "mailto:"; link doesn't work in
that box. It becomes a Google search.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Scaling images in WebView (interactively?)

2009-11-29 Thread Mariano Kamp
Hi,

  I use WebView a lot to display web pages with embedded images.

  Some of those web pages contain images that are too large (dimensions) to
display them on the screen without scrolling. So I would like to
resize/scale those images so that they fit.

  I would be happy with any solution at all, but I would prefer one that
would take into account orientation changes. And on top of that it would be
awesome if a tap on the image would show the actual size of the image.

  Any ideas?

  JavaScript?

Cheers,
Mariano

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Android aapt error

2009-11-29 Thread ShaunP1989
I keep getting the following error message when I try to run any
android project.

/Documents/Development/SWDS/Client/nbproject/build-impl.xml:338:
Execute failed: java.io.IOException: Cannot run program "/Documents/
Development/SDK/android-sdk-linux/platforms/android-2.0_r01-linux/
tools/aapt" (in directory "/Documents/Development/SWDS/Client"):
java.io.IOException: error=2, No such file or directory

Have searched the web and found nothing of any use. The line in the
xml file is the second line here:


 // This line
here.













-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] apk files on win serv.08 iis7

2009-11-29 Thread Cid
i'm messing around with handler mappings but i cant seem to get *.apk
files to install on phone..  has anyone done this yet?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] android code for displaying signal strength of wifi access point

2009-11-29 Thread Sarath Krishna
hii..I need to develop an application which scans the wifi access
points and also gives their signal strength.I wrote the code for
scanning the access points but I dont know what packages to use for
measuring the displaying strength.Can anyone please tell me how to
display the signal strength, also give me the code for that.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Overlays on Map

2009-11-29 Thread Samson Sequeira
Is there a limit to the number of Overlays that can be added to a Map?

My application works fine when I add two overlays, but fails for more
than two. This is a part of my code

for (int index=0;indexhttp://groups.google.com/group/android-developers?hl=en


[android-developers] Different screen sizes + API level

2009-11-29 Thread Donald_W
Hello, I would like to ask what settings are necessary for my
application to be available on all screen sizes:
Is it enough to compile it using SDK 1.6 (but target is set to 1.5 and
API level to 3) or maybe I have to set target to 1.6 and API level to
4?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android in China - What is going on?

2009-11-29 Thread right
It's "business" that should be accused for this

On Nov 28, 2:06 am, Hong  wrote:
> I will not go into details as why Chinese gov't blocking this and that,
> there are many reasons, and you certainly cannot hold Google accountable for
> the problems you have.
>
> Anyway, edit /system/etc/hosts, add "74.125.93.113
> android.clients.google.com" to your Android phone, and you are good to go.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Problem with 9-patches in drawable for custom button style

2009-11-29 Thread Jarett
Hi guys,

I'm having a bit of a problem with a custom button style. I have the
button states (9-patch drawables) set up in a  drawable. The
style I'm going for is a button that looks like it gets pushed down,
i.e., you can see the front edge of the button until you press it. It
works fine for the button itself, but the contents of the Button (or
ImageButton) don't move when pressed, even though I have the 9-patch
areas set up to move the content area for the depressed button states.
It seems like it's keeping the same 9-patch areas no matter which
image it's showing.

Here's an animated GIF to help make the problem a little clearer,
since I'm awful at explaining things:
http://www.crappytools.net/button_problem.gif
The button moves when pressed, but the icon inside stays still. I
played with the Draw 9-Patch utility, and it shows that the content
area in the depressed image should be shifting downwards like
intended.

Any help is appreciated!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Android in China - What is going on?

2009-11-29 Thread 许晖
On Wed, Nov 25, 2009 at 10:18 PM, shimsim  wrote:

> Like I said in the post, it's blocked 90% of the time, not all the
> time, which makes it even stranger.
>
> The strangest things though is just how quiet Google is being about
> this, actually less open that the GFW!
>
>
I can not understand more why you get so angry. Everybody should get angry
about blocking from GFW.
But well, what do you expect Google to do about this? China gov never admit
the existence of GFW. If Google explains to the public that services used by
Android are blocked by GFW by China gov, it's definitely against China gov.
If Google builds some way to by pass GFW, it's against China gov too since
they actually DO operate GFW. So no matter what Google would do, they would
piss off China gov and get kicked out of China. Can you imagine a company
fight against the biggest government in the world? So obvious ending it
would have. This is China I have to say.

Someone please shed some light on whats going on here
>
>
>
> On Nov 25, 12:06 pm, Jie Hong  wrote:
> > I can understandChinaGov blocks Google sync service.
> > The real strange thing is there are always a few hours sync service
> > can work everyday,
> > can anyone explain this?
> >
> > On 11月25日, 上午8时48分, shimsim  wrote:
> >
> >
> >
> > > Well I can safely say the blocking is back in GZ, as of last night no
> > > more sync. I was actually thinking how the timing of this problem as
> > > matched the launch of the iPhone inChina... makes you wonder ...
> >
> > > The only thing worse than the GFW is any lack of explanation from
> > > Google ... thanks Google for being open about this problem.
> >
> > > Best regards,
> >
> > > The proud owner of an Android phone that became useless
> >
> > > On Nov 22, 1:01 pm, Evan JIANG  wrote:
> >
> > > > I was at Shenzhen last week. It is strange that the google sync
> > > > doesn't work in Shenzhen, but it works perfectly in Beijing. I hadn't
> > > > modified any settings. And in Beijing, both CNC network and CMCC APN
> > > > work fine.
> >
> > > > Best regards,
> >
> > > > On Sat, Nov 21, 2009 at 9:26 AM, shimsim  wrote:
> > > > > Hi westmeadboy, i just tried accessing the google sync page from
> the
> > > > > link you posted and it works fine on my G1 both on WiFi and using
> > > > >ChinaMobile APN, so maybe its a regional issue too. I'm located in
> > > > > GZ.
> >
> > > > > Don't get me wrong, I am happy to use this topic for everyone to
> post
> > > > > their current experiencing with the issues with Android inChina, I
> > > > > just want to keep pushing for some official answers too. More posts
> > > > > please, lets keep the momentum here!
> >
> > > > > Ironically the day after starting this post everything has been
> > > > > working fine but as Hong mentioned, its probably just because
> > > > > President Obama is in town, so things may go back to being blocked
> > > > > soon.
> >
> > > > > Any comment Google?
> >
> > > > > On Nov 20, 4:13 pm, westmeadboy  wrote:
> > > > >> Well, I cannot access:
> http://www.google.com/mobile/products/sync.html.
> > > > >> Can you (without a VPN)?
> >
> > > > >> I know you just want answers, but I think it would help to clarify
> the
> > > > >> problem/symptoms too. How is that some people (you) can log on but
> > > > >> others (me) can't?
> >
> > > > >> You might also want to try:
> >
> > > > >>
> http://www.google.com/support/forum/p/Android+Market/label?lid=7dc8a5...
> >
> > > > >> On Nov 20, 2:23 pm, shimsim  wrote:
> >
> > > > >> > It has been working for me almost perfectly the last 3 days, but
> > > > >> > twitter and facebook are still blocked, so maybe they are just
> working
> > > > >> > wherever President Obama is, either way I have a a PPTP VPN
> setup but
> > > > >> > thats not the point here ...
> >
> > > > >> > Getting back to the original question ..  can someone from
> GOOGLE
> > > > >> > or ANDROID speak up and let us know whats going on . PLEASE!
> some
> > > > >> > official reason why and whats going to happen in the long term.
> It's
> > > > >> > kind of important, this isnt social networking we are talking
> about,
> > > > >> > its mail and market and its potentially making Android useless
> in
> > > > >> >China.
> >
> > > > >> > If this is the wrong place to be posting this question then feel
> free
> > > > >> > to suggest a more appropriate place, but at least respond.
> >
> > > > >> > thanks!
> >
> > > > >> > On Nov 20, 12:54 pm, westmeadboy 
> wrote:
> >
> > > > >> > > On Nov 19, 4:53 pm, Gmail addictor 
> wrote:
> >
> > > > >> > > > The sync works again! Market also became accessible! WoooW~~
> YEAH!
> >
> > > > >> > > Still not working for me - I can't get past the "Set up your
> Google
> > > > >> > > account" wizard.
> >
> > > > >> > > I've tried clearing caches of numerous google/htc apps, but
> still no
> > > > >> > > joy...
> >
> > > > >> > > Can anyone else confirm its working in mainlandchina?
> >
> > > > > --
> > > > > You received this mess

[android-developers] adding ethernet

2009-11-29 Thread SharonW
Hi,

I am newbie in Android.
I need to add automatic interface selection (Ethernet or WiFi).
Moreover, if the Ethernet cable is plugged, the device must be
connected via LAN.
If the cable is plugged when there is a wifi connection the user will
get a pop-up message that ask for his advice.

I have noticed that Android.net.ConnectivityManager only allow 2 types
of connection:
TYPE_MOBILE, TYPE_WIFI.  (I have tried to use:
http://osdir.com/ml/Android-Beginners/2009-10/msg00426.html).

I also tried to to use NetworkInterface but if failed to detect
Ethernet connection.

Any Suggestions?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Beginner Question

2009-11-29 Thread Dinesh Harjani

Hello!
When the emulator starts, it needs to load the OS like a real device;
that's why you're seeing the word "Android". It can take a long time
to load, specially if it's loading Eclair. Once it starts though, you
don't need to close it every time you build  your app; Eclipse will
install it again and start it in the emulator, you can see it in the
Console.

Hopes to be helpful,
Dinesh

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] how Cursor.setNotificationUri(getContext().getContentResolver(), uri) works?

2009-11-29 Thread zhiqiang wang
hi ,I find out that there is setNotificationUri on Cursor public
methods.
so what will happen if "notifyChange(uri, null)" been called?
will the cursor requery? or if I can register a ContentObserver to
observe this event?
thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: ADT installation on Ubuntu 9.10

2009-11-29 Thread Lee Olayvar
I had the same problem. I forget what exactly is needed, and where i found
the fix, but i guess Eclipse in the repos is missing something ADT needs.

To fix it, i went to "Install New Software", and then added
http://download.eclipse.org/releases/galileo as the location. You probably
only need a specific install, but i went ahead and installed the entire list
found. Once that was done, my problems went away. :)

On Sat, Nov 28, 2009 at 2:11 PM, Christine wrote:

> I don't think you need gef for the adt plugin, but if you want it, how
> about eclipse.org/gef?
>
> There are some problems with Karmic Koala and Eclipse regarding the
> GUI. These should be fixed in Eclipse 3.5.2.
>
> On Nov 27, 7:13 am, boyjunkie  wrote:
> > Hi,
> >
> > I have installed Karmic Koala (Ubuntu 9.10) and have installed Eclipse
> > 3.5 (Galileo) on the same. When I tried to install ADT, I am getting
> > the following  error message:
> >
> >  "Cannot complete the install because one or more required items could
> > not be found.
> >   Software being installed: Android Development Tools
> > 0.9.4.v200910220141-17704 (com.android.ide.eclipse.adt.feature.group
> > 0.9.4.v200910220141-17704)
> >   Missing requirement: Android Development Tools
> > 0.9.4.v200910220141-17704 (com.android.ide.eclipse.adt.feature.group
> > 0.9.4.v200910220141-17704) requires 'org.eclipse.gef 0.0.0' but it
> > could not be found"
> >
> > Can someone point me to where I can find this missing plugin?
> >
> > Thanks,
> > Ganesh
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Lee Olayvar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: app for blocking apps

2009-11-29 Thread Edward Falk


On Nov 28, 5:16 pm, sleith  wrote:
> any one know the code to block app so cannot be launched? >.<
> thx

Why would you want to do this?  It sounds like you want to take
control away from the user.  If the user doesn't want an app launched,
they can, you know, just not launch it.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: why is my app asking to access phone calls and storage?

2009-11-29 Thread Max Binshtok
Rachel, thanks for the extended explanation but I did understand what
Diane was saying. I just don't see how this can solve my problem. Or
better put how this problem can be solved. I might be wrong (I
probably am) but I remember that initially I wanted to get the IMEI or
something and without requesting PHONE_STATE the app crashed. But it
was on 1.0 and not 1.5. Doesn't matter now anyway.

Diane, what would be the right place to put this? It was just before
 in my manifest, which was the last tag in
the manifest. I tried removing it and adding through the "wizard" the
"wizard" placed it as the last tag in the manifest. I tried moving it
to the very top as the first tag after the opening  tag.
Did not work.

Can you please confirm this:

"I realized that because I was installing
the app directly from the .apk file instead of the market, the Phone
Calls and Storage permissions always come up.  When it is put on the
Market, they are gone.  Don't think this was intended, but setting
targetSdkVersion does fix it. "

message from Jarcikon (4-th from top). That was my original intent in
the original post.

If that's not the case - then what do I need to do - there must be
some way to overcome this problem since I don't need those
permissions. I don't want to put out a newer version to the market and
have this problem and then I can't basically go back. I have updated
my application to support various screen densities long time ago, but
this permission thing was holding pushing the update forever.

Thanks,
Max.










On Nov 29, 11:52 am, Dianne Hackborn  wrote:
> Are you sure you are putting  in the right place?
>
> And thanks Rachel for the explanation.  Trying to explain to the user some
> subtlety about old applications here seemed pretty difficult, and not to
> useful for a temporary situation.
>
> On Sat, Nov 28, 2009 at 12:02 PM, Max Binshtok wrote:
>
>
>
> > How do I overcome this?
>
> > I have:
> >  > uses-sdk>
>
> > If that is what you mean by "explicitly targeting API 4 or latter"
> > then this does not seem to solve the problem. I don't need and don't
> > want those permissions.
>
> > Thanks.
>
> > Slightly OFF TOPIC:
> > I don't understand... Why do you want to tell people that my
> > application requires phone permissions when it clearly doesn't? This
> > is really, *really* bad! People are suspicious and hesitant to install
> > apps that require not needed permissions. Moreover, PHONE_STATE
> > permission has this weird interpretation in a smaller font - read
> > phone state and identity (Identity!? People are terrified by all
> > "identity theft" propaganda). At some point I asked for PHONE_STATE
> > permissions to access the serial number to be able to tell different
> > users apart. Do you know what this lead to? I had a real comment on
> > the market from someone who claimed that I stole his password
> > (whatever this means) and he had to spend 3 hours on the phone with
> > TMobile to gain control of his phone (with foul language all over the
> > comment) . I don't need those permissions and I don't want people to
> > be suspicious and write stupid comments and this is not only me as the
> > first message attests as well.
>
> > Regards,
> > Max.
>
> > On Nov 28, 1:44 pm, Dianne Hackborn  wrote:
> > > Yes, and I am saying this is the normal expected behavior for apps that
> > are
> > > not explicitly targeting API 4 or later.
>
> > > On Sat, Nov 28, 2009 at 10:35 AM, Max Binshtok  > >wrote:
>
> > > > Diane, it seems to me that you did not understand the problem.
>
> > > > I (and I believe other people) do NOT ask for those permissions in the
> > > > manifest since I do not need them. But when the application is to be
> > > > installed they show up (it says that the app is asking for those
> > > > permissions). Please read the very first post. It says that "Hello
> > > > World" application when to be installed is asking for those
> > > > permissions although they are not present in manifest.
>
> > > > Regards,
> > > > Max.
>
> > > > On Nov 26, 1:46 am, Dianne Hackborn  wrote:
> > > > > These are new permissions added to 1.6.  If an application is
> > targeting
> > > > > anything below API 4 (1.6), they will automatically be requested
> > because
> > > > in
> > > > > 1.5 and lower there was no restriction on these operations.  As of
> > 1.6
> > > > these
> > > > > permissions were added, and if you target API 4 or later you need to
> > > > > explicitly request the permission in your manifest to be granted it.
>
> > > > > On Wed, Nov 25, 2009 at 10:17 PM, Max Binshtok <
> > max.binsh...@gmail.com
> > > > >wrote:
>
> > > > > > I am having the same problem and I just want to confirm:
>
> > > > > > You are saying that when you try to install over the air (just by
> > > > > > downloading APK file) you get asked those permissions, but when
> > your
> > > > > > application is installed through the Android Market - you are NOT
> > > > > > asked for PHONE_STATE and STORAGE? Is that correct?
>
> > > > >

Re: [android-developers] Overlays on Map

2009-11-29 Thread TreKing
"Is there a limit to the number of Overlays that can be added to a Map?"

Don't think so, but if there is it's definitely more than two.

"My application works fine when I add two overlays, but fails for more than
two"

Fails HOW? What's the stack trace / exception / unexpected behavior?

"Any ideas as to why this is happening?"

Not based on the limited information provided. But make sure any itemized
overlays you're adding have at least one item in them. If you add an
itemized overlay with 0 items, it will crash when you tap the screen (I
found this out the hard way).

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking


On Sat, Nov 28, 2009 at 7:45 PM, Samson Sequeira wrote:

> Is there a limit to the number of Overlays that can be added to a Map?
>
> My application works fine when I add two overlays, but fails for more
> than two. This is a part of my code
>
> for (int index=0;index  if (color.get(index)==100){
>  overlayitem = new OverlayItem(listOfGeopoints.get
> (index), "", "");
>  itemizedOverlay1.addOverlay(overlayitem);}
>
> else if (color.get(index)==75){
>  overlayitem = new OverlayItem(listOfGeopoints.get
> (index), "", "");
>  itemizedOverlay2.addOverlay(overlayitem);}
>
> else if (color.get(index)==50){
>  overlayitem = new OverlayItem(listOfGeopoints.get
> (index), "", "");
>  itemizedOverlay3.addOverlay(overlayitem);}
>
>  else {
>  overlayitem = new OverlayItem(listOfGeopoints.get
> (index), "", "");
>  itemizedOverlay4.addOverlay(overlayitem);}
>}
>
>  mapOverlays.add(itemizedOverlay1);
>  mapOverlays.add(itemizedOverlay2);
>  mapOverlays.add(itemizedOverlay3);
>  mapOverlays.add(itemizedOverlay4);
>
>
> Any ideas as to why this is happening?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: app for blocking apps

2009-11-29 Thread Lance Nanek
I can think of some legitimate reasons. What if the user is a parent,
for example, and wants to let a very little kid use the phone. They
might like to be able to setup an application white list.

Without a parental code entered the phone would only run a pre-
approved set of apps that the parent has checked out to make sure the
kid can't get in trouble with.

I think the Xbox has a similar system where a parental code can limit
the rating level of games and limit online content and contacts.

On Nov 29, 1:05 pm, Edward  Falk  wrote:
> On Nov 28, 5:16 pm, sleith  wrote:
>
> > any one know the code to block app so cannot be launched? >.<
> > thx
>
> Why would you want to do this?  It sounds like you want to take
> control away from the user.  If the user doesn't want an app launched,
> they can, you know, just not launch it.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Density independence for GradientDrawable

2009-11-29 Thread mgpc
Hi,

I'm trying to work with the (wonderfully undocumented) android
gradient drawables in a way that's independent of screen density. No
luck so far.

This is the gradient drawable that I'm using:

  

It looks fine on a standard HTC Dream screen, but the scaling is wrong
on the higher-density Droid screen. (I tried it both on the emulator
and the hardware)

If I try to change it to

  android:gradientRadius="350dp"

I get the following error:

Dimension types not allowed (at 'gradientRadius'  with value '350dp').

The relevant documentation, is, ahem, a little light on detail:
http://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html#attr_android:gradientRadius

Any idea what's going on here. Why can units not be specified for
gradientRadius? Is there a way to specify a denisty-independent
gradientRadius from the XML file? Or have I misunderstood what
gradientRadius is doing?

Any help appreciated.
Thanks,
Mark

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: app for blocking apps

2009-11-29 Thread Spektor Yaron
yes, and you can also time bomb it when the application expires.
http://stackoverflow.com/questions/1223552/how-to-time-bomb-an-android-application

Enjoy,

On Sun, Nov 29, 2009 at 11:31 PM, Lance Nanek  wrote:

> I can think of some legitimate reasons. What if the user is a parent,
> for example, and wants to let a very little kid use the phone. They
> might like to be able to setup an application white list.
>
> Without a parental code entered the phone would only run a pre-
> approved set of apps that the parent has checked out to make sure the
> kid can't get in trouble with.
>
> I think the Xbox has a similar system where a parental code can limit
> the rating level of games and limit online content and contacts.
>
> On Nov 29, 1:05 pm, Edward  Falk  wrote:
> > On Nov 28, 5:16 pm, sleith  wrote:
> >
> > > any one know the code to block app so cannot be launched? >.<
> > > thx
> >
> > Why would you want to do this?  It sounds like you want to take
> > control away from the user.  If the user doesn't want an app launched,
> > they can, you know, just not launch it.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Yaron Spektor

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] determine if app has been launced

2009-11-29 Thread schwiz
Can anyone suggest a simple way to determine if it is the first time
my app has ever been launched since it has been installed?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Problem with 9-patches in drawable for custom button style

2009-11-29 Thread Romain Guy
The padding is constant in a selector, you cannot achieve what you want this
way.

On Nov 29, 2009 10:04 AM, "Jarett"  wrote:

Hi guys,

I'm having a bit of a problem with a custom button style. I have the
button states (9-patch drawables) set up in a  drawable. The
style I'm going for is a button that looks like it gets pushed down,
i.e., you can see the front edge of the button until you press it. It
works fine for the button itself, but the contents of the Button (or
ImageButton) don't move when pressed, even though I have the 9-patch
areas set up to move the content area for the depressed button states.
It seems like it's keeping the same 9-patch areas no matter which
image it's showing.

Here's an animated GIF to help make the problem a little clearer,
since I'm awful at explaining things:
http://www.crappytools.net/button_problem.gif
The button moves when pressed, but the icon inside stays still. I
played with the Draw 9-Patch utility, and it shows that the content
area in the depressed image should be shifting downwards like
intended.

Any help is appreciated!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Start another activity with a broadcast intent

2009-11-29 Thread Moritzz
Hi!

I'm trying to start an activity out of a widget so I can't use the
startActivity() function. So I'm trying to create the correct intent
but I don't find what I'm missing. Here's my code:

-
Intent clickIntent = new Intent();
clickIntent.setAction(Intent.ACTION_MAIN);
clickIntent.addCategory(Intent.CATEGORY_LAUNCHER);
clickIntent.setComponent(new ComponentName(packageName, classToCall));
clickIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

PendingIntent pendingIntentClick = PendingIntent.getActivity(context,
0, clickIntent, Intent.FLAG_ACTIVITY_NEW_TASK);

views.setOnClickPendingIntent(id.getButton(), pendingIntentClick);
-

What am I missing???

Cheers,

Moritz

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: determine if app has been launced

2009-11-29 Thread Lance Nanek
How about just using a preference? Something like this:

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences
(getBaseContext());
boolean firstTime = prefs.getBoolean("firstTime", true);
if ( firstTime ) {
SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean("firstTime", false);
editor.commit();
}

On Nov 29, 5:26 pm, schwiz  wrote:
> Can anyone suggest a simple way to determine if it is the first time
> my app has ever been launched since it has been installed?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How can I enable the Google search by voice in Android phone (HTC dream)

2009-11-29 Thread richard
Hi All,

  I want to develop an application using the voice recognition.
Can anybody tell me how to enable the Google search by voice on
android phone?

  I have the HTC dream device, but I can not find the microphone
icon on the right of the Google search widget.  Have I missed
anything?

  Thank you very much.

Richard.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] splash screen and low memory

2009-11-29 Thread rukiman
In my game a splash screen is shown which preloads all the sound/
bitmap resources to be used by the game. The game consists of other
activities that all depend on resources i.e menu activities, game
activity etc.

However when simulating low memory conditions in the emulator, I
noticed that our game process was being killed and when pressing the
back key the last activity that was on screen of the game is loaded,
however it crashes as the resources are not in memory.

Does that mean every activity in my game needs to check is the
resources are loaded and if not show up the splash screen activity and
load the resources before returning to the activity? Is there a nicer
way of doing this?

Can't I just make the system follow the normal pattern of starting my
game i.e splash screen and then display the menu and then the user can
choose to resume the game themselves. Is this possible?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to enable different css in WebView

2009-11-29 Thread James Wang
Nobody have any opinion?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ImageButton handling of transparent src pngs

2009-11-29 Thread NoraBora
try  android:background="@null"

On Nov 28, 4:12 pm, Mark Rosenberg 
wrote:
> ImageButton doesn't honor the transparency of my android:src png. My
> src image is a rounded rectangle, with the remaining portion of the
> bounding rectangle set to be transparent. When the button is
> displayed, what should be transparent is a dark shadowy color. The
> images I'm using are OK, and display the proper transparency when
> shown in a browser. android:background="@android:color/transparent"
> doesn't have any effect. Or do I need to subclass ImageView directly
> to get the desired handling of the src image transparency?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-29 Thread frantz lohier
Thank you Dmitri for the code. I've reviewed it and don't see any
interaction with the AccountManager.

One of the problem with SDK 2.0 is that pickup contacts is condition by
having a user login with a proper account.

My application crashes under the emulator because I cannot profile a Gmail
account for instance from which to browse  the phonebook.

There seem to be a new AccountManager APIs. Can you or anybody highlight how
this API works. For instance, when Starting an activity to pick up a
contact, an app would want to make sure that the user has picked up an
account and logged to it (if not, defaulting to the SIm contact list seems
appropriate).

Would it be possible for you to update your very good businesscardacitivity
to reflect this ?

Thanks,





On Tue, Nov 3, 2009 at 1:44 PM, Dmitri Plotnikov wrote:

> I just published some sample code illustrating this use of both legacy and
> new Contacts APIs in the same app.  See
> http://code.google.com/p/android-business-card
>
> Cheers,
> - Dmitri
>
>
> On Mon, Nov 2, 2009 at 9:31 AM, Mark Murphy wrote:
>
>> jarkman wrote:
>> > int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
>>
>> Note that if you are using API version 4 (1.6 and newer), there is
>> Build.VERSION.SDK_INT, which already converts this to an integer.
>>
>> If you are still using API version 3, you'll need to parse the String as
>> shown above.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://twitter.com/commonsguy
>>
>> Android 1.6 Programming Books: http://commonsware.com/books
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Picking up a PhoneBook entry under Android 2.0 !!!

2009-11-29 Thread frantz lohier
Thanks Jarkman.

2 questions:

1) Does:
int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
if (sdkVersion < Build.VERSION_CODES.ECLAIR)

Return the OS/SDK version currently run by the underlying platform or does
it return the target SDK level the APP was compiled for ?

2) Is there a way for an App to learn what is the current language
(input/display)  being used ?

Thanks,


On Mon, Nov 2, 2009 at 9:23 AM, jarkman  wrote:

>
>
> On Nov 2, 5:02 pm, frantz lohier  wrote:
>
>
> >  + in the Market, should we upload different app versions compiled for
> > different SDK/OS configuration ? Can the market app offer a specific
> version
> > of an app to an end-user depending on what OS version is used ?
>
> It would certainly make our lives easier if the Market supported
> alternative binaries for different OS versions.
>
> >  + how does an app know what OS version is currently used ?
> >  + how can an app dynamically make use of new SDK feature with the same
> > executable ? (for example, how can I activate TTS if it is supported).
> > Backward compatibility is discussed here:
> http://android-developers.blogspot.com/2009/04/backward-compatibility
> > Unfortunatly, this link does not tell me how to selectively do an "import
> > android.speech.tts.TextToSpeech" for my code to compile.
>
> What you can do is build against the 2.0 SDK, but wrap up all your 2.0
> stuff in a class which you only instantiate if you are on a 2.0
> device.
> Build a base class which is mostly abstract, and a 1.6 version of the
> same class which implements the same functionality but with 1.6 APIs.
> Then use this trick to instantiate the right subclass:
>
> int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
> if (sdkVersion < Build.VERSION_CODES.ECLAIR)
> {
>  className = "com.foo.ContactAccessorSdk3_4";   // one subclass of
> ContactAccessorBase
> }
> else
> {
>  className = "com.foo.ContactAccessorSdk5"; // another subclass of
> ContactAccessorBase
> }
>
>  /*
>  * Find the required class by name and instantiate it.
>  */
>  try {
> Class clazz =
>Class.forName(className).asSubclass
> (ContactAccessor.class);
>ContactAccessorBase sInstance = clazz.newInstance();
>  } catch (Exception e) {
>  throw new IllegalStateException(e);
> }
>
> (thanks, Dmitri!)
>
>
>
>
> > On Mon, Nov 2, 2009 at 8:54 AM, frantz lohier  wrote:
> > > Thanks Jarkman for your perspectives on this.
> >
> > > 2 additional questions;
> >
> > > - can the emulator simulate accessing a gmail account ? (as ways to
> avoid
> > > dealing with the Accountmanager APIs)
> >
> > > - A more general and critical question; if apps start to have to behave
> > > differently based on the Android OS version they run on, there are a
> lot of
> > > implications;
> >
> > > On Mon, Nov 2, 2009 at 2:33 AM, jarkman  wrote:
> >
> > >> On Nov 2, 1:57 am, frantz lohier  wrote:
> >
> > >> > When running the same code (compiled with SDK 1.6) and a target
> emulator
> > >> at
> > >> > 2.0 level, the above code never return the entries I have populated
> in
> > >> my
> > >> > the phone book. It's as if the phonebook was always empty.
> >
> > >> My (hazy) understanding is that the 1.6 APIs will only show you the
> > >> contacts in the primary gmail-syncing account on the device. As the
> > >> emulator doesn't have one of those accounts, your newly-entered
> > >> contacts are in a different account (or in some kind of no-account
> > >> limbo), so they are invisible to the 1.6 APIs.
> >
> > >> I think that on a real device with a real account the situation will
> > >> be better, though you still need to move to the 2.0 APIs to support
> > >> users who have multiple accounts.
> >
> > >> It may be possible to use the AccountManager APIs to manufacture an
> > >> account of the right sort in the emulator, which would make it
> > >> possible to enter new contacts who would show up in the 1.6 APIs, but
> > >> I don't think there are enough clues in the published docs to tell us
> > >> how to do that.
> >
> > >> > - When running the emulator in 2.0 mode, the default local input
> type is
> > >> > Japaneese. Any way to change this ?
> >
> > >> Yes, you can fiddle with the IME settings in the Settings app, in
> > >> 'Language & Keyboard'.
> >
> > >> Richard
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to
> android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> 
> >
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/android-developers?hl=en
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsub

[android-developers] Re: TTS 1.9 not working in Emulator. Please help.

2009-11-29 Thread greg
Last I tried (about a month ago), the TTS tutorial worked on the
emulator.

Have you tried looking at logcat to get a more detailed message about
the problem?

- Greg

On Nov 28, 2:23 am, Anuj  wrote:
> Hi,
>
> No matter how many times I re-create the SD card and start the
> emulator along with SD card the application seems to crash and errors
> out with the message "The application has stopped working
> unexpectedly."
>
> I am able to run the simple text based Hello World Android application
> on my emulator successfully and the problem is present for TTS
> application only.
>
> I followed the steps provided 
> inhttp://eyes-free.googlecode.com/svn/trunk/documentation/tutorial/tuto...
>
> but still not able to run the application from the past 3 days. Can
> someone help me out please?
>
> Thanks in advance
> Anuj

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android in China - What is going on?

2009-11-29 Thread shimsim
Let not be angry that China is blocking Google, getting angry wont
help in this case ... this is just about understand the specifics of
what is going on. For those of us living in China we are all very
aware of the general blocking/filtering that has been going on for a
very long time. This is nothing new and for the most part is related
to political issues.

Google does not need to take on the government or figure out some way
to bypass the GFW, that would of course be pointless, but as we know
Google has made every effort to comply with the government request and
thats why Google search and Gmail (web based) works fine here. If they
didnt work or were being blocked all the time, many people would
switch to bing and hotmail to avoid the hassle or using vpns all the
time.

Now in the case of sync with Android its a very different situation,
so again  this blocking is new and only started since the 60th
anniversary celebrations  this blocking effects specifically Gmail
on the Android device but leaves it accessible on the web (meaning is
targeting Android)   this blocking stops access to the market app
downloads (again specifically targeting Android).

If the market is the problem, google can very easily filter it, so
what is the problem?

In the past when google has been blocked, ie search and gmail, they
have issued statements explaining why ... even if the reasons seemed
unjustified, like the crackdown on porn, google went as far as to
issue public statements and expressed a desire to resolve the issues
and reinstate the services effected. This is because it values the
market over here.

Considering the mobile market size over here and the recent articles I
have been reading on China Mobiles use of Android, I am wondering if
the blocking is being done by the government or by China mobile or for
some other currently undisclosed reason.
Whatever the reason might be its unlikely that google does not care
and I simply want to know what the future holds for Android in China.
If the blocking is a permanent feature, then its important for me and
others out here to know this and it would certainly help if we knew
why.

Thanks!




On Nov 29, 9:19 am, Michael (许晖)  wrote:
> On Wed, Nov 25, 2009 at 10:18 PM, shimsim  wrote:
> > Like I said in the post, it's blocked 90% of the time, not all the
> > time, which makes it even stranger.
>
> > The strangest things though is just how quiet Google is being about
> > this, actually less open that the GFW!
>
> I can not understand more why you get so angry. Everybody should get angry
> about blocking from GFW.
> But well, what do you expect Google to do about this? China gov never admit
> the existence of GFW. If Google explains to the public that services used by
> Android are blocked by GFW by China gov, it's definitely against China gov.
> If Google builds some way to by pass GFW, it's against China gov too since
> they actually DO operate GFW. So no matter what Google would do, they would
> piss off China gov and get kicked out of China. Can you imagine a company
> fight against the biggest government in the world? So obvious ending it
> would have. This is China I have to say.
>
> Someone please shed some light on whats going on here
>
>
>
>
>
>
>
> > On Nov 25, 12:06 pm, Jie Hong  wrote:
> > > I can understandChinaGov blocks Google sync service.
> > > The real strange thing is there are always a few hours sync service
> > > can work everyday,
> > > can anyone explain this?
>
> > > On 11月25日, 上午8时48分, shimsim  wrote:
>
> > > > Well I can safely say the blocking is back in GZ, as of last night no
> > > > more sync. I was actually thinking how the timing of this problem as
> > > > matched the launch of the iPhone inChina... makes you wonder ...
>
> > > > The only thing worse than the GFW is any lack of explanation from
> > > > Google ... thanks Google for being open about this problem.
>
> > > > Best regards,
>
> > > > The proud owner of an Android phone that became useless
>
> > > > On Nov 22, 1:01 pm, Evan JIANG  wrote:
>
> > > > > I was at Shenzhen last week. It is strange that the google sync
> > > > > doesn't work in Shenzhen, but it works perfectly in Beijing. I hadn't
> > > > > modified any settings. And in Beijing, both CNC network and CMCC APN
> > > > > work fine.
>
> > > > > Best regards,
>
> > > > > On Sat, Nov 21, 2009 at 9:26 AM, shimsim  wrote:
> > > > > > Hi westmeadboy, i just tried accessing the google sync page from
> > the
> > > > > > link you posted and it works fine on my G1 both on WiFi and using
> > > > > >ChinaMobile APN, so maybe its a regional issue too. I'm located in
> > > > > > GZ.
>
> > > > > > Don't get me wrong, I am happy to use this topic for everyone to
> > post
> > > > > > their current experiencing with the issues with Android inChina, I
> > > > > > just want to keep pushing for some official answers too. More posts
> > > > > > please, lets keep the momentum here!
>
> > > > > > Ironically the day after sta

[android-developers] Re: Android in China - What is going on?

2009-11-29 Thread westmeadboy
On Nov 30, 11:16 am, shimsim  wrote:
> Considering the mobile market size over here and the recent articles I
> have been reading on China Mobiles use of Android, I am wondering if
> the blocking is being done by the government or by China mobile or for
> some other currently undisclosed reason.

Can anyone confirm whether the same problem exists when using China
Telecom and/or China Unicom?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Https client in Android

2009-11-29 Thread JITU
Hi All,

Is android supports https ?

Objective: Sending a xml file over https to a web server.
The GET and POST is working fine with HTTP, but i don't have any idea
regarding https.

It will be great if some sample code can provide me.

Regards,
jit

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: app for blocking apps

2009-11-29 Thread Jarrod Overson
That seems really short sighted, to assume that you can understand all cases
so bluntly.

What if someone wanted to write a parental control application?

On Nov 29, 2009 10:06 AM, "Edward Falk"  wrote:

On Nov 28, 5:16 pm, sleith  wrote: > any one know the
code to block app so ca...
Why would you want to do this?  It sounds like you want to take
control away from the user.  If the user doesn't want an app launched,
they can, you know, just not launch it.

-- You received this message because you are subscribed to the Google Groups
"Android Developers" ...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Intents for google maps

2009-11-29 Thread sreekanth nambu
Hi all

   I am developing a android project named " Smart Google Maps ".For
my App, I need to use Google Maps Application which is built in with
Android SDK 1.6.I need to call google Maps from my App. How could I do
that?

I am able to use call Phone dialer using intents from my
Application.But I am unable to do it for Google Maps.
I did'nt find any intents for google maps to call GoogleMaps from my
application.
Can anyone suggest me solution for this? Its is my term project and
dead stuck with it?

Regards
Sreekanth Nambu

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Complex Object Collision Detection

2009-11-29 Thread Brian
Hello,

I am currently working on a collision detection routine for an Android
based game which is capable of handling complex concave curves in 2D.
I use complex in this post to describe any non-trivial, arbitrary
shape (beyond circles, squares, etc.).  My problem is that all of the
various methods I have come across are either too simplistic to be
realistic or too complex for a cell phone.  At the moment I am
favoring a tile-based scheme but I am having problems figuring out how
to do this with convex curves that span several tiles and may have
several line segments per tile.  I gave some thought to representing
the curves mathematically, with each tile being an interval of the
function, but there will likely be points where the curve doubles-back
on itself (think the big loop at the top of a pinball table that
brings the ball all the way around the table and back the direction it
came).  My questions boil down to:

1.  Does anyone know of a way of hit testing a given simple shape (eg.
a circle) against a concave series of line segments (shapes beyond
circles can be figured out from there) beyond just a Boolean result?

2.  What is the best way to represent large, complex shapes
programatically?  I am currently favoring an XML file describing my
levels and the objects in them with shape/position/physics/etc. data
to be parsed in during load time.

3.  Is there an altogether better way of doing this beyond line
segments?

The one saving grace in this conundrum is that I know the vast
majority of the objects are stationary with, at most, three or four
(usually one) dynamic objects moving around.  Thanks in advance for
any help.

-cheers

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] -http-proxy question ?

2009-11-29 Thread Gopinath Janakiraman
Hello,
I am inside a firewall. I am using google GeoCoder API. I started the
emulator using -http-proxy http://54.62.228.195:8080 option. I getting
the following error

E/GeoAddress(  228): java.io.IOException: Unable to parse response
from server
E/GeoAddress(  228):at android.location.Geocoder.getFromLocationName
(Geocoder.java:166)
E/GeoAddress(  228):at com.androidbook.location.GeoAddress$1.onClick
(GeoAddress.java:37)

When I started the emulator with verbose I see the emulator is using
the proxy as intended.

emulator: sent '0012host:emulator:5557' to ADB server
emulator: setting up http proxy:  server=54.62.228.195 port=8080

BTW, I am using the same proxy server/Port  for other applications and
it works fine.

What could be the problem ? Please help

Regards
GOPI

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] View objects lose onclick listeners when screen orientation changes

2009-11-29 Thread Joey Carson
Hello all.. This is my first time using a forum for android and I am
relatively new to it as well.  I'll cut straight to the chase since
this is a seemingly trivial issue that I just cannot find an answer
to.  I have created a table layout of view objects using Java code and
have set the onclick listener.  This works fine at first, but when the
screen orientation is changed and I try to click one of the Views, I
get a force close error.  I change the orientation back again and
still get the error.  What can I do?  Thanks to all who respond.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Problem with 9-patches in drawable for custom button style

2009-11-29 Thread Jarett
Oh, bummer. Is there some theme-wide (i.e., XML) way to do this, or am
I going to have to do it via Java? Is there a recommended way to
accomplish this?

Also, just out of curiosity, how does it select which 9-patch area to
use for the padding?

Thanks,
Jarett

On Nov 29, 5:51 pm, Romain Guy  wrote:
> The padding is constant in a selector, you cannot achieve what you want this
> way.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Https client in Android

2009-11-29 Thread Nithin
Hi,

I also want to know whether Android support Https.

Thanks

On Nov 30, 9:20 am, JITU  wrote:
> Hi All,
>
> Is android supports https ?
>
> Objective: Sending a xml file over https to a web server.
> The GET and POST is working fine with HTTP, but i don't have any idea
> regarding https.
>
> It will be great if some sample code can provide me.
>
> Regards,
> jit

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Intents for google maps

2009-11-29 Thread Nithin
Hi Sreekanth,

You need to get the google map API key and launch your application
with Google API 4 from AVD manager.

The procedure for getting API key is,
http://groups.google.com/group/android-developers/browse_thread/thread/38545a723378005f/7cfc6ca3237bf348

Thanks

On Nov 29, 11:53 pm, sreekanth nambu 
wrote:
> Hi all
>
>    I am developing a android project named " Smart Google Maps ".For
> my App, I need to use Google Maps Application which is built in with
> Android SDK 1.6.I need to call google Maps from my App. How could I do
> that?
>
> I am able to use call Phone dialer using intents from my
> Application.But I am unable to do it for Google Maps.
> I did'nt find any intents for google maps to call GoogleMaps from my
> application.
> Can anyone suggest me solution for this? Its is my term project and
> dead stuck with it?
>
> Regards
> Sreekanth Nambu

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: View objects lose onclick listeners when screen orientation changes

2009-11-29 Thread Nithin
Hi Joey,

Use saveInstanceState()and restoreInstanceState() to save and restore
the View settings. When the screen orientation changes, Activity will
call saveInsatnceState() and can restore the saved properties in
restoreInstanceState().

Thanks

On Nov 30, 7:30 am, Joey Carson  wrote:
> Hello all.. This is my first time using a forum for android and I am
> relatively new to it as well.  I'll cut straight to the chase since
> this is a seemingly trivial issue that I just cannot find an answer
> to.  I have created a table layout of view objects using Java code and
> have set the onclick listener.  This works fine at first, but when the
> screen orientation is changed and I try to click one of the Views, I
> get a force close error.  I change the orientation back again and
> still get the error.  What can I do?  Thanks to all who respond.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] FLV - VP6 integration

2009-11-29 Thread Nilly
HI,

I want to integrate FLV/vp6 to android PV player.How can I do that?I
have googled it but I have got only info 

The parser would have to be integrated as a native OpenCore node. You
could integrate the codec as a native OpenCore node or as an OpenMax
codec using the IL extensions.

How can I integrate the codec as a native opencore node or openMAx
codec using IL extensions?

Regards,
Niral

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Upgrading database for an app

2009-11-29 Thread jeffro
Here's a snippet of code that may help you.  I rename the old table,
create the new table, and then insert the data into the new table
while modifying the data.

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion) {
Log.d(getClass().getName(), "Upgrading Database.");
if(oldVersion==1) {
db.execSQL(VEHICLE_RENAME_VERSION_1);
db.execSQL(VEHICLE_CREATE);
upgradeVehicle2(db);
}
}

private void upgradeVehicle2(SQLiteDatabase db){
//get cursor to old vehicle table
Cursor cursor = db.query("vehicle_1", new String[]
{"_id","vehicle","notes","selected","vehicle_uri","weight"}, null,
null, null, null, null);

while(cursor.moveToNext()){
ContentValues values = new ContentValues();
values.put("_id", cursor.getLong(0));
values.put("vehicle", cursor.getString(1));
values.put("notes", cursor.getString(2));
values.put("selected", cursor.getShort(3));
values.put("vehicle_uri", cursor.getString(4));
values.put("weight", cursor.getFloat(5));
values.put("drivetrain_loss",
Constants.VEHICLE_DEFAULT_DRIVETRAIN_LOSS);
db.insert("vehicle", null, values);
}
}

Jeff
http://www.trackaroo.com

On Nov 29, 9:02 am, "Dexter's Brain"  wrote:
> Is it sufficient if I change the database version? Or, first I will
> have to back up the db programatically and then restore all the tables
> with contents?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Different screen sizes + API level

2009-11-29 Thread jeffro
You'll need to specify which screen sized you support in your manifest
file if you use SDK1.6.



Read more here: http://d.android.com/guide/practices/screens_support.html

Jeff
http://www.trackaroo.com

On Nov 29, 2:48 am, Donald_W  wrote:
> Hello, I would like to ask what settings are necessary for my
> application to be available on all screen sizes:
> Is it enough to compile it using SDK 1.6 (but target is set to 1.5 and
> API level to 3) or maybe I have to set target to 1.6 and API level to
> 4?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android listview with pre selected checkboxes

2009-11-29 Thread jeffro
You can create your own ListAdapter and then override the getViews
method to setup the checkboxes similar to this:

/* (non-Javadoc)
 * @see android.widget.Adapter#getView(int, android.view.View,
android.view.ViewGroup)
 */
public View getView(int position, View convertView, ViewGroup parent)
{
Setup setup = (Setup)this.getItem(position);
if (convertView == null)
convertView = inflater.inflate(R.layout.setup_mgt_row,
null);

TextView textView = (TextView) convertView.findViewById
(R.id.setup_mgt_name);
textView.setText(setup.getName());

ImageView selectedView = (ImageView) convertView.findViewById
(R.id.setup_mgt_selected);
selectedView.setTag(position);
if(setup.isSelected())
selectedView.setImageState(new int[]
{ android.R.attr.state_checked }, true);
else
selectedView.setImageState(new int[]
{ android.R.attr.state_empty }, true);
selectedView.setOnClickListener(this);

ImageView deleteView = (ImageView)convertView.findViewById
(R.id.setup_mgt_delete);
deleteView.setTag(position);
deleteView.setOnClickListener(this);

return convertView;
}

Jeff
http://www.trackaroo.com

On Nov 28, 6:11 pm, Harry  wrote:
> I have a listview with some checkboxes.
> I want some of them to be prechecked when the activity starts.
> I have the positions of those checkboxes which needs to be pre
> selected.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Soft keypad doesn't appear if EditText.setOnClickListener() is set?

2009-11-29 Thread Mark Wyszomierski
Hi,

I have an EditText. If I set an OnClickListener for it, the ime keypad
doesn't appear when I click it (using the trackball on the G1):

  EditText edit = new EditText(context);
  edit.setOnClickListener(new OnClickListener() {
  public void onClick(View v) {
  // ime keypad won't appear when this is set and clicked.
  }
  });

if I don't set the click listener, the keypad will appear when
clicked. Is this expected behavior, or am I doing something wrong?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android SDK fails to run Android 2.0

2009-11-29 Thread Epix
I have downloaded the Android SDK and installed all the components.
However, for some reason I can only launch Virtual Devices targeting
Android 1.5. Any Virtual Device targeting Android 1.6/2.0 would only
cause the emulator to show up for a fraction of a second and then
terminated without any error messages.

This is a strange problem which I cannot find any reason why, doesn't
anyone know how to fix it? Thanks a lot in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Using Account Manager API of Android 2.0

2009-11-29 Thread abhijith.off...@gmail.com
We  developed a application which connects to various social
networking hooks .I was having my own algorithms for login and token
generation ,

Recently I saw Account Manager classes and an requirement arose to use
it our app.

But we are blocked with usage of  Account Manager as only API
decsription is there , there's no desc doc which list how to use and
where I can use .Such a page is there for Content Provider .


Is there any such document available  ? or breif description will also
be helpful to start with  :)

thanks
VR

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android Webkit features and External application opening support

2009-11-29 Thread Saaravanan
Hi,

We have a some technical doubts reagrding the android webkit issues.

1. DOC,XLS,PPT,XLSX,PPTX,DOCX does not open in webkit.Is there any way
to open it.

2.Can we do any file association in android. Such as when opening an
image file or doc file the registered application for it ,like in
iphone.
(In iphone when you open an doc file in webkit an doc or xls viewer
built on webkit open).It it possible, if so how.

3.Can we open other applications. We tried it using intent but we were
unable to open other application such as (Third party - Androoffice)
as we do not know the main class/method to open it.

4.We were able to iterate the package names and information of all
installed applications, we were able to remove it using intenet but
not able to open it.

5.Are there any other api to open files directly by the os(since it is
linux kernel with android vm).


Please provide help regarding the same.
Thanking You

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] passing multi dimensional string array between two actvities.

2009-11-29 Thread pavan


Here is my Problem :

I want to pass multi dimensional String array between two activities
or pages.

I already tried with bundle.putextra like methods. But those allow
only one dimensional string array.

I really hope you can help me with example java code on this . Here is
my String array, final String[][] arr2={{"1","pavan"},{"2","kumar"},
{"3","kora"}};

Please do reply.Its very urgent for my project .


Thank you!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] launchMode problem

2009-11-29 Thread 刘冰
Hi  guys


I have a problem about launchMode for activity

1.  install my app,  open it  and go to the C activity A->B->C

2. press home key ,back to the Idle screen .

3. (one instance) long press home key, pop a screen and select my app,
i will back to C activity (this is right)

4. (other instance) when i in the idle screen ,  press the menu and go
to the app list screen, and select my app

 i will go to the A activity.(this is problem) my launchMode "
standard "

 and i test others launchMode where is problem.

thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en