Re: [android-developers] Re: App is killed when home button is pressed from any activity

2011-09-29 Thread ANKUR GOEL
ya i have tried these all retian task ...
please suggest if ant body has different alternative.


On Fri, Sep 30, 2011 at 3:20 AM, Studio LFP  wrote:

> Check out some of the information here:
>
> http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html#Clearing
>
> See if that can help you out any. That entire page is worth a read to
> understand how Android handles applications and their activities.
>
> Steven
> Studio LFP
> http://www.studio-lfp.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

-- 
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] Load Contact Image in Listview

2011-09-29 Thread Chirag Raval
Hello to all,

I am developing one demo application . In that application i am trying
to load contact photo using below function.

public static long getProfilepicture(Activity activity, String
address)
{
Uri personUri =
Uri.withAppendedPath(ContactsContract.CommonDataKinds.Phone.CONTENT_FILTER_URI,
address);
Cursor phoneCursor =
activity.getContentResolver().query(personUri,projection, null, null,
null);

if (phoneCursor.moveToFirst())
{
int indexPersonId =
phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID );
long personId = phoneCursor.getLong(indexPersonId);
phoneCursor.close();
//  Uri uri =
ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,
personId);
return personId;
}
return 0;
}

public static Bitmap loadContactPhoto(ContentResolver cr, long  id)
{
Uri uri =
ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, id);
Log.i(" Load Contact Photo",".."+uri);
InputStream input =
ContactsContract.Contacts.openContactPhotoInputStream(cr, uri);
if (input == null)
{
Log.i(" Input is Null","..");
return null;
}
return BitmapFactory.decodeStream(input);
}

First function  getProfilepicture return the id of the contact person
on based of mobile number. Second function loadContactPhoto return the
bitmap.

But the second function always return the null.Can anyone tell me what
is the problem ? Where i am wrong ?

Here i also mentioned the Uri from which function trying to
openContactPhotoInputStream.
content://com.android.contacts/contacts/32

Thanks in advance.

Regards,
Chiag raval.

-- 
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] Load Contact Image in Listview

2011-09-29 Thread Chirag Raval
Hello to all,

I am developing one demo application . In that application i am trying
to load contact photo using below function.

public static long getProfilepicture(Activity activity, String
address)
{
Uri personUri =
Uri.withAppendedPath(ContactsContract.CommonDataKinds.Phone.CONTENT_FILTER_URI,
address);
Cursor phoneCursor =
activity.getContentResolver().query(personUri,projection, null, null,
null);

if (phoneCursor.moveToFirst())
{
int indexPersonId =
phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID );
long personId = phoneCursor.getLong(indexPersonId);
phoneCursor.close();
//  Uri uri =
ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,
personId);
return personId;
}
return 0;
}

public static Bitmap loadContactPhoto(ContentResolver cr, long  id)
{
Uri uri =
ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, id);
Log.i(" Load Contact Photo",".."+uri);
InputStream input =
ContactsContract.Contacts.openContactPhotoInputStream(cr, uri);
if (input == null)
{
Log.i(" Input is Null","..");
return null;
}
return BitmapFactory.decodeStream(input);
}

First function  getProfilepicture return the id of the contact person
on based of mobile number. Second function loadContactPhoto return the
bitmap.

But the second function always return the null.Can anyone tell me what
is the problem ? Where i am wrong ?

Here i also mentioned the Uri from which function trying to
openContactPhotoInputStream.
content://com.android.contacts/contacts/32

Thanks in advance.

Regards,
Chiag raval.

-- 
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] Automatic wake up app on server action or Push Registry in Android

2011-09-29 Thread Animesh Sinha
Hi all

 I am developing an application in that there is a requirement
that server will send a message to the device at a specific port and
our app will respond on such message and invoke our app automatically.
But i am come to know that Android Application doesn't have Push
Registry system like J2ME.

   Is there any other way to do the same thing i.e. server will ping
to device and our app will wake up on.


Thanks in Advance.
Please help me.

-- 
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: Is C2DM still the push option-after the discontinuance of google labs.

2011-09-29 Thread Doug
On Sep 29, 10:15 pm, maccoy  wrote:
> Can we rely on C2DM the push option for Android, as it seems it is
> discontinued along with google labs or is there any other options?

Yesterday I attended a presentation by a Google employee that involved
using C2DM as mechanism to notify devices.  I'm under the impression
that it's not going away any time soon.  I think C2DM is more closely
related to Google App Engine rather than Google Labs.  The
presentation was about using Google App Engine with your Android apps.

Doug


-- 
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 to Change the default Accessibility Talkback speech with our applications settings?

2011-09-29 Thread abi
Please Suggest...

-- 
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] Is C2DM still the push option-after the discontinuance of google labs.

2011-09-29 Thread maccoy
Can we rely on C2DM the push option for Android, as it seems it is
discontinued along with google labs or is there any other options?

-- 
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: How to capture sensor moves using SensorSimulator

2011-09-29 Thread KK
Thanks for your response.
Is there any documentation on the web that contains some of the
parameters(already tuned to some extent) that I can try with. For instance I
found couple of examples talking about shake and there is a mention of:
(accelationSquareRoot >= 2) means shake detected,
This is the complete code for this:

public void onSensorChanged(SensorEvent event) {
// TODO
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
 float[] values = event.values;
// Movement
float x = values[0];
 float y = values[1];
float z = values[2];

float accelationSquareRoot = (x * x + y * y + z * z)
 / (SensorManager.GRAVITY_EARTH * SensorManager.GRAVITY_EARTH);
long actualTime = System.currentTimeMillis();
 if (accelationSquareRoot >= 2) //
{
if (actualTime - lastUpdate < 200) {
 return;
}
lastUpdate = actualTime;
 // Shake Detected
// TODO: do something
 }

}
}

Thanks in advance.

Regards,
KK

On Thu, Sep 29, 2011 at 10:46 PM, ColorTheorist <
colortheorydevelo...@gmail.com> wrote:

> You'll have to use the sensormanager class and use thresholds as you
> have mentioned at the lowest level by subscribing to the
> accelerometer. From there you should be able to do what you want. If
> there are nice libraries that will do mathematical calculations that
> often accompany these readings I do not know of one.  Similar readings
> for orientation for tilt can be done with the sensormanager.
>
> On Sep 29, 12:08 am, KK  wrote:
> > Hi All,
> > Can someone explain about how to capture a particular movement, meaning
> > there must be some mechanism to capture the changes in X,Y and Z
> > co-ordinates and other things calculate the corresponding acceleration
> etc
> > and then set the threshold for your required shake/move. If I want to try
> a
> > new shake, how to do I set the threshold value, what is the usual
> process?
> >
> > I was wondering, is there any way we can use enable SensorSimulator and
> let
> > it capture all the sensor parameters during shake/move and then pick
> those
> > recorded values and set your threshold. I think this must
> > be repetitive process, if someone wants to tune the threshold value.
> Would
> > appreciate if someone can throw some light on this.
> >
> > Thanks,
> > KK
>
> --
> 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: How do I navigate to the SD card?

2011-09-29 Thread GMLチェックツール

If you only want to navigate it, do the following:
1) connect the device to pc via usb
2) from Device menu -> Notifications -> USB Connection
3) read the pop-up message then response accordingly (click Accept or OK 
button).


Then, it should automatically show the pc's file explorer in your pc's 
screen.


(2011/09/30 13:23), Nikolay Elenkov wrote:

On Fri, Sep 30, 2011 at 12:20 PM, cellurl  wrote:

We just tried it and it didn't work.
Its an AT&T Aria phone?! No SIM card.
In Settings it didn't have an "allow 3rd party apps" button...

There is no file-manager and no way to get a file-manager.

We were able to use a micro-USB cable to put the *.apk file in,
but we couldn't figure which directory to use (perhaps its
invisible...)

Install the Android SDK, connect the phone to USB and use

$ adb install your-app.apk

to install. You need to enable USB debugging first, but no
need for an SD card, etc.



--
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: How do I navigate to the SD card?

2011-09-29 Thread Nikolay Elenkov
On Fri, Sep 30, 2011 at 12:20 PM, cellurl  wrote:
> We just tried it and it didn't work.
> Its an AT&T Aria phone?! No SIM card.
> In Settings it didn't have an "allow 3rd party apps" button...
>
> There is no file-manager and no way to get a file-manager.
>
> We were able to use a micro-USB cable to put the *.apk file in,
> but we couldn't figure which directory to use (perhaps its
> invisible...)

Install the Android SDK, connect the phone to USB and use

$ adb install your-app.apk

to install. You need to enable USB debugging first, but no
need for an SD card, etc.

-- 
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: HTC and LG haven't implemented Android in the right way

2011-09-29 Thread Nightwolf
AFAIK it is possible to specify point size array along with vertex
array. Enabling point sprites turns points to textured quads. Turn on
bilinear filtering and alpha test or blending. Of course the texture
should depict a star.

On 29 сен, 23:26, Kostya Vasilyev  wrote:
> 29.09.2011 23:01, MobileVisuals ?:
>
> > I claim that HTC HD doesn't support OpenGL ES 2.0, because size
> > attenuation is a part of OpenGL ES 1.1 and it is not supported.
>
> Quite possibly, you're right...
>
> > So HTC hasn't implemented the things that they say in the
> > specification, but why not?
>
> Who knows?
>
> You could contact their support, but even if they provide a plausible
> answer (and that's a big "if"), it's not going to magically fix all the
> HTC devices out there...
>
> > Thanks for the idea, do you mean like this?
>
> > Scale to small size if the sprite is far away.
> > Scale to medium size if the sprite is medium distance.
> > Scale to big size if the sprite is close.
>
> More or less - you are currently doing continuous range scaling of your
> sprites (I presume). If you replace them with texture mapped quads, you
> could always use the same image, or pick one of the ones predefined at
> various scale factors, to improve the image quality and performance.
> Sort of like mip-mapping.
>
> But that's not the core idea - the main thing is to replace attenuated
> points with texture mapped quads.
>
> > That could work for other animations, but it would be very slow for my
> > star cluster animations. There are hundreds of stars in each cluster.
> > As it is now, I draw each star cluster in one single glDrawArrays
> > call. That makes it fast.
>
> Hundreds doesn't sound too bad - at those poly counts, it's the fill
> rate (overdraw) that can kill performance. But since sprites are
> typically small, it probably won't be an issue.
>
> > Wouldn't I have to make one glDrawArrays call for each one of the
> > stars if I had to scale them in different sizes? That would mean
> > hundreds of glDrawArrays calls instead of one.
>
> Not the way I'm reading the docs (mind you, my GL is more than a little
> rusty - last time I worked with 3D was more than 10 years ago)
>
> But it seems like you should be able to draw all quads that use the same
> texture in one call, using GL_TRIANGLES or GL_QUADS (not _STRIP or _FAN,
> because those are always joined). This can product transparency
> artifacts depending on their z-order, so you'd need to sort the quads
> according to their texture and z-order both.
>
> Or just forgo the mipmapping for initial tests, then there's be one less
> thing to worry about with respect to sorting.
>
> > A point sprite is a screen-aligned element of variable size that is
> > defined by a single point. Would it really be a sprite if it was
> > mapped to a quad polygon?
>
> If it looks like a sprite, and quacks like a sprite...
>
> --
> Kostya Vasilyev

-- 
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 do I navigate to the SD card?

2011-09-29 Thread cellurl
We just tried it and it didn't work.
Its an AT&T Aria phone?! No SIM card.
In Settings it didn't have an "allow 3rd party apps" button...

There is no file-manager and no way to get a file-manager.

We were able to use a micro-USB cable to put the *.apk file in,
but we couldn't figure which directory to use (perhaps its
invisible...)

-cellurl

-- 
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: NFC Secure Element

2011-09-29 Thread Tommy


On 9月19日, 下午5时20分, Rames P  wrote:
> Hi Fernando Miguélez Palomo
>
> Did you get the ROM working for Nexus S with NFC card emulation enabled? I
> so can you please share the rom? Your answer might be very useful
> to achieve a position in my carrer.
>
> Thanks

Here is my Nexus S ROM of Card Emulation  http://dl.dbank.com/c0wutpddbv
.I modified the source code base on Fernando's.You can download and
test it.Good Luck!

-- 
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 parse xml from sdcard...

2011-09-29 Thread Anil Jagtap
I guess this article will help you

http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/

heers

On Sep 29, 5:45 am, GopalaKrishnan D  wrote:
> i don't know how to parse xml... i saw many example but i can't
> understand... can u help me
>
> --
> ~* Regards*
> *GopalaKrishnan 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


Re: [android-developers] Changing package name in eclipse

2011-09-29 Thread Keith
Thank you all . I made a late night mistake

On Wed, Sep 28, 2011 at 12:50 PM, Kumar Bibek  wrote:
> Check the logs. It should give you some hints...
>
>
> Thanks and Regards,
> Kumar Bibek
>
> http://techdroid.kbeanie.com
> http://www.kbeanie.com
>
>
>
> On Wed, Sep 28, 2011 at 9:20 PM, Keith  wrote:
>>
>> I renamed a package in eclipse and checked off change name in all subfiles
>> . Now when I try to load my app it crashes . I tried to rename back to the
>> original and it still if crashing.
>> Anyone have any experience with this problem ?
>>
>> Keith Zettler
>>
>> --
>> 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


[android-developers] Re: going back and forth from FullScreen

2011-09-29 Thread Zsolt Vasvari
What Android bug?  What does "change screen being sent" mean?  What's
IMM?

On Sep 30, 5:09 am, guich  wrote:
> Hi,
>
> I have an application that sets fullscreen with
>
> getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
> WindowManager.LayoutParams.FLAG_FULLSCREEN);
>
> ... right before the view is created. Works fine.
>
> However, i would like to bypass an Android BUG that prevents a screen
> change being sent when the IMM opens and its in full screen. For this,
> my idea was to
>
> 1. disable full screen
> 2. show the IMM
> 3. hide the IMM
> 4. re-enable full screen
>
> Steps 1-3 works fine, but re-enabling full screen does not work (the
> taskbar is still there).
>
> Is this another bug or is it an expected behaviou? How can i force the
> fullscreen to be applied?
>
> thanks
>
>    guich

-- 
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] CheckedTextView won't check.

2011-09-29 Thread Nathan

What am I doing wrong?

My adapter does this. 

   @Override public View getView(int paramInt, View paramView, ViewGroup 
paramViewGroup) 
{ 
 CheckedTextView view; 
 if(paramView==null) 
 { 
 LayoutInflater vi = 
(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
 view = 
(CheckedTextView)vi.inflate(android.R.layout.simple_list_item_multiple_choice, 
null); 
 } 
else 
 view=(CheckedTextView)paramView;  
*view.setChecked(true);* 
 view.setText(preflist.get(paramInt)); 
 view.setTag(preflist.get(paramInt)); 
 return view; 
 }

I looked at the documentation for CheckedTextView.setChecked(boolean) and it 
says
Changes the checked state of this text view.

Well, it doesn't.

In the debugger, I can see it get to the bold state. 

So is CheckedTextView useless for my purpose? I just want a multiselect 
list. I've even set it up like this:

setListAdapter(new MultiSelectAdapter(this));

final ListView listView = getListView();


listView.setItemsCanFocus(false);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
listView.setOnItemClickListener(this);

Nathan



-- 
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] What the hell is ActivityManager.isUserAMonkeyFor???

2011-09-29 Thread Mark Ayers
Google has the best names ever.

On Mon, Sep 19, 2011 at 4:44 PM, Mark Murphy wrote:

> It will tell you if the user is the Test Monkey. Or possibly
> monkeyrunner. Or perhaps has the name Caesar (in which case, watch
> out, as he's one cranky monkey).
>
> On Mon, Sep 19, 2011 at 7:39 PM, Mark Ayers  wrote:
> > I am truely baffled by the isUserAMonkey class. What on earth is it for?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> 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: Regarding Google Map

2011-09-29 Thread lbendlin
this should get you started

http://blog.pocketjourney.com/2008/03/19/tutorial-2-mapview-google-map-hit-testing-for-display-of-popup-windows/

-- 
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] Regarding Google Map

2011-09-29 Thread TreKing
On Thu, Sep 29, 2011 at 6:39 PM, nageswara rao rajana  wrote:

> Now my request is  that when i tap on any marker a pop should display like
> a user form so that i enter some details in that form.
> So please any one help me in this and also provide me any sample code.
>

Read the Maps API documentation and check out the onTap function.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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] Regarding Google Map

2011-09-29 Thread nageswara rao rajana
Hi,

I developed an application when i am walking for every 50 meters of
distance a marker is displaying on google map.
Now my request is  that when i tap on any marker a pop should display
like a user form so that i enter some details in that form.
So please any one help me in this and also provide me any sample code.

Thanking you,
nagu.

-- 
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: I have a map and it is necessary to put more than 1,000 objects.

2011-09-29 Thread lbendlin
Possibly. It also depends on the mapview that you display. if the user is 
zoomed out all the way the UI becomes useless. 

I just checked my own code and I'm not even using ItemizedOverlays. I use 
individual views for the annotations, and I assigned a TTL to each of the 
views. If they haven't been shown for a while (2 minutes) they get axed from 
the MapView. Every now and then (when the map is moved/zoomed substantially 
I load the closest x annotation views (25 in my case) onto the mapview. 
Again - the real reason for that was not the concern that the system could 
not handle the number of items, but rather that the user wouldn't benefit 
from 1000+ icons on the screen.

-- 
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: I have a map and it is necessary to put more than 1,000 objects.

2011-09-29 Thread Mark Murphy
On Thu, Sep 29, 2011 at 6:46 PM, lbendlin  wrote:
> you can do that but that's not really necessary. The map API already does
> that for you (figure out which overlay items are visible and render them).
> Your issue may be elsewhere in the code.

I've seen enough reports on this that I think ItemizedOverlay is
simply overwhelmed when there are more than a few hundred points. This
is not to say that there are no other possible issues, but 1000 points
in an ItemizedOverlay probably will be a problem regardless.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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 check if device has hardware search key

2011-09-29 Thread lbendlin
I seem to recall that Dianne already answered that question stating the same 
(no way to tell)

-- 
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: I have a map and it is necessary to put more than 1,000 objects.

2011-09-29 Thread lbendlin
you can do that but that's not really necessary. The map API already does 
that for you (figure out which overlay items are visible and render them). 
Your issue may be elsewhere in the code.

What you can do is put the overlay populating code into a separate AsyncTask 
or thread. That way the users don't have to wait until all overlay items are 
loaded.


-- 
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 do I navigate to the SD card?

2011-09-29 Thread Jeremy Dagorn
Hi,

I don't really understand what is your problem.. could explain more? I
don't see the link between the fact you don't have a data plan and
running the .apk from your sd card..

On Sep 29, 2:20 pm, cellurl  wrote:
> I want to run a non-market .apk located on SD card.
>
> Q: How do I navigate to it?
>
> I don't have a data plan, so I can't put it on a website,
> or can I use wifi to do this somehow??
>
> Thanks for any leads!
> cellurl

-- 
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: Consuming Web Service with Complex Types in Android

2011-09-29 Thread Studio LFP
After looking around at other posts, I ran across this that seems to be 
helping people with SOAP.

http://stackoverflow.com/questions/297586/how-to-call-soap-web-service-with-android

Hope that helps out.

Steven
Studio LFP
http://www.studio-lfp.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

Re: [android-developers] How do I develop a Eclipse plugin on top of google's ADT?

2011-09-29 Thread paulb
An ADT-dependent plug-in for developing Android PhoneGap projects is open 
sourced 
at 
http://code.google.com/a/eclipselabs.org/p/mobile-web-development-with-phonegap/
 
 

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Chad Ata
Hi Joao,

Cool, that's similar to what we've done.
I think I'm going to ignore this problem until I get a few more bug reports
- hopefully with more details.

Thanks for helping out!
-Chad


On Thu, Sep 29, 2011 at 2:44 PM, Joao Braga  wrote:

> I see...
> Well I don't know the style of your game and how it was developed.
> I'm developing a game engine myself and for the memory issue, we are
> building a Memory Manager that knows exactly when to allocate, when to free
> and when to reuse an object of the game.
>
> The result of it is less load time and less memory being used. On the other
> hand it takes more time to create the game itself.
>
> I don't know if it fits to your problem, but seems to me that it's a option
> to be considered.
>
>  --
> 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: Calendar Intent not working in Motorola Xoom Honeycomb 3.1

2011-09-29 Thread Mark Murphy
On Thu, Sep 29, 2011 at 5:52 PM, Hong  wrote:
> The downside of using Google Calendar Data API is the user needs to
> login and authorize. It's an extra step that's not presented if we can
> add the events to local calendar directly (since their google account
> is already set and authorized on device).

I was under the impression that the new JAR didn't require that. They
have one that ties into Android's Account Authenticator. There was a
Google I|O presentation on it.

> Anyway, in my opinion, they should lock down the SMS Manager API.
> That's more dangerous than Calendar and others.

:-)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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: Calendar Intent not working in Motorola Xoom Honeycomb 3.1

2011-09-29 Thread Hong
Thanks Mark for sharing this information!

The downside of using Google Calendar Data API is the user needs to
login and authorize. It's an extra step that's not presented if we can
add the events to local calendar directly (since their google account
is already set and authorized on device).

I'm not trying to force the issue and I understand the privacy concern
regarding calendar items.
It should be private to begin with.

Anyway, in my opinion, they should lock down the SMS Manager API.
That's more dangerous than Calendar and others.

On Thu, Sep 29, 2011 at 2:42 PM, Mark Murphy  wrote:
> On Thu, Sep 29, 2011 at 5:33 PM, Hong  wrote:
>> All I want to achieve is to add an event to user's local calendar on the 
>> device.
>> I don't want to perform a round-trip by adding the event to their web
>> calendar, and have it sync-ed back onto the device. Is this too much
>> to ask for?
>>
>> Or is this add-to-web-then-sync-to-device approach better than
>> add-to-device-then-sync-to-web approach?
>
> Only the "add-to-web-then-sync-to-device approach" is supported, which
> is the point that Kostya and I have been trying to make.
>
> Unless you are planning on joining Google, taking over the Calendar
> app, and forcing parts of it into the SDK, worrying about whether
> "add-to-device-then-sync-to-web approach" is better or not is
> navel-gazing. You may as well wonder how many angels can dance on the
> head of a pin.
>
> (I tried determining that once, but I kept crushing the angels when
> trying to put them on a pile, probably with dire consequences for my
> afterlife...)
>
> Now, don't get me wrong. I'd love for these undocumented approaches to
> be standardized and supported. I spoke with a Googler on this issue at
> Google I|O and was told that it wasn't a priority. And considering
> that the undocumented/unsupported Gmail content provider is now
> blocked, I wouldn't hold out tons o' hope that the others will
> necessarily hit the SDK any time soon.
>
> OTOH, SonyEricsson is apparently in favor of using this stuff, based
> on a presentation scheduled for next week's droidcon UK, so, who
> knows...
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in NYC: http://marakana.com/training/android/
>
> --
> 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 is killed when home button is pressed from any activity

2011-09-29 Thread Studio LFP
Check out some of the information here:
http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html#Clearing

See if that can help you out any. That entire page is worth a read to 
understand how Android handles applications and their activities.

Steven
Studio LFP
http://www.studio-lfp.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

Re: [android-developers] Re: Calendar Intent not working in Motorola Xoom Honeycomb 3.1

2011-09-29 Thread Hong
>
> I'm sure Google would much rather have it sync to their web calendar,
> partially because their implementation might be such that they'd
> prefer to have the event added to their calandar (i.e., they want to
> use their lack of api to support programming in such a way that is
> consistent with their (probably correct) vision of the right way :-)
>
> Kris
>

Thank you Kris!

It's a shame but I will try the web API route then.

Thanks
Hong

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
I see...
Well I don't know the style of your game and how it was developed.
I'm developing a game engine myself and for the memory issue, we are
building a Memory Manager that knows exactly when to allocate, when to free
and when to reuse an object of the game.

The result of it is less load time and less memory being used. On the other
hand it takes more time to create the game itself.

I don't know if it fits to your problem, but seems to me that it's a option
to be considered.

-- 
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: Calendar Intent not working in Motorola Xoom Honeycomb 3.1

2011-09-29 Thread Mark Murphy
On Thu, Sep 29, 2011 at 5:33 PM, Hong  wrote:
> All I want to achieve is to add an event to user's local calendar on the 
> device.
> I don't want to perform a round-trip by adding the event to their web
> calendar, and have it sync-ed back onto the device. Is this too much
> to ask for?
>
> Or is this add-to-web-then-sync-to-device approach better than
> add-to-device-then-sync-to-web approach?

Only the "add-to-web-then-sync-to-device approach" is supported, which
is the point that Kostya and I have been trying to make.

Unless you are planning on joining Google, taking over the Calendar
app, and forcing parts of it into the SDK, worrying about whether
"add-to-device-then-sync-to-web approach" is better or not is
navel-gazing. You may as well wonder how many angels can dance on the
head of a pin.

(I tried determining that once, but I kept crushing the angels when
trying to put them on a pile, probably with dire consequences for my
afterlife...)

Now, don't get me wrong. I'd love for these undocumented approaches to
be standardized and supported. I spoke with a Googler on this issue at
Google I|O and was told that it wasn't a priority. And considering
that the undocumented/unsupported Gmail content provider is now
blocked, I wouldn't hold out tons o' hope that the others will
necessarily hit the SDK any time soon.

OTOH, SonyEricsson is apparently in favor of using this stuff, based
on a presentation scheduled for next week's droidcon UK, so, who
knows...

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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: Calendar Intent not working in Motorola Xoom Honeycomb 3.1

2011-09-29 Thread Kristopher Micinski
On Thu, Sep 29, 2011 at 5:33 PM, Hong  wrote:
>>> Solution can be either expose the Calendar content provider API or
>>> publish the acceptable parameters to the Calendar intent.
>>
>> Those would be lovely. OTOH, you are also perfectly capable of using
>> the Web APIs to modify a user's Google Calendar.
>>
>
> Thanks Mark!
>
> All I want to achieve is to add an event to user's local calendar on the 
> device.
> I don't want to perform a round-trip by adding the event to their web
> calendar, and have it sync-ed back onto the device. Is this too much
> to ask for?
>
> Or is this add-to-web-then-sync-to-device approach better than
> add-to-device-then-sync-to-web approach?
>

I'm sure Google would much rather have it sync to their web calendar,
partially because their implementation might be such that they'd
prefer to have the event added to their calandar (i.e., they want to
use their lack of api to support programming in such a way that is
consistent with their (probably correct) vision of the right way :-)

Kris

-- 
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: Calendar Intent not working in Motorola Xoom Honeycomb 3.1

2011-09-29 Thread Hong
>> Solution can be either expose the Calendar content provider API or
>> publish the acceptable parameters to the Calendar intent.
>
> Those would be lovely. OTOH, you are also perfectly capable of using
> the Web APIs to modify a user's Google Calendar.
>

Thanks Mark!

All I want to achieve is to add an event to user's local calendar on the device.
I don't want to perform a round-trip by adding the event to their web
calendar, and have it sync-ed back onto the device. Is this too much
to ask for?

Or is this add-to-web-then-sync-to-device approach better than
add-to-device-then-sync-to-web approach?

-- 
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] The RenderScript funtions rsUnpackColor8888 and rsPackColorTo8888 do not work as expected.

2011-09-29 Thread RodneyJLambert
The following RenderScript code does not work as expected.


void root(const uchar4 *v_in, uchar4 *v_out, const void *usrData,
uint32_t x, uint32_t y) {
float4 f4 = rsUnpackColor(*v_in);   // unpack the color data
*v_out = rsPackColorTo(f4);   // repack the color data
without changing it
rsDebug("in ", v_in->x, v_in->y, v_in->z, v_in->w);
rsDebug("in ", f4.x, f4.y, f4.z, f4.w);
rsDebug("in ", v_out->x, v_out->y, v_out->z, v_out->w);   // v_out
does not equal v_in!!  Each uchar > 0 is reduced by 1
}

void filter() {
rsForEach(gScript, gIn, gOut, 0);
}

This code should just copy the data unchanged but it alters every
value not equal to zero!  The error seems to be in rsUnpackColor
since a color value of 255 is converted to 0.9985 and not 1.0.

-- 
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] How do I develop a Eclipse plugin on top of google's ADT?

2011-09-29 Thread Tor Norbye
Oh yes, Mark is right -- I was referring to the "adt-dev" group when I
said "this alias", *not* the android-developers alias.

-- Tor

On Thu, Sep 29, 2011 at 2:19 PM, Mark Murphy  wrote:
> I'd start off by joining the adt-dev Google Group and asking there, as
> that's the list for people working on the development tools.
>
> On Thu, Sep 29, 2011 at 5:14 PM, Carl Lee  wrote:
>> I think it will be nice to modify or enhance google's ADT, since
>> Eclipse's plugins are almost all written in Java and in Eclipse.
>>
>> For example, let DDMS's logcat support regular expression filter; open
>> sqlite3 database directyly in eclipse by double clicking the db file
>> in DDMS's file expolrer.
>>
>> Anyone can give me a hint on how to start off?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training in NYC: http://marakana.com/training/android/
>
> --
> 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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Chad Ata
On some phones, like the small screen Motorola's, we've found that we really
push the memory limitations. If a user has a lot of junk of the screen
(in-game), then they risk OOM exception. We are aggressively calling
bitmap.recycle() whenever an image is no longer being used - and that has
been really helpful. But every once in a while, we still notice these weird
bugs.

As for the sessions, I just mean the time between onResume() and onPause().
So if 200k users play the game once, 1 of them gets the error - which is
being reported via Android Market.

On Thu, Sep 29, 2011 at 2:16 PM, Joao Braga  wrote:

> I see, but it souldn't be a problem since the phones have enough memory to
> load a image like that.
> I'm just talking about the image, I don't know how the rest of your engine
> is managing the memory.
>
> But you said something about 200k sessions...how this sessions work?
> The clients connect to a server (computer) or the clients (phones) can host
> games and the crash happens when it is hosting a certain number of clients?
> Tell us about your architecture
>
>  --
> 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] How do I develop a Eclipse plugin on top of google's ADT?

2011-09-29 Thread Tor Norbye
We'd love contributions -- we have an overview doc here:
http://tools.android.com/contributing but basically you generally
mention on this alias what you're interested in working on (to ensure
that people don't overlap in work, and to ensure (if the feature is
controversial) that we're in agreement on the overall direction such
that the patch will likely be accepted.

Of course if you want you can develop an independent plugin that
-depends- on the ADT pugin, but most of our features are *not* written
to be extensible (and most have private apis and if the signatures use
public they're still in internal packages which can change
incompatibly from release to release.)

-- Tor

On Thu, Sep 29, 2011 at 2:14 PM, Carl Lee  wrote:
> I think it will be nice to modify or enhance google's ADT, since
> Eclipse's plugins are almost all written in Java and in Eclipse.
>
> For example, let DDMS's logcat support regular expression filter; open
> sqlite3 database directyly in eclipse by double clicking the db file
> in DDMS's file expolrer.
>
> Anyone can give me a hint on how to start off?
>
> --
> 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: Always-on GPS: widget or app?

2011-09-29 Thread Pinheiro
That's exactly what I wanted to know, thanks a lot!

-- 
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] USB Host API on XOOM tablet

2011-09-29 Thread Ralph Bergmann | the4thFloor.eu
Am 23.09.11 16:27, schrieb Anil Sasidharan:
> It would be great to know if anyone has tested Android's USB Host API on
> any tablet device especially Motorola XOOM. I would really appreciate
> your comments/suggestions.

I tried the missile launcher app from the sample projects.

It does not work on my XOOM, but it works without any changes on my LG
Slate.

But it looks that it works on a XOOM, see
http://community.developer.motorola.com/t5/MOTODEV-Blog/Code-to-Launch-Foam-Missiles-Over-USB/ba-p/17889



Ralph

-- 
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] How do I develop a Eclipse plugin on top of google's ADT?

2011-09-29 Thread Mark Murphy
I'd start off by joining the adt-dev Google Group and asking there, as
that's the list for people working on the development tools.

On Thu, Sep 29, 2011 at 5:14 PM, Carl Lee  wrote:
> I think it will be nice to modify or enhance google's ADT, since
> Eclipse's plugins are almost all written in Java and in Eclipse.
>
> For example, let DDMS's logcat support regular expression filter; open
> sqlite3 database directyly in eclipse by double clicking the db file
> in DDMS's file expolrer.
>
> Anyone can give me a hint on how to start off?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
I see, but it souldn't be a problem since the phones have enough memory to
load a image like that.
I'm just talking about the image, I don't know how the rest of your engine
is managing the memory.

But you said something about 200k sessions...how this sessions work?
The clients connect to a server (computer) or the clients (phones) can host
games and the crash happens when it is hosting a certain number of clients?
Tell us about your architecture

-- 
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 do I develop a Eclipse plugin on top of google's ADT?

2011-09-29 Thread Carl Lee
I think it will be nice to modify or enhance google's ADT, since
Eclipse's plugins are almost all written in Java and in Eclipse.

For example, let DDMS's logcat support regular expression filter; open
sqlite3 database directyly in eclipse by double clicking the db file
in DDMS's file expolrer.

Anyone can give me a hint on how to start off?

-- 
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: Always-on GPS: widget or app?

2011-09-29 Thread Studio LFP
I tried to deal with this on an internal company app and you don't want to 
use the requestLocationUpdates().

See this bug I logged: 
http://code.google.com/p/android/issues/detail?id=5595

I'm not sure if that was a hardware driver or software, but I know you can 
reproduce that on plenty of hardware that is still around today.

A widget will only update every 30 minutes at the fastest via the system 
unless you have some sort of timer or alarm. It also doesn't wake up the 
phone to do the update, it delays it till the next phone wake.

Have you thought about trying a broadcast receiver coupled with an alarm?

If you need it to run if the phone is rebooted, just use an 
ACTION_BOOT_COMPLETED action in a receiver to start it (and don't forget the 
permission to receiver the boot message), then:

Intent iTimer = new Intent( "com.yourcompany.yourapp.GET_GPS_LOCATION" );
PendingIntent piTimer = PendingIntent.getBroadcast( context, 
BROADCAST_TIMER, iTimer,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT );

Time tAlarm = new Time();
tAlarm.setToNow();
tAlarm.minute = tAlarm.minute + 5;

AlarmManager amMgr = (AlarmManager)context.getSystemService( 
Context.ALARM_SERVICE );
amMgr.set( AlarmManager.RTC_WAKEUP, tAlarm.toMillis( false ), piTimer );

Please note that if you do use the AlarmManager.RTC_WAKEUP, it will keep 
waking the phone up every 5 minutes to fire off the requested intent. This 
means bad things for battery life.

In the manifest:







And of course the receiver:

public class MyReceiver extends BroadcastReceiver
{
@Override
public void onReceive( Context context, Intent intent )
{
if( intent.getAction().equals( 
"com.yourcompany.yourapp.GET_GPS_LOCATION" ) )
{
// Get your gps fix here and storage it however you'd like
// Reschedule the next alarm for 5 minutes from now using the 
code above.
}
}
}

I would just get the current fix and store it, then release the GPS so other 
people can use it. Then reset the alarm for 5 minutes from now. Now you 
don't need an active program to do something every so often and you don't 
have to worry about it being killed by the system.

You will want to request a WakeLock at the beginning of the receiver to make 
sure the phone will stay awake while you get the GPS location. Then just 
release the WakeLock at the end and let the phone go back to sleep.

Hope that helps.

Steven
Studio LFP
http://www.studio-lfp.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

Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Chad Ata
It's a game.
At a certain part it loads a large transparent png - about 900x300 or
something like that.

This issue seems to happen only with the larger images, which is why I was
thinking it had to do with possible low memory situation.

-Chad


On Thu, Sep 29, 2011 at 2:05 PM, Joao Braga  wrote:

> It's an architectural problem.
> What's your application about?
>
> What does it do?
>
>  --
> 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] going back and forth from FullScreen

2011-09-29 Thread guich
Hi,

I have an application that sets fullscreen with

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

... right before the view is created. Works fine.

However, i would like to bypass an Android BUG that prevents a screen
change being sent when the IMM opens and its in full screen. For this,
my idea was to

1. disable full screen
2. show the IMM
3. hide the IMM
4. re-enable full screen

Steps 1-3 works fine, but re-enabling full screen does not work (the
taskbar is still there).

Is this another bug or is it an expected behaviou? How can i force the
fullscreen to be applied?

thanks

   guich

-- 
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] Techniques for real-time screen update...

2011-09-29 Thread Peter
Folks,

In my application, I need to display a line chart with some real-time
data. The chart needs to be updated 10 times within a second. To the
user, it should appear as if the line is scrolling to the left of the
screen. New data gets displayed to the right.

I am trying to understand the best way to accomplish this under
Android. On each tick, do I simply redraw the canvas or is there a
better way?

I would appreciate any thoughts/ideas that  you may have.

Thank you in advance for your help.

Regards,
Peter

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Chad Ata
Hi Joao,

Yes that code works for me - actually I was already doing something similar
in a different part of my code.
Unfortunately, since it's such a rare bug I won't know if it really fixed
the problem until I deploy it to my users.

-Chad


On Thu, Sep 29, 2011 at 2:01 PM, Joao Braga  wrote:

> Maybe, but I can't tell since I never used it.
>
> Did the code work for 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
>

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
It's an architectural problem.
What's your application about?

What does it do?

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Chad Ata
Thanks for the responses guys,
Just a note: My code always works when I test it.
The bug is happening once every 200k sessions (as reported via Android
Market).

-Chad


On Thu, Sep 29, 2011 at 1:58 PM, Chad Ata  wrote:

> Thanks for the response Joao,
>
> Interesting. Do you think there's a bug in the decodeResource() when using
> BitmapFactory.Options?
>
> -Chad
>
>
> On Thu, Sep 29, 2011 at 1:49 PM, Joao Braga  wrote:
>
>> Try this:
>>
>> Bitmap bitmap;
>> bitmap = BitmapFactory.decodeResource(res, R.drawable.image);
>> bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(),
>> bitmap.getHeight(), false); //if you want to make it scaleble
>>
>>  --
>> 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] Emulator and the requiresSmallestWidthDp declaration

2011-09-29 Thread jtoolsdev
If one has created a Android 3.2 virtual device with a 7" 1024x600 screen 
and your app has android:requiresSmallestWidthDp=720 declared (for 10" or 
greater screens) shouldn't the emulator refuse to load the app?  Currently 
it loads it.  Or is this declaration only good for the Market?

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
Maybe, but I can't tell since I never used it.

Did the code work for 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

Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
Can you get to your resource through R.drawable. ?

You can get errors if you store pictures with invalid names for the
resources (spaces, special chars, numbers etc).

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Chad Ata
Thanks for the response Joao,

Interesting. Do you think there's a bug in the decodeResource() when using
BitmapFactory.Options?

-Chad

On Thu, Sep 29, 2011 at 1:49 PM, Joao Braga  wrote:

> Try this:
>
> Bitmap bitmap;
> bitmap = BitmapFactory.decodeResource(res, R.drawable.image);
> bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(),
> bitmap.getHeight(), false); //if you want to make it scaleble
>
>  --
> 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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
ops, I forgot the resources:


Bitmap bitmap;
bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.image);
bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(),
bitmap.getHeight(), false); //if you want to make it scaleble


Note: If you are creating this bitmap from the class of your main activity,
you can get the resources only by calling the "getResources()" (without
context).
I think you may be getting this problem cause of the context.getResources().
If you need to create the bitmap outside the class of your main activity you
set a parameter for the method (or the constructor) of the class will create
the bitmap like this:

public Bitmap CreateBitmapFactory (Resources res, int bitmapResourceId )
{
 return BitmapFactory.decodeResource(res, bitmapResourceId );
}

You should call it from your main Activity class for example:

Bitmap bmp = object.CreateBitmapFactory( gerResources(), R.drawable.image);

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread jtoolsdev
I got a null pointer when my PNG file was incorrectly saved.   Since I was 
developing on Linux, I loaded it into GIMP and saved it back out and it 
loaded.  So you might check using one of the image files supplied in the 
SDK. 

-- 
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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
Try this:

Bitmap bitmap;
bitmap = BitmapFactory.decodeResource(res, R.drawable.image);
bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(),
bitmap.getHeight(), false); //if you want to make it scaleble

-- 
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 check if device has hardware search key

2011-09-29 Thread Studio LFP
I'm not sure if there is a way to check if it has a hardware search key. I 
would have thought it would be in the 
PackageManager.getSystemAvailableFeatures(), but I checked it and it doesn't 
have any listing for it.

Since the new ICS (Ice Cream Sandwich) version is based on Honeycomb and the 
hardware for that has no physical or touch keys for Back, Home, Menu and 
Search, you may just have to ask the user or allow the user to map whatever 
function you want to a specific key code.  The search key may be on the 
screen or on the hardware, but it should still fire the same key code event 
in an onKeyEvent.

Steven
Studio LFP
http://www.studio-lfp.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: BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Sheado
Hi Joao,

Here it is:

BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inScaled = false;
Bitmap b = BitmapFactory.decodeResource( context.getResources(),
R.drawable.testImage, opts );
b.getWidth(); // < NPE

This always works for me when I test it.
Thanks,
Chad


On Sep 29, 1:15 pm, Joao Braga  wrote:
> Paste your code here...just the line where you try to create the bitmap.

-- 
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] BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Sheado
Hello,

I'm getting some bug reports showing that BitmapFactory.decodeResource
is returning null for local /res/drawable image resources. I can't
reproduce the problem.

Could this be due to a low memory situation? Usually I get
OutOfMemoryException when that happens though.

What could cause this and how can I avoid it?

Thank You,
Chad

-- 
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: Break the execution

2011-09-29 Thread Studio LFP
I think they are looking for a simple "return".

Any time you are inside a function, you can exit that function by a 
"return".

All of the Android specific things like onCreate, etc. are functions and can 
all be exited by a "return".

Just make sure you return whatever type is needed as a return value. If it 
is void, then just "return" is enough.

@Override
public void onCreate( Bundle savedInstanceState ) // Doesn't need a return 
value since it is void
{
super.onCreate( savedInstanceState );
setContentView( R.layout.main );

if( something > 0 ) return;
 
// do something else here you might want to skip
}

public int getInt() // Needs an int return value
{
int someInt = 7;
return someInt;
}

Simple as that.

Steven
Studio LFP
http://www.studio-lfp.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: standalone popup: UI question

2011-09-29 Thread Studio LFP
The easiest way I've found is to just do a normal activity and float it with 
a transparent background.


   @drawable/bg
   true
   false




And just do a normal activity. I usually go for the simplest solution, it's 
easier to maintain.

Steven
Studio LFP
http://www.studio-lfp.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

Re: [android-developers] BitmapFactory.decodeResource returning null sometimes for local resource

2011-09-29 Thread Joao Braga
Paste your code here...just the line where you try to create the bitmap.

-- 
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 calculate the distance between two degree values? (for example: 350º to 15º = 25º / 250º to 190º = 60º)

2011-09-29 Thread Studio LFP
If you already have the two numbers in degress that are between 0 and 360...

int iDiff = Math.abs( degree1 - degree2 );

If you need to find them from points or latitude/longitude, then you are 
entering into linear math and you would need to look at things like:

http://chortle.ccsu.edu/VectorLessons/vectorIndex.html

Steven
Studio LFP
http://www.studio-lfp.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: "scrolling" question

2011-09-29 Thread Studio LFP
Older devices like the HTC Hero had a trackball type device like some 
Blackberrys had.

New devices like the new tables can actually accept mice and other pointing 
devices and get an on-screen cursor along with a keyboard being able to use 
arrow buttons and the tab key.

I use a bluetooth keyboard on my Xoom all the time and have hooked up a 
Logitech Trackman to the USB.  I haven't found a way to change the 
acceleration on the mice, so not the best experience, but still works.

Steven
Studio LFP
http://www.studio-lfp.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: display countup timer with milliseconds

2011-09-29 Thread hoyski
Short answer. Change your building of 'asText' to:

  String asText = (countUp / 60) + ":" + (String.format("%02d",
(countUp % 60)) + "." + (String.format("%03d", (countUp_milli %
1000)));

Long answer. Since this code will be called a *lot*, it would be good
to profile it. The compiler should convert the code above to use a
StringBuilder and a bunch of append() calls. But a new StringBuilder
will still get instantiated, populated, and then discarded on each
invocation of onChronometerTick. It might be worthwhile to declare a
single StringBuilder in your class and (re)use it on every call.

On Sep 29, 12:16 am, Hassy  wrote:
> I'm trying to create a countup timer with milliseconds.
> I used Chronometer but I don't know how to display milliseconds.
>
> Chronometer crono = (Chronometer) findViewById(R.id.chrono);
>         startTime = SystemClock.elapsedRealtime();
>         crono.setOnChronometerTickListener(new
> OnChronometerTickListener() {
>             public void onChronometerTick(Chronometer arg0) {
>                 countUp = (SystemClock.elapsedRealtime() -
> arg0.getBase()) / 1000;
>                 countUp_milli = (SystemClock.elapsedRealtime() -
> arg0.getBase());
>                 String asText = (countUp / 60) + ":" + (countUp %
> 60);
>                 timeflg.setText(asText);
>         }
>
> });
>
> crono.start();
>
> please tell me how to display milliseconds.
>
> Thank you
>
> Hassy

-- 
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 do I navigate to the SD card?

2011-09-29 Thread Studio LFP
You can use Wifi on the phone to hit a web site if that is an option.

I believe there are also apps like ES File Explorer than can let you browse 
the SD card if you don't have something built into the phone. You can get it 
from the Android Market. You can also access the Android Market on Wifi, you 
don't need a data connection from a carrier for the phone.

ES File Explorer will let you launch an APK on the SD card and install it.  
At least it is letting me on the Amazon Android Store APK that is currently 
on one of my devices.

If you are using certain AT&T devices, they have side loading disable and it 
might not work.

Steven
Studio LFP
http://www.studio-lfp.com


On Thursday, September 29, 2011 1:20:47 PM UTC-5, cellurl wrote:
>
> I want to run a non-market .apk located on SD card. 
>
> Q: How do I navigate to it? 
>
> I don't have a data plan, so I can't put it on a website, 
> or can I use wifi to do this somehow?? 
>
> Thanks for any leads! 
> cellurl

-- 
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: Improving Local GPS Accuracy

2011-09-29 Thread hoyski
I worked on a civilian GPS system back in the days when Selective
Availability was still enabled. (http://en.wikipedia.org/wiki/
Error_analysis_for_the_Global_Positioning_System#Selective_availability)
In order to determine the well-known point from which to broadcast
DGPS corrections, a receiver was placed at the DGPS broadcast point
for over 24 hours. The well-known point was set as the average of the
readings the receiver got over the 24 hours. We were able to achieve
approximately one meter accuracy with this approach, but we were using
much better antennas than are in the phones. However, the further you
got from the DGPS location the worse the accuracy. I assume this was
due to the receiver at the DGPS location computing its location from a
different constellation of satellites than the receiver in the field.

On Sep 29, 11:38 am, lbendlin  wrote:
> Fair enough. But in order to use the DGPS approach you first need to use 
> something (much) more precise than your Android GPS receiver to measure the 
> DGPS base station location. A bit of a catch-22.

-- 
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: HTC and LG haven't implemented Android in the right way

2011-09-29 Thread Kostya Vasilyev


29.09.2011 23:01, MobileVisuals ?:

I claim that HTC HD doesn't support OpenGL ES 2.0, because size
attenuation is a part of OpenGL ES 1.1 and it is not supported.


Quite possibly, you're right...


So HTC hasn't implemented the things that they say in the
specification, but why not?


Who knows?

You could contact their support, but even if they provide a plausible 
answer (and that's a big "if"), it's not going to magically fix all the 
HTC devices out there...



Thanks for the idea, do you mean like this?

Scale to small size if the sprite is far away.
Scale to medium size if the sprite is medium distance.
Scale to big size if the sprite is close.


More or less - you are currently doing continuous range scaling of your 
sprites (I presume). If you replace them with texture mapped quads, you 
could always use the same image, or pick one of the ones predefined at 
various scale factors, to improve the image quality and performance. 
Sort of like mip-mapping.


But that's not the core idea - the main thing is to replace attenuated 
points with texture mapped quads.



That could work for other animations, but it would be very slow for my
star cluster animations. There are hundreds of stars in each cluster.
As it is now, I draw each star cluster in one single glDrawArrays
call. That makes it fast.


Hundreds doesn't sound too bad - at those poly counts, it's the fill 
rate (overdraw) that can kill performance. But since sprites are 
typically small, it probably won't be an issue.



Wouldn't I have to make one glDrawArrays call for each one of the
stars if I had to scale them in different sizes? That would mean
hundreds of glDrawArrays calls instead of one.


Not the way I'm reading the docs (mind you, my GL is more than a little 
rusty - last time I worked with 3D was more than 10 years ago)


But it seems like you should be able to draw all quads that use the same 
texture in one call, using GL_TRIANGLES or GL_QUADS (not _STRIP or _FAN, 
because those are always joined). This can product transparency 
artifacts depending on their z-order, so you'd need to sort the quads 
according to their texture and z-order both.


Or just forgo the mipmapping for initial tests, then there's be one less 
thing to worry about with respect to sorting.



A point sprite is a screen-aligned element of variable size that is
defined by a single point. Would it really be a sprite if it was
mapped to a quad polygon?


If it looks like a sprite, and quacks like a sprite...

--
Kostya Vasilyev
 


--
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] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-29 Thread Studio LFP

>
> A ListView is usually not edited in place and actually are very friendly 
>> when you try to.
>>
>
> Your statements seem contradictory. You say a list view is not edited in 
> place.
> Then you say a list view is very friendly when you try to edit it in place?
>

Whoops, sorry about that, it should say "actually are not very friendly".
 

> It might be better just to use a LinearLayout wrapped in a ScrollView and 
>> dynamically add EditText to the LinearLayout assigning different IDs as you 
>> go.  That way you can access those at any time and you won't have to fight 
>> with the ListView.
>>
>
> Yes, in the end overriding getView was giving me lots of problems so I 
> dumped the listview altogether
> and used inflation of XML rows in a linearlayout in a scrollview in a 
> linearlayout. This may be inefficient
> but I would have had to keep an array of rows around anyways even if I 
> implemented a listview with an
> adapter...
>
> what is not clear right now is what advantages/disadvantages a listview 
> with adapter may have had
> compared to views added to a plain linearlayout.
>

Not really sure there. So many way to get the same thing done, unless a 
Android developer actually posts, we are all just trying things that work.
 

> I know people don't like to share ideas for programs, but can you explain a 
>> little more why you would have so many edit in place boxes that you need a 
>> ListView?
>>
>
> Since I don't want my users to have to go through a separate screen to 
> input information which
> could be edited in place, I do it right there. Just like with SQL queries, 
> some returned rows have
> unique fields, and some do not, hence the need to update textedits 
> concurrently.
>

 Gotcha, seems straight forward enough

Try this, this should be full working code:

--- XML file for Activity ---


http://schemas.android.com/apk/res/android"; 
android:layout_width="fill_parent" android:layout_height="fill_parent">




--- Activity ---

public class TestProjectActivity extends Activity
{
private static final int EDIT_COUNT = 7;
private LinearLayout llHolder;
private LinearLayout.LayoutParams llParams = new 
LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, 
LinearLayout.LayoutParams.WRAP_CONTENT );
private HasFocus hfFocus = new HasFocus();
private Watcher wWatcher = new Watcher();

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView( R.layout.main );

llHolder = (LinearLayout)findViewById( R.id.llHolder );

createEdits( EDIT_COUNT );
}

private void createEdits( int iNumber )
{
llHolder.removeAllViews(); // Just in case we reuse the holder

for( int iX = 1; iX <= iNumber; iX++ )
{
EditText etNew = new EditText( this );
etNew.setId( iX );
etNew.setOnFocusChangeListener( hfFocus );

llHolder.addView( etNew, llParams );
}
}

private void updateEdits( String sNew, int iCount, int iSkip )
{
Log.i( "Stuff", "String: " + sNew + " - iCount: " + iCount + " - 
iSkip: " + iSkip );
for( int iX = 1; iX <= iCount; iX++ )
{
if( iX == iSkip ) continue;

EditText etEdit = (EditText)findViewById( iX );
etEdit.setText( sNew + ": " + iX );
}
}

private class HasFocus implements OnFocusChangeListener
{
@Override
public void onFocusChange( View v, boolean hasFocus )
{
if( hasFocus )
{
wWatcher.iID = v.getId();
((EditText)v).addTextChangedListener( wWatcher );
}
else
{
((EditText)v).removeTextChangedListener( wWatcher );
}
}
}

private class Watcher implements TextWatcher
{
public int iID;

@Override
public void afterTextChanged( Editable s )
{
updateEdits( s.toString(), EDIT_COUNT, iID );
}

@Override
public void beforeTextChanged( CharSequence s, int start, int count, 
int after ) { }

@Override
public void onTextChanged( CharSequence s, int start, int before, 
int count ) { }
}
}

One thing I did add to the code was a focus watcher. I did this because if 
you put a text watcher on all of them, once you edit one you will start an 
endless loops as it will fire the text watchers on others if you update 
them.

I didn't do an array backing, but you could use that. I was just trying to 
get something as simple as possible for you to work with as a base.

See if that helps at all.

Steven
Studio LFP
http://www.studio-lfp.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

[android-developers] Re: HTC and LG haven't implemented Android in the right way

2011-09-29 Thread MobileVisuals
It says in the HTC HD specification that it supports OpenGL ES 2.0:

http://www.mobiletechworld.com/2010/04/23/htc-hd-mini-review-is-it-worth-it/

I claim that HTC HD doesn't support OpenGL ES 2.0, because size
attenuation is a part of OpenGL ES 1.1 and it is not supported.

So HTC hasn't implemented the things that they say in the
specification, but why not?

On Sep 29, 8:54 pm, MobileVisuals  wrote:
> Thanks for the idea, do you mean like this?
>
> Scale to small size if the sprite is far away.
> Scale to medium size if the sprite is medium distance.
> Scale to big size if the sprite is close.
>
> That could work for other animations, but it would be very slow for my
> star cluster animations. There are hundreds of stars in each cluster.
> As it is now, I draw each star cluster in one single glDrawArrays
> call. That makes it fast.
>
> Wouldn't I have to make one glDrawArrays call for each one of the
> stars if I had to scale them in different sizes? That would mean
> hundreds of glDrawArrays calls instead of one.
>
> A point sprite is a screen-aligned element of variable size that is
> defined by a single point. Would it really be a sprite if it was
> mapped to a quad polygon?
>
> I removed all HTC devices from the compatibility list for my Morphing
> galaxy live wallpaper, because the HTC users complained that it didn't
> look like it should. Lots of HTC users said the same thing, so I am
> sure that it doesn't work on any of the HTC's. My other LW's seem to
> work well on the HTC's, but they don't use any point sprites.
>
> On Sep 29, 11:16 am, Kostya Vasilyev  wrote:
>
> > Bitmap sprites, mapped to a quad, perhaps of a few predefined sizes, picking
> > up the closest match and scaling to exact desired size You could then
> > distort the quad to provide a kind of hyperspeed blur effect near the edges
> > of the screen
>
> > BTW, I wanted to check out your wallpaper on my HTC Incredible S, but Market
> > won't let me install, reporting it as not compatible with the device.
>
> > -- Kostya
>
> > 2011/9/29 MobileVisuals 
>
> > > Does anyone know if there is any other way to make space animations
> > > with
> > > shining star objects on HTC devices, where size attenuation don't
> > > work?
>
> > > On Sep 28, 10:29 am, MobileVisuals  wrote:
> > > > Yes, it is in the OpenGL ES standard according to the book "Mobile 3D
> > > > Graphics with OpenGL ES and M3G" by Morgan Kaufmann. Here are 3 quotes
> > > > from that book:
> > > > --
> > > > "OpenGL ES 1.0 supports the geometric primitives shown in Figure 3.3:
> > > > points, lines, and
> > > > triangles. OpenGL ES 1.1 amends this list with point sprites."
>
> > > > "OpenGL ES 1.1 provides features for points that are especially useful
> > > > for particle effects:
> > > > point sprites, point size arrays, and point size attenuation."
>
> > > > "When points are defined by an array, in OpenGL ES 1.0 they all have
> > > > the same size, defined by glPointSize{fx}. In OpenGL ES 1.1 it is
> > > > possible to give each point its own size (see Section 8.1.2), and the
> > > > point sizes may be attenuated by the distance between each
> > > > point and the camera."
> > > > -
> > > > Could it be that the new HTC and LG devices only have OpenGL ES 1.0?
> > > > Devices with names like HTC HD and LG Optimus. I don't see anything HD
> > > > or optimus about them if they support an old OpenGL ES standard.
>
> > > > I don't have any HTC or LG devices, so I can't test
> > > > glGet(GL_POINT_SIZE_RANGE), but it would be interesting to so.
>
> > > > Do you know if there is any other way to make space animations with
> > > > shining star objects on LG and HTC devices? I have produced 2 apps
> > > > with 3D space effects, but I can't release them for LG and HTC. It is
> > > > the same thing for SonyEricsson, by the way. My space apps work
> > > > exactly like they should on Samsung and most other Android devices,
> > > > but I would really like to release them for LG, HTC and SonyEricsson
> > > > also.
>
> > > > On Sep 28, 1:03 am, Indicator Veritatis  wrote:
>
> > > > > Now that I know what you are doing with the point attentuation, I see
> > > > > that you are not using it for anti-aliasing, so that comment turned
> > > > > out to lead to a dead end. As for why it is not supported, yes, it is
> > > > > in the Open GL standard, but is it in ES? ES doesn't support
> > > > > everything. And what do you get on those phones when you query
> > > > > glGet(GL_POINT_SIZE_RANGE) and glGet(GL_POINT_SIZE_GRANULARITY) or
> > > > > GL_SMOOTH_POINT_SIZE_RANGE and GL_SMOOTH_POINT_SIZE_GRANULARITY?
>
> > > > > On Sep 27, 12:26 am, MobileVisuals  wrote:
>
> > > > > > I need Point attenuation to produce space animations with shining
> > > > > > particles, which look like stars. How can I achieve that effect
> > > > > > without using Point attenuation?
> > > > > > Do you mean that I should make small re

[android-developers] YUV opengl - request information

2011-09-29 Thread dani maoz
Hi
I need to develop application which decode YUV image from a file using
opengl
Can anyone post a sample code, or link to example/tutorial website
Thanks 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] Always-on GPS: widget or app?

2011-09-29 Thread Pinheiro
I need to make an app that transmits GPS information each 5 minutes
(the information gathering can be switched on and off in the app).

The question is: to ensure that the information is gathered should I
call the requestLocationUpdates() on an regular app or should I use a
widget running in the background?

The problem with a regular app is that it will be paused if there's a
low memory situation. That would stop the GPS updates, making the app
useless. (Correct if I'm wrong)

If I use a widget instead, I'm certain it will be started each 5
minutes and requestLocationUpdates() will be called (with a
removeUpdate() every time there's a fix). But can I be certain the
widget will stay in memory until there's a GPS fix? Or, if the GPS fix
takes too long, there is also the risk that the widget will be paused
before acquiring a fix?

Comments by anyone with field experience on the subject will be most
welcome, 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: HTC and LG haven't implemented Android in the right way

2011-09-29 Thread MobileVisuals
Thanks for the idea, do you mean like this?

Scale to small size if the sprite is far away.
Scale to medium size if the sprite is medium distance.
Scale to big size if the sprite is close.

That could work for other animations, but it would be very slow for my
star cluster animations. There are hundreds of stars in each cluster.
As it is now, I draw each star cluster in one single glDrawArrays
call. That makes it fast.

Wouldn't I have to make one glDrawArrays call for each one of the
stars if I had to scale them in different sizes? That would mean
hundreds of glDrawArrays calls instead of one.

A point sprite is a screen-aligned element of variable size that is
defined by a single point. Would it really be a sprite if it was
mapped to a quad polygon?

I removed all HTC devices from the compatibility list for my Morphing
galaxy live wallpaper, because the HTC users complained that it didn't
look like it should. Lots of HTC users said the same thing, so I am
sure that it doesn't work on any of the HTC's. My other LW's seem to
work well on the HTC's, but they don't use any point sprites.


On Sep 29, 11:16 am, Kostya Vasilyev  wrote:
> Bitmap sprites, mapped to a quad, perhaps of a few predefined sizes, picking
> up the closest match and scaling to exact desired size You could then
> distort the quad to provide a kind of hyperspeed blur effect near the edges
> of the screen
>
> BTW, I wanted to check out your wallpaper on my HTC Incredible S, but Market
> won't let me install, reporting it as not compatible with the device.
>
> -- Kostya
>
> 2011/9/29 MobileVisuals 
>
> > Does anyone know if there is any other way to make space animations
> > with
> > shining star objects on HTC devices, where size attenuation don't
> > work?
>
> > On Sep 28, 10:29 am, MobileVisuals  wrote:
> > > Yes, it is in the OpenGL ES standard according to the book "Mobile 3D
> > > Graphics with OpenGL ES and M3G" by Morgan Kaufmann. Here are 3 quotes
> > > from that book:
> > > --
> > > "OpenGL ES 1.0 supports the geometric primitives shown in Figure 3.3:
> > > points, lines, and
> > > triangles. OpenGL ES 1.1 amends this list with point sprites."
>
> > > "OpenGL ES 1.1 provides features for points that are especially useful
> > > for particle effects:
> > > point sprites, point size arrays, and point size attenuation."
>
> > > "When points are defined by an array, in OpenGL ES 1.0 they all have
> > > the same size, defined by glPointSize{fx}. In OpenGL ES 1.1 it is
> > > possible to give each point its own size (see Section 8.1.2), and the
> > > point sizes may be attenuated by the distance between each
> > > point and the camera."
> > > -
> > > Could it be that the new HTC and LG devices only have OpenGL ES 1.0?
> > > Devices with names like HTC HD and LG Optimus. I don't see anything HD
> > > or optimus about them if they support an old OpenGL ES standard.
>
> > > I don't have any HTC or LG devices, so I can't test
> > > glGet(GL_POINT_SIZE_RANGE), but it would be interesting to so.
>
> > > Do you know if there is any other way to make space animations with
> > > shining star objects on LG and HTC devices? I have produced 2 apps
> > > with 3D space effects, but I can't release them for LG and HTC. It is
> > > the same thing for SonyEricsson, by the way. My space apps work
> > > exactly like they should on Samsung and most other Android devices,
> > > but I would really like to release them for LG, HTC and SonyEricsson
> > > also.
>
> > > On Sep 28, 1:03 am, Indicator Veritatis  wrote:
>
> > > > Now that I know what you are doing with the point attentuation, I see
> > > > that you are not using it for anti-aliasing, so that comment turned
> > > > out to lead to a dead end. As for why it is not supported, yes, it is
> > > > in the Open GL standard, but is it in ES? ES doesn't support
> > > > everything. And what do you get on those phones when you query
> > > > glGet(GL_POINT_SIZE_RANGE) and glGet(GL_POINT_SIZE_GRANULARITY) or
> > > > GL_SMOOTH_POINT_SIZE_RANGE and GL_SMOOTH_POINT_SIZE_GRANULARITY?
>
> > > > On Sep 27, 12:26 am, MobileVisuals  wrote:
>
> > > > > I need Point attenuation to produce space animations with shining
> > > > > particles, which look like stars. How can I achieve that effect
> > > > > without using Point attenuation?
> > > > > Do you mean that I should make small rectangular polygons with
> > > > > transparent textures instead? I have tried that before on M3G and it
> > > > > didn't look as good as Point attenuation.
>
> > > > > Anti-Aliasing is a method of fooling the eye that a jagged edge is
> > > > > really smooth.Will that really be enough to get the same effect as
> > > > > Point attenuation? Could you please be more specific in which OpenGL
> > > > > technique I should use to make it work on HTC and LG?
>
> > > > > Isn't Point attenuation a part of the Android OpenGL standard?
> > > > > Shouldn't HTC and LG 

[android-developers] How do I navigate to the SD card?

2011-09-29 Thread cellurl
I want to run a non-market .apk located on SD card.

Q: How do I navigate to it?

I don't have a data plan, so I can't put it on a website,
or can I use wifi to do this somehow??

Thanks for any leads!
cellurl

-- 
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] I have a map and it is necessary to put more than 1,000 objects.

2011-09-29 Thread Andrei
Tell me how can I solve the problem

I have a map and it is necessary to put more than 1,000 objects.
If I just keep trying to add, the program hangs on for about 5
minutes.
I see the output in a decision
Load, only objects on the side of the map, which is now visible to the
user.
how can this be accomplished?
Are there other solutions to the problem?

-- 
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 calculate the distance between two degree values? (for example: 350º to 15º = 25º / 250º to 190º = 60º)

2011-09-29 Thread Ken H
I would like to reiterate what JackN said -- you don't have enough
info. But a good place to start would here: 
http://www.movable-type.co.uk/scripts/latlong.html

For those interested, a routine for the distance between two points
(on Earth) in kilometers is:

public double gps2m(double lat_a, double lng_a, double lat_b, double
lng_b) {
double R = 6371;//km
double dLat = (lat_b - lat_a) * (Math.PI / 180.0);
double dLon = (lng_b - lng_a) * (Math.PI / 180.0);
double a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat_a *
(Math.PI / 180.0))
* Math.cos(lat_b * (Math.PI / 180.0)) * Math.sin(dLon/2) *
Math.sin(dLon/2);
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
return R * c;
}

where lat_a and lng_a are your start coordinates and lat_b and lng_b
are your stop coordinates.

Ken H

-- 
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] "scrolling" question

2011-09-29 Thread Mark Murphy
On Thu, Sep 29, 2011 at 1:34 PM, John Goche  wrote:
> Thank you for your replies. I am still wondering though how the user of a
> mobile phone
> makes use of the focus feature we have been discussing. Does the user press
> the tab
> key on the soft keypad to get it to work? How does it work?

Focus is attained by tapping on the widget, or by using the pointer on
the device (if any).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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] Android Project

2011-09-29 Thread Joao Braga
The issue is not how to develop, but what for mostly everyone :p

-- 
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] "scrolling" question

2011-09-29 Thread Chris


On Thursday, September 29, 2011 1:34:10 PM UTC-4, John Goche wrote:
>
>
> Thank you for your replies. I am still wondering though how the user of a 
> mobile phone
> makes use of the focus feature we have been discussing. Does the user press 
> the tab
> key on the soft keypad to get it to work? How does it work?
>
>
>
There's a nice doc on d.android.com which discusses this 
(http://developer.android.com/resources/articles/touch-mode.html).

>From the article:

"In touch mode, there is no focus and no selection. Any selected item in a 
list of in a grid becomes unselected as soon as the user enters touch mode. 
Similarly, any focused widgets become unfocused when the user enters touch 
mode."

Some other good nuggets in the article, too.

- C

-- 
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 Project

2011-09-29 Thread arun kumar
Hello all,
I want to Develop a New Android Application with 1 month Duration. Any
innovative ideas for project name and description?

-- 
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: standalone popup: UI question

2011-09-29 Thread John Goche
Hi Ryan,

I downloaded your code and tried it out. At first it seemed really cool and
working
out well for the most part. Then I realized that if the user presses the Esc
key on
the dialog instead of pressing on one of the buttons the user is left with a
small
square hidden below the dialog (this small square is the activity that
launched
the dialog). Then you need to press Esc again for it to go away in order to
be
able to click on the icons in the launcher. I wonder whether you were aware
of this glitch with the code you posted.

Regards,

John Goche

On Mon, Sep 26, 2011 at 10:45 PM, Ryan Mattison wrote:

> Yo John,
>
> I've made a blog post for you entitled:   Android Custom Transparent
> Dialog Alarm Style @ http://www.ryangmattison.com/
>
> It is clearly formatted there, I'll also include it below:
>
> Running out of topics to blog about, so I'm going to randomly select
> questions off the Android Developer boards.   There was a UI question
> today:
>
>
>
> Hello,
>
> I would like to know whether it is somehow possible
> to create a popup window which does not take up the
> whole display area. I am asking because I need to display
> a message when an alarm expires but do not want to resort
> to notifications because they seem to be squished in the top
> right corner of the phone and I think would make it hard to turn
> an alarm off it it were a notification. On the other hand bringing
> up an entire window could obfuscate other applications. I guess
> there is nothing like HP/Palm webOS's notification mechanism
> on android (there you can pop up a window and the users can
> still keep on interacting with whatever app they were using or
> close the popup window)jQuery152008387357299216092_1317069193779?
>
> Regards,
>
> John Goche
>
> http://groups.google.com/group/android-developers/msg/debed653b314232f
>
>
>
> I assume he means something like this,
>
>
>
>
>
> To implement something like this, first you'll need to create some
> themes - these are to be saved in styles.xml:
>
>
>
> 
> 
>
>#00FF
>#aa00
>
>name="Theme.CompletelyTransparentWindow">
>true
>@null
>@drawable/
> transparent_background
>true
>0.0
>
>
>parent="android:style/Theme.Translucent.NoTitleBar">
>true
>true
>@null
>
>@drawable/translucent_background
>
>0.0
>
>
>
>parent="android:style/Theme.Dialog">
>true
>true
>@null
>0.3
>
>@style/TextAppearance
>
>
>@style/TextAppearance
>
>
>@style/TextAppearance
>
>
>
>
>
>#
>#FF1B82EB
>#5C5CFF
>#5C5CFF
>13sp
>normal
>
>
> 
> You'll want to edit the manifest, so the Alarm popup activity themes
> to not have a background - notice the Theme.CustomDialog
>
>
>
>
>  android:theme="@style/Theme.CustomDialog"
>  android:label="@string/app_name">
>
>
> android:name="android.intent.category.LAUNCHER" />
>
>
> Next, you'll want to create a custom control that makes custom popups
> really easy to work with, first the XML for a two button popup.  I
> have this title twobuttonpopupdialog.xml
>
>
> 
> http://schemas.android.com/apk/res/
> android"
>android:layout_width="match_parent"
> android:layout_height="wrap_content"
>android:orientation="vertical">
>
>android:typeface="sans" android:gravity="center_horizontal|
> top"
>android:paddingTop="10dip" android:paddingLeft="10dip"
>android:paddingRight="10dip" android:paddingBottom="10dip"
>android:layout_width="wrap_content"
> android:layout_height="wrap_content" />
>android:minWidth="260dip" android:layout_height="match_parent"
>android:gravity="center_

Re: [android-developers] "scrolling" question

2011-09-29 Thread John Goche
Thank you for your replies. I am still wondering though how the user of a
mobile phone
makes use of the focus feature we have been discussing. Does the user press
the tab
key on the soft keypad to get it to work? How does it work?

Thanks,

John Goche

On Thu, Sep 29, 2011 at 6:23 PM, Mark Murphy wrote:

> There is also android:nextFocusDown and kin.
>
> On Thu, Sep 29, 2011 at 12:19 PM, lbendlin  wrote:
> > I think the highlighting order is purely defined by the order of the
> objects in the layout XML or the order in which you add them through code.
>

-- 
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 capture sensor moves using SensorSimulator

2011-09-29 Thread ColorTheorist
You'll have to use the sensormanager class and use thresholds as you
have mentioned at the lowest level by subscribing to the
accelerometer. From there you should be able to do what you want. If
there are nice libraries that will do mathematical calculations that
often accompany these readings I do not know of one.  Similar readings
for orientation for tilt can be done with the sensormanager.

On Sep 29, 12:08 am, KK  wrote:
> Hi All,
> Can someone explain about how to capture a particular movement, meaning
> there must be some mechanism to capture the changes in X,Y and Z
> co-ordinates and other things calculate the corresponding acceleration etc
> and then set the threshold for your required shake/move. If I want to try a
> new shake, how to do I set the threshold value, what is the usual process?
>
> I was wondering, is there any way we can use enable SensorSimulator and let
> it capture all the sensor parameters during shake/move and then pick those
> recorded values and set your threshold. I think this must
> be repetitive process, if someone wants to tune the threshold value. Would
> appreciate if someone can throw some light on this.
>
> Thanks,
> KK

-- 
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: Break the execution

2011-09-29 Thread LiTTle
I don't understand your question very much but I think that you could
add "break;"

Could you explain better what do you mean, because someone will read
this conversation in the future for help.

-- 
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 to check if device has hardware search key

2011-09-29 Thread Latimerius
I thought querying the SPECIAL_FUNCTION KeyCharacterMap instance for
KEYCODE_SEARCH would do the trick, however there's no SPECIAL_FUNCTION until
API Level 11, whereas I need to support 7.

Any ideas?

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

Re: [android-developers] "scrolling" question

2011-09-29 Thread Mark Murphy
There is also android:nextFocusDown and kin.

On Thu, Sep 29, 2011 at 12:19 PM, lbendlin  wrote:
> I think the highlighting order is purely defined by the order of the objects 
> in the layout XML or the order in which you add them through code.
>
> --
> 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
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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] "scrolling" question

2011-09-29 Thread lbendlin
I think the highlighting order is purely defined by the order of the objects in 
the layout XML or the order in which you add them through code. 

-- 
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: trying to start-activity from alertdiaog --please advice

2011-09-29 Thread Manas Shah
Thanks all for your reply..  Its working now.

Code was perfect it was me dim who missed out entry in manifest.

Thanks Jeremy for remembering it!


On Thu, Sep 29, 2011 at 2:08 AM, Studio LFP  wrote:

> A guessing game, fun!
>
> My guess is...
>
> Intent newintent1 = new Intent(placeorder.this,**finalpage.class);
> newintent1.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
> startActivity(newintent1);
> alertDialog.cancel();
>
> Steven
> Studio LFP
> http://www.studio-lfp.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
>

-- 
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] "scrolling" question

2011-09-29 Thread John Goche
Hello,

This may be a simple question, but I have not noticed any scrollwheel
on android phones unlike on the blackberry. So when I scroll in the
emulator with the mouse scrollwheel what does this action
correspond to on a real phone?

When I scroll the mouse on the emulator some fields don't go through
being highlighted. Can I specify the highlighting order somehow?

Thanks,

John Goche

-- 
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] dynamic listview problem: would like EditText change to trigger another EditText change

2011-09-29 Thread John Goche
On Wed, Sep 28, 2011 at 10:32 PM, Studio LFP  wrote:

> I don't mean to shift gears here on you, but you are putting these
> EditTexts in a ListView and you may not even need the ListView.
>
> A ListView is usually not edited in place and actually are very friendly
> when you try to.
>

Your statements seem contradictory. You say a list view is not edited in
place.
Then you say a list view is very friendly when you try to edit it in place?


>
> Are you planning on having a lot of these edit boxes?
>

Yes, in each row. On average there may only be a dozen or two or less per
screen.


>
> It might be better just to use a LinearLayout wrapped in a ScrollView and
> dynamically add EditText to the LinearLayout assigning different IDs as you
> go.  That way you can access those at any time and you won't have to fight
> with the ListView.
>

Yes, in the end overriding getView was giving me lots of problems so I
dumped the listview altogether
and used inflation of XML rows in a linearlayout in a scrollview in a
linearlayout. This may be inefficient
but I would have had to keep an array of rows around anyways even if I
implemented a listview with an
adapter...

what is not clear right now is what advantages/disadvantages a listview with
adapter may have had
compared to views added to a plain linearlayout.


> I know people don't like to share ideas for programs, but can you explain a
> little more why you would have so many edit in place boxes that you need a
> ListView?
>

Since I don't want my users to have to go through a separate screen to input
information which
could be edited in place, I do it right there. Just like with SQL queries,
some returned rows have
unique fields, and some do not, hence the need to update textedits
concurrently.

Regards,

John Goche

-- 
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: Break the execution

2011-09-29 Thread JackN
if (strUserName.equals(""))
{
Toast.makeText(getBaseContext(), "Enter User Name.", 10).show();


}

else return;


On Sep 23, 9:38 am, TreKing  wrote:
> On Fri, Sep 23, 2011 at 6:06 AM, Sivaprakash 
> > wrote:
> > Inside this If condition I want to stop the execution and dont let the
> > system to execute rest of the code which I have in bottom.
>
> That's pretty much the exact purpose of an "if" condition 
>
> On Fri, Sep 23, 2011 at 6:10 AM, tamil maran  wrote:
> > use this line
>
> > android.os.killprocess
>
> Even discounting the fact the OP stated he wants to stay in the Activity,
> that's not how you exit an app in Android.
>
> ---­--
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
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: GLSurfaceView's onPause and onResume called in Activity's onStop and onStart to handle partially transparent child-activities. Is this OK?

2011-09-29 Thread J Handal
Cool teaching
Where is the code??
On Sep 29, 2011 9:42 AM, "Streets Of Boston" 
wrote:
>
> Bumpedee bump... :)
>
> --
> 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: How to calculate the distance between two degree values? (for example: 350º to 15º = 25º / 250º to 190º = 60º)

2011-09-29 Thread JackN
Distance is the space between two points. You don't have enough info
to calculate the distance.


On Sep 27, 9:58 am, Lew Bloch  wrote:
> On Tuesday, September 27, 2011 7:29:09 AM UTC-7, saex wrote:
>
> > there is a function or something on Java to calculate the distance
> > between two degree values? (min 0º and max 360º)
>
> > for example:
>
> > 350º to 15º = 25º
>
> > 250º to 190º = 60º
>
> Which way do you want it?  They cannot both be correct.
>
> Bearing is conventionally calculated positive-clockwise with 0° at North (or
> "face forward" for relative bearing), most maths work
> positive-counterclockwise with 0° corresponding to the positive x axis.
>
> Either way, 350° to 15° is +25° or -335°, and 250° to 190° is -60° or +300°,
> depending on how you want to play it.
>
> You can use the remainder operator or manually add or subtract 360° to make
> things fall into your desired target range.  Your basic operation is
> subtraction modulo 360.  A conventional range is [-180°, 180°).
>
> etc...
>
> "Etc." takes a single period to end the abbreviation.  The term "etc." only
> makes sense once you have established a consistent pattern, which your post
> did not.
>
> --
> Lew

-- 
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: Improving Local GPS Accuracy

2011-09-29 Thread lbendlin
Fair enough. But in order to use the DGPS approach you first need to use 
something (much) more precise than your Android GPS receiver to measure the 
DGPS base station location. A bit of a catch-22. 

-- 
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 ExpandableListView and Fragment in same layout.

2011-09-29 Thread Akhilesh Mani
Hi,

I want to use ExpandableListView and Fragment class in same XML layout as
ExpandableListView  on left of screen and Fragment on right.
I had done same with ListView And Fragment and its works well but with
ExpandableListView its not working.

Please suggest me.
Regards
Mani.

-- 
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: Samsung Galaxy S2 (2.3.4) and Arduino ADK

2011-09-29 Thread hudvin
Hi,
No, I don't find any solution. Waiting for ROM update.

-- 
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


  1   2   >