[android-developers] Re: google analytics jar and notifying my app users

2010-12-18 Thread Brill Pappin
Haha.
I don't think thats in the spirit of the notice, but i grok why you
put it there... I would likely do that as well :)

I've been thinking about adding it to my keyboard simply as a way to
get some demographics on what kinds of devices the users are using my
software on.
I want to make some changes, but I need to know who my greatest user
base is so I can keep them happy.

- Brill Pappin




On Dec 18, 8:49 pm, Nathan  wrote:
> All good ideas.
>
> I have a help screen that shows when starting the app. At the bottom,
> it has a license agreement. Among other things, it says "This software
> gets anonymous usage statistics through Google Analytics."
>
> The license agreement is a good place. No one reads it anyway.

-- 
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: 4000 Character Description Limit!?

2010-12-18 Thread Doug
Now I can make my product description as humorous as Woot's!

Woot!

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] Re: Why Android Why???

2010-12-18 Thread Doug
I'm glad to know that you've decided for me the device I'd be most
happy with, given that you don't really know anything about me, how I
intend to use it, or how much money I'm willing to spend on it.  But
at least you've decided for me.

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] Re: Camera picture taking memory error

2010-12-18 Thread Stephen Lebed
Bumping this thread to see if anyone has an answer for this.

Thanks,
s


On Dec 14, 2:14 pm, Stephen Lebed  wrote:
> In the app I'm working on, I'm using Camera.addCallbackBuffer and
> Camera.setPreviewCallbackWithBuffer to control the camera preview.
> BTW, this has been one of the best fixes in Froyo yet!  No more GC
> anymore!
>
> I'm trying to take a picture, and sometimes it works, saving the image
> to the sd card, and sometimes it doesn't.  When it doesn't work, the
> preview is frozen, but the app is still running.  For instance, I can
> still call up the menu. So its not locking up the app at all.  I've
> tracked it down to a memory allocation issue I believe.  It seems that
> the camera is using the buffers from the preview to store the picture
> data.  I could be wrong about this.  I've upped the memory buffers
> used in the addCallbackBuffer, and it seems it fix the problem, but
> shouldn't there be a seperate buffer for the snapped picture data?
>
> Is there a way to allocate a buffer for the Camera.takePictureCallback
> routine to store the data into?
> Is there a better way to make sure the Camera has enough memory to use
> the addCallbackBuffers and take a full size photo?
> Is anyone else experiencing this problem using the camera preview
> buffers and taking a full size picture?
>
> Any help is greatly appreciated.
>
> Best,
> Stephen Lebed
> Developer of 'On The Level' and 'SL DigiSlate'

-- 
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: Camera works fine, but deployed camera app says that I need an SD card

2010-12-18 Thread David Karr
On Dec 18, 2:09 pm, Mark Murphy  wrote:
> If you have the SD card mounted on your WinXP box, that SD card is not
> available to the phone. You need to unmount first before you can save
> photos, etc. to the SD card. See Environment and
> getExternalStorageState().

Sorry, I need more information.

You're saying that because I had the phone connected to my computer
with the USB cable (so I could deploy the application to the device),
that means that the SD card in the phone is mounted on the WinXP box,
and so can't be used from the phone?  Is there something that should
be done in the setup of the test on the phone so that I would unmount
the SD card from the WinXP box, but still let me step through the code
while it's running on the phone?

Calling Environment.getExternalStorageState() will tell me the
"current state" of the SD card.  How does that help me?

> On Sat, Dec 18, 2010 at 5:00 PM, David Karr  
> wrote:
> > I have a droid2.  I can take pictures with the camera. I can browse
> > the pictures I've taken on the phone.
>
> > I can connect the phone to my WinXP box and browse the SD card through
> > File Explorer.
>
> > I'm now trying a sample tutorial (SizedCameraIntent) from the "Pro
> > Android Media" book. When I deploy to the phone, the camera starts,
> > but when I try to take the picture, it gives me "Please insert an SD
> > card before using the camera".
>
> > What am I doing wrong?
>
> > --
> > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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: ListView Selected

2010-12-18 Thread Doug
On Dec 17, 1:07 pm, David Toledo  wrote:
> How to can stay HIGHLIGHTED the row selected in my ListView

Why would you want to do this anyway?

-- 
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: List of phone names?

2010-12-18 Thread Doug
Comprehensive:

http://en.wikipedia.org/wiki/List_of_Android_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] Re: Anybody seen a slowdown in sales?

2010-12-18 Thread Doug
FWIW.  My relatively popular app's sales have been roughly 20-30%
lower than average over the past 30 days compared to the previous 30
days.  Also, my app has jumped up a few slots since I last checked it
a couple weeks ago (and the category as a whole seems fairly shaken
up).  I haven't updated my app in the past month.  Also, my install %
has been dropping (again) since the last time Google found that stat
to be incorrectly dropping.  It's like they patched it, but then it
went back on its merry way down.

Honestly, after obsessing over these things for over year, I have
finally just let it be the way it is and have found more interesting
things to obsess over!

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] Re: How can Activity from pause to resume?

2010-12-18 Thread Doug
I'm not sure what exactly you're trying to do, but if you want to
return to A from B, just finish B and the user will go back to A
automatically.

Doug

On Dec 15, 9:35 pm, kong  wrote:
> I have two activities A and B,They are transparent. B uses mediaplayer
> to play video.
>
> A to B use startActivity(intent);
>
> then B plays the video.Then use startActivity(intent) to A.
> I found B's state is pause.
>
> But then I use startActivity(intent) from A to B. B's state is
> onCreate, onStart,Then onResume. I think it's unnecessary to use
> oncreate to create the UI and initalize the mediaplayer. Because B is
> on the background.It's just pause.And from graph of activity's life
> cycle, we can see the activity can from pause to resume state.
>
> But how to do it?Can anyone 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] Encoding/decoding problem

2010-12-18 Thread Eric Kraft
Just a quick suggestion for you due to limited information about your 
situation: check the byte ordering of your TCP request. One machine might send 
data big-endian and the other might receive it little-endian. The fact saving 
the byte stream to a file works makes me think this is the issue you are having.

-- 
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: Encoding/decoding problem

2010-12-18 Thread DanH
Any time you transfer data (anything more than simple ASCII) over the
net you need to be aware of data conversion issues.  It's a
complicated issue, and depends on which specific protocols you're
using, what computer languages are involved, how you describe the
data, etc.  It's a topic for a book, not a post.

If you were to describe specifically how you're transferring the data
then maybe someone could help you with this specific instance.

On Dec 17, 7:37 am, Zainu  wrote:
> Hi Guys,
>
> Need your help again.I am getting byte[] from onPreviewFrame(byte[]
> data, Camera arg1).Now i am transferring each frame through TCP to my
> System and then write a JPG file with that byte[].But when i open this
> JPG file it says that invalid JPG file.Moreover,when i send the same
> byte [] from PictureCallback jpegCallback = new PictureCallback()
> method and then write a JPG file on my PC ,it works fine.
>
> I know its a kind of encoding issue,actually byte[] which i get from
> onPreviewFrame is byte array of compressed image data.
>
> I can only transfer this byte array of compressed image data through
> TCP from my Phone to PC.But i want to decode this data once i get this
> on PC.Can you guys please help me how should i proceed.
>
> I would be very grateful for any kind of help.
>
> Best regards,
> ZAI

-- 
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: SQLite Encryption

2010-12-18 Thread DanH
The problem with SQLCipher, of course, is that you need to compile the
whole C SQLite implementation and embed it in the phone as native
code.  Doable, but not for the faint of heart.

But it is certainly the most secure and complete approach to data
encryption on a phone.

On Dec 18, 8:10 pm, gjs  wrote:
> Hi,
>
> http://sqlcipher.net/
>
> Regards
>
> On Dec 18, 3:12 am, Marco Oreste Migliori 
> wrote:
>
> > Hi guys,
>
> > I'm new in Android world, I'm developing  an application which needs
> > sensitive data stored in a SQLite db.
> > I need to encrypt data but using SQLite that is not possible.
>
> > Is there anyone able to help me?
>
> > Marco
>
> > --

-- 
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] Cursor Adapter for Contacts

2010-12-18 Thread Kavinder Dhaliwal
I'm trying to get an autocompleteTextView with a custom cursor adapter
to allow a user to search his contacts and begin returning suggestions
from the first letter.  My problem i that the way i've implemented it
now, which is the only way I have found to return name and phone
numbers from the current API only returns one contact thoughso if
i search "r" it returns only one contact beginning with r until i
actually spell out a specific name

Code:

 Cursor idCursor =mContent.query(uri, null, null, null, null);
String id = null;

while(idCursor.moveToNext())
{
int idIdx =
idCursor.getColumnIndexOrThrow(ContactsContract.Contacts._ID);
id = idCursor.getString(idIdx);
Log.i(TAG, "idCursor count = " +idCursor.getCount());
Log.i(TAG, "ID"+ id);

}
idCursor.close();

 if(id != null)
{

String where = ContactsContract.Data.CONTACT_ID + " = " 
+ id
+ " AND " +ContactsContract.Data.MIMETYPE + " = '" +

ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE
+ "'";

Cursor dataCursor =
mContent.query(ContactsContract.Data.CONTENT_URI, null, where, null,
null);
int nameIdx =
dataCursor.getColumnIndexOrThrow(ContactsContract.Data.DISPLAY_NAME);
Log.i(TAG, "NameIdx " + nameIdx);
int phoneIdx =
dataCursor.getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER) 
;
Log.i(TAG, "PhoneIdx " +phoneIdx);
int typeIdx =
dataCursor.getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.TYPE);
Log.i(TAG, "typeIDx = " +typeIdx);
String[] result = new String[dataCursor.getCount()];
Log.i(TAG, "DataCursor = " +dataCursor.getCount());
if (dataCursor.moveToFirst())
do { // Extract the name.
String name = dataCursor.getString(nameIdx);
// Extract the phone number.
String number = dataCursor.getString(phoneIdx);
Log.i(TAG, "Number = " +number);
result[dataCursor.getPosition()] = name + " (" 
+ number +
")"; } while(dataCursor.moveToNext());


return dataCursor;

}


Clearly the reason I can only get one name is obviously because I pass
the id from my first query.So basically I am looking for the same
the effect as I have now that can match its query to multiple contact
ids

Any 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


Re: [android-developers] Android - add menu item to Android's built-in apps

2010-12-18 Thread Dianne Hackborn
Sorry, no.

On Sat, Dec 18, 2010 at 6:42 PM, jeena  wrote:

>  i want to add a button or menu item  in the Contacts menu . Is it
> possible.???
>
>
> 
>
>
> Im using Android 2.2 and Helios(Eclipse 3.6.1)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




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

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

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

[android-developers] Re: SharedPreferences not persisting

2010-12-18 Thread neuromit
never mind, it was a bug in my code that was affecting the way I was
loading the preferences. Thanks!

On Dec 18, 5:54 pm, Dianne Hackborn  wrote:
> If you want to ensure the data is saved, it must be done in onPause().
>  Under low memory situations, an activity can be killed before its onStop()
> is called.
>
> On Sat, Dec 18, 2010 at 2:07 PM, Mark Murphy wrote:
>
>
>
>
>
>
>
>
>
> > Generally, I recommend PreferenceManager.getDefaultSharedPreferences()
> > to get the SharedPreferences, as that will be the one that
> > PreferenceActivity uses. Otherwise, your code seems fine. However,
> > bear in mind that onDestroy() is not guaranteed to be called, so you
> > may be better served writing them in onStop(), anyway.
>
> > On Sat, Dec 18, 2010 at 5:01 PM, neuromit  wrote:
> > > I've been trying to save some state variables in the SharedPrefs, this
> > > seems to work fine when onPause, and onStop are called but not when
> > > OnDestroy() is called. When that happens the next time my activity
> > > loads the preference values have disappeared.
>
> > > Here is the code I use to save the variables:
>
> > > SharedPreferences settings = getSharedPreferences("PrivateVariables",
> > > MODE_PRIVATE);
> > > SharedPreferences.Editor prefEditor = settings.edit();
> > > prefEditor.putBoolean("playingState", playingState);
> > > prefEditor.putString("songInfo", songInfo);
> > > prefEditor.commit();
>
> > > and here is how I retrieve them:
>
> > > prefs = PreferenceManager.getDefaultSharedPreferences(context);
> > > playingState = prefs.getBoolean("playingState", true);
> > > songInfo = prefs.getString("songInfo", " No Value ");
>
> > > Is anything I'm doing obviously wrong?
>
> > > --
> > > 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 > >  cr...@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
>
> > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> > Available!
>
> > --
> > 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 > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Android - add menu item to Android's built-in apps

2010-12-18 Thread jeena
 i want to add a button or menu item  in the Contacts menu . Is it 
possible.???




Im using Android 2.2 and Helios(Eclipse 3.6.1)

-- 
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: SharedPreferences not persisting

2010-12-18 Thread neuromit
So I have log messages that get displayed whenever onPause, onStop,
and onDestroy get called.

I don't actually save my preferences in any of these methods, I save
them when the values get changed by the user.

By watching the logcat messages I have determined that my preferences
get deleted (do not persist) only when the onDestroy()  method is
called but when onStop is called the preferences load perfectly fine
the next time my activity starts.

On Dec 18, 5:07 pm, Mark Murphy  wrote:
> Generally, I recommend PreferenceManager.getDefaultSharedPreferences()
> to get the SharedPreferences, as that will be the one that
> PreferenceActivity uses. Otherwise, your code seems fine. However,
> bear in mind that onDestroy() is not guaranteed to be called, so you
> may be better served writing them in onStop(), anyway.
>
>
>
>
>
>
>
>
>
> On Sat, Dec 18, 2010 at 5:01 PM, neuromit  wrote:
> > I've been trying to save some state variables in the SharedPrefs, this
> > seems to work fine when onPause, and onStop are called but not when
> > OnDestroy() is called. When that happens the next time my activity
> > loads the preference values have disappeared.
>
> > Here is the code I use to save the variables:
>
> > SharedPreferences settings = getSharedPreferences("PrivateVariables",
> > MODE_PRIVATE);
> > SharedPreferences.Editor prefEditor = settings.edit();
> > prefEditor.putBoolean("playingState", playingState);
> > prefEditor.putString("songInfo", songInfo);
> > prefEditor.commit();
>
> > and here is how I retrieve them:
>
> > prefs = PreferenceManager.getDefaultSharedPreferences(context);
> > playingState = prefs.getBoolean("playingState", true);
> > songInfo = prefs.getString("songInfo", " No Value ");
>
> > Is anything I'm doing obviously wrong?
>
> > --
> > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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: Determining in advance how much text will fit into a given TextView?

2010-12-18 Thread HippoMan
On Dec 18, 4:54 am, Kostya Vasilyev  wrote:
> [ ... ]
> Use this instead of measureText, to avoid calculating width for the same
> text over and over again (from current position to the end of the string).

Thank you very much.

-- 
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] already created always-on-top-of-all-windows view, how to add touch functionality?

2010-12-18 Thread Dianne Hackborn
The whole point of that window type is the window can't get any user input.

This is not stuff that third party applications are supposed to do.  I
strongly discourage this -- whatever you do here is likely to break in
future versions of the platform.

On Sat, Dec 18, 2010 at 4:58 PM, Aco  wrote:

> Hi All! I'm trying to create an always-op-top button/clickable-image
> which stays on top of all the windows all the time. The proof of
> concept is here
> http://www.appbrain.com/app/smart-taskbar-%28sidebar%29/com.smart.taskbar
> and here http://forum.xda-developers.com/showthread.php?t=865525 I'm
> following this example code
>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/LoadAverageService.java;h=0d86429aaa5ccf6ecf311dfb3af0f3ccbf5f8d29;hb=HEAD
>
> I have been successful and have a running service now. The service
> displays some text on top left corner of screen all the time while
> user can freely interact with rest of apps in normal manner. What I'm
> doing is subclass ViewGroup and add it to root window manager with
> flag TYPE_SYSTEM_OVERLAY. Now I want to add a button/clickable-image
> in place of this text which can receive touch events on itself. I
> tried overriding "onTouchEvent" for the whole ViewGroup but it does
> not receive any event. How can I receive events only on certain parts
> of my always-on-top view group? Kindly suggest.
>
> ==
> CODE=
> ==
>
> import android.app.Service;
> import android.content.Context;
> import android.content.Intent;
> import android.graphics.Canvas;
> import android.graphics.Paint;
> import android.graphics.PixelFormat;
> import android.os.IBinder;
> import android.view.Gravity;
> import android.view.MotionEvent;
> import android.view.ViewGroup;
> import android.view.WindowManager;
> import android.widget.AbsoluteLayout;
> import android.widget.Button;
> import android.widget.LinearLayout;
> import android.widget.RelativeLayout;
> import android.widget.Toast;
>
> public class HUD extends Service {
>HUDView mView;
>
>@Override
>public IBinder onBind(Intent intent) {
>return null;
>}
>
>@Override
>public void onCreate() {
>super.onCreate();
>Toast.makeText(getBaseContext(),"onCreate",
> Toast.LENGTH_LONG).show();
>mView = new HUDView(this);
>WindowManager.LayoutParams params = new
> WindowManager.LayoutParams(
>WindowManager.LayoutParams.WRAP_CONTENT,
>WindowManager.LayoutParams.WRAP_CONTENT,
>
>  WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
>0,
> //
>  WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
> //  |
> WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
>PixelFormat.TRANSLUCENT);
>params.gravity = Gravity.RIGHT | Gravity.TOP;
>params.setTitle("Load Average");
>WindowManager wm = (WindowManager)
> getSystemService(WINDOW_SERVICE);
>wm.addView(mView, params);
>}
>
>@Override
>public void onDestroy() {
>super.onDestroy();
>Toast.makeText(getBaseContext(),"onDestroy",
> Toast.LENGTH_LONG).show();
>if(mView != null)
>{
>((WindowManager)
> getSystemService(WINDOW_SERVICE)).removeView(mView);
>mView = null;
>}
>}
> }
>
> class HUDView extends ViewGroup {
>private Paint mLoadPaint;
>
>public HUDView(Context context) {
>super(context);
>Toast.makeText(getContext(),"HUDView",
> Toast.LENGTH_LONG).show();
>
>mLoadPaint = new Paint();
>mLoadPaint.setAntiAlias(true);
>mLoadPaint.setTextSize(10);
>mLoadPaint.setARGB(255, 255, 0, 0);
>}
>
>@Override
>protected void onDraw(Canvas canvas) {
>super.onDraw(canvas);
>canvas.drawText("Hello World", 5, 15, mLoadPaint);
>}
>
>@Override
>protected void onLayout(boolean arg0, int arg1, int arg2, int arg3,
> int arg4) {
>}
>
>@Override
>public boolean onTouchEvent(MotionEvent event) {
>//return super.onTouchEvent(event);
>Toast.makeText(getContext(),"onTouchEvent",
> Toast.LENGTH_LONG).show();
>return true;
>}
> }
>
> --
> 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

[android-developers] Re: SQLite Encryption

2010-12-18 Thread gjs
Hi,

http://sqlcipher.net/

Regards

On Dec 18, 3:12 am, Marco Oreste Migliori 
wrote:
> Hi guys,
>
> I'm new in Android world, I'm developing  an application which needs
> sensitive data stored in a SQLite db.
> I need to encrypt data but using SQLite that is not possible.
>
> Is there anyone able to help me?
>
> Marco
>
> --

-- 
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: Dynamically reading drawable file names

2010-12-18 Thread Dianne Hackborn
I don't know what to say, the code I pointed to is exactly what has been in
the platform fairly unchanged since 1.0 and has worked fine.

Are you sure you are doing this on a Context that is actually for your
application?  The error message ("Invalid package identifier") indicates it
doesn't know *anything* about your application.

Also I wasn't pointing this code as something to directly copy and paste,
but as a guide.  It comes from really deep down in the framework, so it is
not written as normal application code.

In fact if you copy and pasted the Resources.getSystem() part, that would be
your problem, because that is an API one doesn't normally use to get the
system-only resources.  You should use the normal Resources object in your
app.  (That's why the link I provided went directly to just the line pulling
out the resource data.)

On Sat, Dec 18, 2010 at 4:47 PM, darrinps  wrote:

> This was just an example that fit the example you provided. I trimmed
> down the array to only one .png file which I verified time  and again
> was under the drawable directory and reworked the layout of the file
> to match the example. The entire arrays.xml file which is found under
> the values directory looks like this:
>
> 
> 
>
> 
>@drawable/aggies
>
> 
>
> The same thing happens at the same line.
>
> I get a warning first:
> ResourceTypeInvalid package identifier when getting bag for
> resource number 0x7f05
>
> Then an exception:
> Failure preloading resources
>   android.content.res.Resources$NotFoundException: Array resource ID
> #0x7f05
>   at android.content.res.Resources.obtainTypedArray(Resources.java:
> 424)
>
> The code is IDENTICAL. I copied and pasted it except for the preload
> that I had to comment out.
>
>
>
>
> On Dec 18, 1:02 pm, Dianne Hackborn  wrote:
> > startPreloading() is not relevant to this; that is for the code there
> that
> > is preloading the drawables it gets from the array.
> >
> > Is there actually a sym_def_app_icon drawable in your app?  If not...
>  well
> > yeah, that won't work, it doesn't exist.
> >
> > You should just use the syntax I showed to make an array of references to
> > your *own* drawables, which you can retrieve with the same code as shown
> > using obtainedTypeArray().
> >
> > The last XML syntax you have shown is just not right, so it's not
> surprising
> > it doesn't work.
> >
> >
> >
> > On Fri, Dec 17, 2010 at 8:42 PM, darrinps  wrote:
> > > Thanks.  I tried doing that but it seems to be an old API so I tried
> > > to convert it to what is there today. There must be some mistake I
> > > have made that keeps this from working.
> >
> > > Note that it didn't like mResources.startPreloading();   The method
> > > simply was not there, although finishPreloading() is.  I commented the
> > > startPreloading() line out.
> >
> > > Secondly, it didn't like the format of the array when it looked like
> > > this:
> >
> > > 
> > > @drawable/sym_def_app_icon
> >
> > > So, I changed that to this:
> >
> > > 
> > >
> >
> > > When I execute this line:
> >
> > > TypedArray ar =
> >
> > >
> mResources.obtainTypedArray(com.standardandroid.swarooms.R.array.preloaded_drawables);
> >
> > > I get a warning:
> > > ResourceTypeInvalid package identifier when getting bag for
> > > resource number 0x7f05
> >
> > > Then an exception:
> > > Failure preloading resources
> > >   android.content.res.Resources$NotFoundException: Array resource ID
> > > #0x7f05
> > >   at android.content.res.Resources.obtainTypedArray(Resources.java:
> > > 424)
> >
> > > Any idea what I am doing wrong?
> >
> > > On Dec 13, 1:41 am, Dianne Hackborn  wrote:
> > > > I would recommend just having another resource holding an array of
> the
> > > > drawables to include.  See for example this declaring one:
> >
> > > >
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
> >
> > > > <
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;..
> > > .>And
> > > > this reading it:
> >
> > > >
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
> >
> > > > Sure, it is one more step required when adding a resource, but at
> runtime
> > > it
> > > > is going to be far more efficient than other solutions that require
> > > scanning
> > > > through resources or R symbols or such.
> >
> > > > On Sun, Dec 12, 2010 at 8:17 PM, darrinps 
> wrote:
> > > > > Is there any way for an Android app to read the file names of all
> the
> > > > > files stored under drawable (or for that matter any other
> directory)?
> >
> > > > > I'd like to have it so I can plop in a new file and have the app
> read
> > > > > the name for me for use in a dynamically sized list of radio
> buttons
> > > > > (one button per file) that lists the name of the file by the radio
> > > > > button.
> >
> > > > > I've done something like this with contacts, but I am not sure how
> you
> > > > > read the file names fro

[android-developers] Re: google analytics jar and notifying my app users

2010-12-18 Thread Nathan
All good ideas.

I have a help screen that shows when starting the app. At the bottom,
it has a license agreement. Among other things, it says "This software
gets anonymous usage statistics through Google Analytics."

The license agreement is a good place. No one reads it anyway.

-- 
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] New maps app features and mapview

2010-12-18 Thread shareem sharif
what new apps are you makeing


On Sat, Dec 18, 2010 at 4:52 PM, TreKing  wrote:

> On Sat, Dec 18, 2010 at 5:00 PM, Dianne Hackborn wrote:
>
>> They aren't?
>
>
> I'm glad to stand corrected :-)
>
> There is generally little if any official help here regarding the Maps API
> and no news regarding its fate, so it was hard to assume otherwise. Thanks
> for the info. Looking forward to any improvements in this area.
>
>
> -
> 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

-- 
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: Anybody seen a slowdown in sales?

2010-12-18 Thread Zsolt Vasvari
Another thing I've noticed, is that my purchases from the UK have
stopped in the last 5 days.

Before that I've average 1 1/2 sales a day from the UK in the prior 30
days, representing about 6% of my total sales, but there has been 0
since Dec 14.

On Dec 19, 8:58 am, Zsolt Vasvari  wrote:
> Hi Brad, good information there.  Thanks.
>
> Raised the price, see what happens.
>
> On Dec 19, 2:45 am, Brad Gies  wrote:
>
>
>
> >  From the other comments it seems it's not related to price at all...
> > but I thought I'd offer this anyway as it might help you make more money
> > :).
>
> > For items under $10, $7.99 and $8.99 are kind of a no-man's land. They
> > aren't good price points. In the minds of the average consumer, there
> > are 4 price points at $10 and under, and they are "close to $1", under
> > $5, over $5, and $10. So.. in the range you are talking about ($7.99 and
> > $8.99), the better price points are $6.99 (gets the just over $5 price
> > point in almost every consumers mind) and if you are going to sell it at
> > $8.99, you may as well make it $9.99 because the average consumer
> > doesn't see any difference between $8.99 and $9.99 especially when there
> > is no tax involved, because $9.99 without tax is under $10 and so is
> > $8.99. So, if you're going to sell it at $8.99, you might as well make
> > the extra dollar and sell it at $9.99.
>
> > Of course, it's always more complicated than that simple explanation,
> > and you do have to take into consideration what similar apps are selling
> > for... but in this price range (under $10)... a higher price implies
> > higher quality in the consumer's mind, so don't be scared to price your
> > app higher than your competitors. Probably you should experiment with
> > both $6.99 and $9.99 to determine what the better price point is (which
> > do you make more money at ?).
>
> > Sincerely,
>
> > Brad Gies
> > ---
> > Bistro Bot - Bistro Blurbhttp://bgies.com          
> > http://nocrappyapps.comhttp://bistroblurb.com    
> > http://forcethetruth.comhttp://ihottonight.com
> > ---
> > Everything in moderation, including abstinence (paraphrased)
>
> > Every person is born with a brain... Those who use it well are the 
> > successful happy ones - Brad Gies
>
> > Adversity can make or break you... It's your choice... Choose wisely - Brad 
> > Gies
>
> > Never doubt that a small group of thoughtful, committed people can
> > change the world. Indeed. It is the only thing that ever has - Margaret Mead
>
> > On 17/12/2010 10:08 PM, Zsolt Vasvari wrote:
>
> > > You could be right, and thanks for the insight.   But my sales were
> > > fine after I raised the price for a few days.
>
> > > My nearest competitor is more than me, btw.
>
> > > On Dec 18, 11:36 am, Brad Gies  wrote:
> > >> It's not logical, but from reading a lot of marketing stuff over the
> > >> last 40 years, I think I can tell you what the problem is...
>
> > >> Most people kind of round stuff off in their minds... and normally to a
> > >> multiple of $5. SO.. $8.99 rounds to $10... while $7.99 rounds to
> > >> $5, so physiologically speaking you have doubled your price. ;).
>
> > >> Just a rough stab at telling you why is that most people ignore the .99
> > >> part of a price (unless it is very close to a multiple of $5, so $9.99
> > >> is $10, $4.99 is $5 etc.)... so $8.99 becomes $8 and rounds to $10,
> > >> while $7.99 becomes $7 and rounds to $5.
>
> > >> Can't guarantee it... and the only way you will know for sure is to
> > >> change the price back to $7.99 and see if sales come back to normal. I
> > >> can tell you that price points are incredibly important in marketing,
> > >> and even more important in the low range of prices.
>
> > >> Hopefully, it's a market glitch... but if it doesn't solve itself... try
> > >> putting the price back.
>
> > >> Sincerely,
>
> > >> Brad Gies
> > >> ---
> > >> Bistro Bot - Bistro Blurbhttp://bgies.com        
> > >> http://nocrappyapps.comhttp://bistroblurb.com  http://forcethetruth.comhttp://ihottonight.com
> > >> ---
> > >> Everything in moderation, including abstinence (paraphrased)
>
> > >> Every person is born with a brain... Those who use it well are the 
> > >> successful happy ones - Brad Gies
>
> > >> Adversity can make or break you... It's your choice... Choose wisely - 
> > >> Brad Gies
>
> > >> Never doubt that a small group of thoughtful, committed people can
> > >> change the world. Indeed. It is the only thing that ever has - Margaret 
> > >> Mead
>
> > >> On 17/12/2010 6:34 PM, Zsolt Vasvari wrote:
>
> > >>> My sales have started to decline about 10 days ago and now they are at
> > >>> about 50% compared to then.
> > >>> Has anybody seen anything like this with their

[android-developers] already created always-on-top-of-all-windows view, how to add touch functionality?

2010-12-18 Thread Aco
Hi All! I'm trying to create an always-op-top button/clickable-image
which stays on top of all the windows all the time. The proof of
concept is here 
http://www.appbrain.com/app/smart-taskbar-%28sidebar%29/com.smart.taskbar
and here http://forum.xda-developers.com/showthread.php?t=865525 I'm
following this example code
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/LoadAverageService.java;h=0d86429aaa5ccf6ecf311dfb3af0f3ccbf5f8d29;hb=HEAD

I have been successful and have a running service now. The service
displays some text on top left corner of screen all the time while
user can freely interact with rest of apps in normal manner. What I'm
doing is subclass ViewGroup and add it to root window manager with
flag TYPE_SYSTEM_OVERLAY. Now I want to add a button/clickable-image
in place of this text which can receive touch events on itself. I
tried overriding "onTouchEvent" for the whole ViewGroup but it does
not receive any event. How can I receive events only on certain parts
of my always-on-top view group? Kindly suggest.

==
CODE=
==

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.os.IBinder;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AbsoluteLayout;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Toast;

public class HUD extends Service {
HUDView mView;

@Override
public IBinder onBind(Intent intent) {
return null;
}

@Override
public void onCreate() {
super.onCreate();
Toast.makeText(getBaseContext(),"onCreate",
Toast.LENGTH_LONG).show();
mView = new HUDView(this);
WindowManager.LayoutParams params = new 
WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
0,
//  WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
//  | 
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
PixelFormat.TRANSLUCENT);
params.gravity = Gravity.RIGHT | Gravity.TOP;
params.setTitle("Load Average");
WindowManager wm = (WindowManager) 
getSystemService(WINDOW_SERVICE);
wm.addView(mView, params);
}

@Override
public void onDestroy() {
super.onDestroy();
Toast.makeText(getBaseContext(),"onDestroy",
Toast.LENGTH_LONG).show();
if(mView != null)
{
((WindowManager)
getSystemService(WINDOW_SERVICE)).removeView(mView);
mView = null;
}
}
}

class HUDView extends ViewGroup {
private Paint mLoadPaint;

public HUDView(Context context) {
super(context);
Toast.makeText(getContext(),"HUDView", 
Toast.LENGTH_LONG).show();

mLoadPaint = new Paint();
mLoadPaint.setAntiAlias(true);
mLoadPaint.setTextSize(10);
mLoadPaint.setARGB(255, 255, 0, 0);
}

@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawText("Hello World", 5, 15, mLoadPaint);
}

@Override
protected void onLayout(boolean arg0, int arg1, int arg2, int arg3,
int arg4) {
}

@Override
public boolean onTouchEvent(MotionEvent event) {
//return super.onTouchEvent(event);
Toast.makeText(getContext(),"onTouchEvent",
Toast.LENGTH_LONG).show();
return true;
}
}

-- 
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: Anybody seen a slowdown in sales?

2010-12-18 Thread Zsolt Vasvari
Hi Brad, good information there.  Thanks.

Raised the price, see what happens.



On Dec 19, 2:45 am, Brad Gies  wrote:
>  From the other comments it seems it's not related to price at all...
> but I thought I'd offer this anyway as it might help you make more money
> :).
>
> For items under $10, $7.99 and $8.99 are kind of a no-man's land. They
> aren't good price points. In the minds of the average consumer, there
> are 4 price points at $10 and under, and they are "close to $1", under
> $5, over $5, and $10. So.. in the range you are talking about ($7.99 and
> $8.99), the better price points are $6.99 (gets the just over $5 price
> point in almost every consumers mind) and if you are going to sell it at
> $8.99, you may as well make it $9.99 because the average consumer
> doesn't see any difference between $8.99 and $9.99 especially when there
> is no tax involved, because $9.99 without tax is under $10 and so is
> $8.99. So, if you're going to sell it at $8.99, you might as well make
> the extra dollar and sell it at $9.99.
>
> Of course, it's always more complicated than that simple explanation,
> and you do have to take into consideration what similar apps are selling
> for... but in this price range (under $10)... a higher price implies
> higher quality in the consumer's mind, so don't be scared to price your
> app higher than your competitors. Probably you should experiment with
> both $6.99 and $9.99 to determine what the better price point is (which
> do you make more money at ?).
>
> Sincerely,
>
> Brad Gies
> ---
> Bistro Bot - Bistro Blurbhttp://bgies.com           
> http://nocrappyapps.comhttp://bistroblurb.com     
> http://forcethetruth.comhttp://ihottonight.com
> ---
> Everything in moderation, including abstinence (paraphrased)
>
> Every person is born with a brain... Those who use it well are the successful 
> happy ones - Brad Gies
>
> Adversity can make or break you... It's your choice... Choose wisely - Brad 
> Gies
>
> Never doubt that a small group of thoughtful, committed people can
> change the world. Indeed. It is the only thing that ever has - Margaret Mead
>
> On 17/12/2010 10:08 PM, Zsolt Vasvari wrote:
>
>
>
> > You could be right, and thanks for the insight.   But my sales were
> > fine after I raised the price for a few days.
>
> > My nearest competitor is more than me, btw.
>
> > On Dec 18, 11:36 am, Brad Gies  wrote:
> >> It's not logical, but from reading a lot of marketing stuff over the
> >> last 40 years, I think I can tell you what the problem is...
>
> >> Most people kind of round stuff off in their minds... and normally to a
> >> multiple of $5. SO.. $8.99 rounds to $10... while $7.99 rounds to
> >> $5, so physiologically speaking you have doubled your price. ;).
>
> >> Just a rough stab at telling you why is that most people ignore the .99
> >> part of a price (unless it is very close to a multiple of $5, so $9.99
> >> is $10, $4.99 is $5 etc.)... so $8.99 becomes $8 and rounds to $10,
> >> while $7.99 becomes $7 and rounds to $5.
>
> >> Can't guarantee it... and the only way you will know for sure is to
> >> change the price back to $7.99 and see if sales come back to normal. I
> >> can tell you that price points are incredibly important in marketing,
> >> and even more important in the low range of prices.
>
> >> Hopefully, it's a market glitch... but if it doesn't solve itself... try
> >> putting the price back.
>
> >> Sincerely,
>
> >> Brad Gies
> >> ---
> >> Bistro Bot - Bistro Blurbhttp://bgies.com         
> >> http://nocrappyapps.comhttp://bistroblurb.com   
> >> http://forcethetruth.comhttp://ihottonight.com
> >> ---
> >> Everything in moderation, including abstinence (paraphrased)
>
> >> Every person is born with a brain... Those who use it well are the 
> >> successful happy ones - Brad Gies
>
> >> Adversity can make or break you... It's your choice... Choose wisely - 
> >> Brad Gies
>
> >> Never doubt that a small group of thoughtful, committed people can
> >> change the world. Indeed. It is the only thing that ever has - Margaret 
> >> Mead
>
> >> On 17/12/2010 6:34 PM, Zsolt Vasvari wrote:
>
> >>> My sales have started to decline about 10 days ago and now they are at
> >>> about 50% compared to then.
> >>> Has anybody seen anything like this with their own apps?  I am at a
> >>> loss as I cannot see a reason for this -- my ratings are as high as
> >>> ever, no 1-stars to scare people off, no "hot" competitor app.  I did
> >>> increase the price by $1 about 14 days ago, but that actually lead to
> >>> more sales for a few days after, so I don't know.  The $1 increase is
> >>> from $7.99 to $8.99, so percentage-wise it's not that much.
> >>> As I am typing, I'm going on a 5 hour w

Re: [android-developers] New maps app features and mapview

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 5:00 PM, Dianne Hackborn wrote:

> They aren't?


I'm glad to stand corrected :-)

There is generally little if any official help here regarding the Maps API
and no news regarding its fate, so it was hard to assume otherwise. Thanks
for the info. Looking forward to any improvements in this area.

-
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] Re: Dynamically reading drawable file names

2010-12-18 Thread darrinps
This was just an example that fit the example you provided. I trimmed
down the array to only one .png file which I verified time  and again
was under the drawable directory and reworked the layout of the file
to match the example. The entire arrays.xml file which is found under
the values directory looks like this:




 
@drawable/aggies



The same thing happens at the same line.

I get a warning first:
ResourceTypeInvalid package identifier when getting bag for
resource number 0x7f05

Then an exception:
Failure preloading resources
   android.content.res.Resources$NotFoundException: Array resource ID
#0x7f05
   at android.content.res.Resources.obtainTypedArray(Resources.java:
424)

The code is IDENTICAL. I copied and pasted it except for the preload
that I had to comment out.




On Dec 18, 1:02 pm, Dianne Hackborn  wrote:
> startPreloading() is not relevant to this; that is for the code there that
> is preloading the drawables it gets from the array.
>
> Is there actually a sym_def_app_icon drawable in your app?  If not...  well
> yeah, that won't work, it doesn't exist.
>
> You should just use the syntax I showed to make an array of references to
> your *own* drawables, which you can retrieve with the same code as shown
> using obtainedTypeArray().
>
> The last XML syntax you have shown is just not right, so it's not surprising
> it doesn't work.
>
>
>
> On Fri, Dec 17, 2010 at 8:42 PM, darrinps  wrote:
> > Thanks.  I tried doing that but it seems to be an old API so I tried
> > to convert it to what is there today. There must be some mistake I
> > have made that keeps this from working.
>
> > Note that it didn't like mResources.startPreloading();   The method
> > simply was not there, although finishPreloading() is.  I commented the
> > startPreloading() line out.
>
> > Secondly, it didn't like the format of the array when it looked like
> > this:
>
> > 
> >         @drawable/sym_def_app_icon
>
> > So, I changed that to this:
>
> >     
> >                
>
> > When I execute this line:
>
> >             TypedArray ar =
>
> > mResources.obtainTypedArray(com.standardandroid.swarooms.R.array.preloaded_drawables);
>
> > I get a warning:
> > ResourceType    Invalid package identifier when getting bag for
> > resource number 0x7f05
>
> > Then an exception:
> > Failure preloading resources
> >   android.content.res.Resources$NotFoundException: Array resource ID
> > #0x7f05
> >   at android.content.res.Resources.obtainTypedArray(Resources.java:
> > 424)
>
> > Any idea what I am doing wrong?
>
> > On Dec 13, 1:41 am, Dianne Hackborn  wrote:
> > > I would recommend just having another resource holding an array of the
> > > drawables to include.  See for example this declaring one:
>
> > >http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> > >  > .>And
> > > this reading it:
>
> > >http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...
>
> > > Sure, it is one more step required when adding a resource, but at runtime
> > it
> > > is going to be far more efficient than other solutions that require
> > scanning
> > > through resources or R symbols or such.
>
> > > On Sun, Dec 12, 2010 at 8:17 PM, darrinps  wrote:
> > > > Is there any way for an Android app to read the file names of all the
> > > > files stored under drawable (or for that matter any other directory)?
>
> > > > I'd like to have it so I can plop in a new file and have the app read
> > > > the name for me for use in a dynamically sized list of radio buttons
> > > > (one button per file) that lists the name of the file by the radio
> > > > button.
>
> > > > I've done something like this with contacts, but I am not sure how you
> > > > read the file names from something like the drawable directory!
>
> > > > Thanks.
>
> > > > Darrin
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > 
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@

Re: [android-developers] Re: Service or no service

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 4:54 PM, Hans-Erik  wrote:

> AsyncTask out the door, Services welcome in.
>

Realize that a Service can just as easily be killed.


> > There's really no such thing as "keeping a connection alive". Your
> process
> > can and will be killed at some point, if not by the system then
> explicitly
> > by the user.
>
> In my Desire phone i see both fring and Google mssagin always running
> Read some about a service being "Sticky"
>

AFAIK, "sticky" means the system will try to restart the Service if it was
killed before it was done. This does not guarantee that you will always be
running.


> I read elsewhere that a service can be started with a Brodcastcmmand
>
> http://stackoverflow.com/questions/4468006/can-i-start-a-service-without-activity-or-receiver
>
> cant wrap my head around the code implementation here.
> after reading many questions here and elsewhere about this.
> I think the method is:
> - an apk file which contains a Service an activity and a
> BroadcastReceiver Class.
> - action.BOOT_COMPLETED will start only my Service, not the Activity.
>  The user can from Main Launcher start Activity for "in app settings"
> and I Bind
>  to Service and Unbind when done
>

Yes, you can start a service in response to system events, however, I stress
again that your Service can and will be killed eventually. You cannot count
on it "living forever".


> I look at your TreKing app. Im impressed nice work
>

Thanks :-)


> Can I ask how did you tap into CTA bus tracker system GPS signal for all
> there Busses location?
>

They have a whole API for
developers
.

-
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: start a new activity and then... come back to the old one!

2010-12-18 Thread Dianne Hackborn
clearTaskOnLaunch means that your entire task will be reset when the user
re-launches it from home (like the settings app does), so if that isn't
happening regardless of whether you are currently in an e-mail activity that
is a bigger problem.l

Am I to assume from your attributes here that this activity is a "front
dore" activity that doesn't display or do anything, but just launches the
"real" activity of your app?  If not, using finishOnTaskLaunch and noHistory
is really questionable.  If it is, consider making this one the NoDisplay
theme (and then don't worry about setting a forced orientation on it since
it will never be seen).

On Sat, Dec 18, 2010 at 1:44 PM, Utumno  wrote:

> here are the flags to my main activity:
>
>   android:screenOrientation="landscape"
>  android:label="@string/app_name"
>  android:theme="@android:style/
> Theme.NoTitleBar.Fullscreen"
>  android:configChanges="orientation"
>  android:clearTaskOnLaunch="true"
>  android:finishOnTaskLaunch="true"
>  android:noHistory="true">
>
> On Dec 19, 5:35 am, TreKing  wrote:
> > On Sat, Dec 18, 2010 at 3:04 PM, Utumno  wrote:
> > > 1) when user exits the mail application ( either by actually sending
> > > the email or simply by pressing the 'BACK' button ) then he gets
> > > kicked out of my app entirely ( back to the main screen, while it
> > > should go back to my app! )
> >
> > This works fine for me. Do you have any flags specified for your own
> > activity?
> >
> >
> >
> > > 2) when having the email application on top, user presses the 'HOME'
> > > button, the Android correctly comes back to the main screen. However,
> > > when I now re-launch my app, user lands in the mail application again,
> > > which is confusing. I would like him to get back to my app's main
> > > activity.
> >
> > I don't think that's confusing. The last thing the user did in your app
> was
> > open the email screen - that's where they left off. So when they go back
> to
> > your app, they should pick up where they left off - on the email screen.
> >
> >
> -
> > 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
>



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

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

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

Re: [android-developers] Re: Google Nexus S - Please provide as DEV phone, asap :-)

2010-12-18 Thread Dianne Hackborn
On Sat, Dec 18, 2010 at 3:48 PM, r...@thelogicbox wrote:

> Valid point, or maybe it's intentional for non-US developers to be
> significantly disadvantaged?
>

Yes, we need to protect our US application developers from unfair
competition.


> Understand there's logistical challenges for global distribution, but
> surely it's in everyone's interest to find ways for developers around
> the globe to gain access to such significant hardware updates before
> high st users (well at least not months after!).
>

Except for NFC, I don't think there is much any other high-end Android
device would be holding you back from doing.

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

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

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

Re: [android-developers] Re: Google Nexus S - Please provide as DEV phone, asap :-)

2010-12-18 Thread Dianne Hackborn
On Fri, Dec 17, 2010 at 2:14 AM, RobBln wrote:

> On 8 Dez., 04:17, Dianne Hackborn  wrote:
> > You will be able to walk into Best Buy and buy one as soon as it comes
> out.
> I'm sorry, but this answer is very ignorant for all non-US developers
> willing to develop cool new NFC and gyro apps.


Sorry, you didn't make any mention in your original message about being
non-US.

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

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

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

[android-developers] Re: How to simulate a (missing) DPAD

2010-12-18 Thread blindfold
OK, I've got it working, and in a rather straightforward manner.
Although dispatchKeyEvent() for some reason does not always determine
which UI element gets focus, it turned out that the UI element
actually does have a focus that one can in onKeyDown() reliably
perform a hasFocus() for after having done setFocusable(),
setFocusableInTouchMode() on all UI elements and a requestFocus(),
requestFocusFromTouch() on one element. Next, after putting all UI
elements like radiobuttons, checkboxes and editboxes in (for instance)
arrays, one can assign focus to the previous or next element when the
volume up or down key is pressed, thus hard-coding in what order UI
elements are traversed. Not very elegant, but thus far it works
reliably (no strange dependencies on whether a view is scrollable),
does the accessibility job for me in all activities, and it did not
require a major program overhaul. Tested on Android 1.6 and 2.2. It is
a bit like defining the tab order when programming for Microsoft
Windows. The key thing was to discard use of dispatchKeyEvent()
altogether and "manually" do what dispatchKeyEvent() was supposed to
do in terms of moving focus to a next UI element for a generated
KeyEvent.KEYCODE_DPAD_DOWN and KeyEvent.KEYCODE_DPAD_UP.

Thanks


On Dec 17, 10:06 am, Dianne Hackborn  wrote:
> I doubt you will get this to work correctly, because you are doing this
> after parts of the framework that deal with things like going in and out of
> touch mode have seen the events.
>
> Why are you doing this?  If a device doesn't have a DPAD, the user isn't
> going to think to use the volume keys to navigate focus(!!).  You should be
> giving them a good touch-based UI.
>
> On Fri, Dec 17, 2010 at 12:38 AM, blindfold wrote:
>
>
>
> > For Android phones that lack a physical d-pad or trackball (e.g.
> > Alcatel OT-980, Motorola Droid Pro), I am trying to remap the physical
> > up and down volume keys to simulated up and down d-pad keys using code
> > like
>
> > �...@override
> >   public boolean onKeyDown(int keyCode, KeyEvent event) {
> >      if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
> >         KeyEvent ke = new KeyEvent(KeyEvent.ACTION_DOWN,
> > KeyEvent.KEYCODE_DPAD_UP);
> >         dispatchKeyEvent(ke);
> >         return true;
> >      }
> >      return super.onKeyDown(keyCode, event);
> >   }
>
> > Although this works fine with a ListView and with activity views that
> > become scrollable because they are too large to fit on the physical
> > screen, it somehow does not work at all for activity views that remain
> > small enough to fit on the screen. I can test this by increasing the
> > number of radio buttons in some activity view and then see how the
> > above key remapping begins to work fine as soon as there are more
> > controls than fit on the screen. I have tried all sorts of things with
> > setting focus after making things focusable using setFocusable(true),
> > setFocusableInTouchMode(true), requestFocus(), requestFocusFromTouch()
> > and so on, but nothing seems to help. The above onKeyDown() executes
> > in all relevant cases as shown by my Log.i() output, but it is the
> > dispatchKeyEvent() that  in the described cases does nothing. All my
> > activity views are surrounded by  in the XML
> > of their respective layouts. More about the context of this problem at
>
> >http://groups.google.com/group/eyes-free-dev/browse_thread/thread/374...
> > (eyes-free-dev list).
>
> > So the above code works "sometimes", but I need a reliable/general
> > solution. How can one reliably remap physical keys to perform key
> > functions for which there are no physical keys on the Android device?
>
> > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Re: Google Nexus S - Please provide as DEV phone, asap :-)

2010-12-18 Thread r...@thelogicbox
Valid point, or maybe it's intentional for non-US developers to be
significantly disadvantaged?
Understand there's logistical challenges for global distribution, but
surely it's in everyone's interest to find ways for developers around
the globe to gain access to such significant hardware updates before
high st users (well at least not months after!).
If you fancy sending a container downunder, i'm sure i'll be able to
find enough needy developers to prepay the transit.


On Dec 17, 9:14 pm, RobBln  wrote:
> On 8 Dez., 04:17, Dianne Hackborn  wrote:
>
> > You will be able to walk into Best Buy and buy one as soon as it comes out.
>
> I'm sorry, but this answer is very ignorant for all non-US developers
> willing to develop cool new NFC and gyro apps. There is no Best Buy in
> Berlin, Germany and f***in' Best Buy refuses any online orders to non-
> US destinations. So this 19th Century U.S. only "Best Buy" shoppe
> seems to be an EPIC FAIL in a globalized economy.
>
> So, please, Google, do provide the Nexus S as a developer phone
> officially ASAP.

-- 
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: Fm Radio

2010-12-18 Thread Bob Kerns
Me, either. But I'll speculate as to how it works.

Phones are radios. The radio signal is processed and decoded into
audio, and fed into the audio streams. The mechanisms for this are
open source.

The FM radio signal is a radio signal that is processed and decoded
into audio. I bet it works much the same way.

So, if you're serious about figuring it out, I'd start by going and
learning how the low level phone access works (i.e. how the audio is
routed from radio to audio mixer). That part is open source.

Then I'd start reverse engineering, and find what calls the FM radio
app is making that are similar to how the phone works to set up the
audio stream for phone callls, and from there, I'd look for what's
different, that might be how it tells the radio what stream to route
to where.

I doubt there's an easier way to do it, if that's how it's set up to
work. If, on the other hand, it's just exposed as a separate device,
I'd look at what device drivers are added to the kernel, and look to
see how the FM Radio app turns it on and accesses it. (And the FM
Radio functionality does have to be specifically turned on by the app.
I'm guessing it's normally disabled due to battery consumption, but I
don't really know).

On Dec 18, 1:19 pm, Mark Murphy  wrote:
> On Sat, Dec 18, 2010 at 4:13 PM, wolf  wrote:
> > thanks again mr bob, and how i can to view the code from FM Radio app?
>
> I am not aware of any "FM Radio" apps for Android that are open source.

-- 
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] Listview Row Animation

2010-12-18 Thread Kostya Vasilyev
There is a way to interate currently visible items in a ListView. Do that,
find the one whose data just changed, then get that item's layout, and start
your animation.

Make sure to cancel any animation in getView of your adapter, in case an
item's layout gets recycled before the animation is done playing.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
19.12.2010 0:34 пользователь "Petar K."  написал:
> Hello,
>
> I have created a listview where each row contains several textviews.
> In my application some of these textviews can be updated based on what
> I receive from my server. I want to know how I can set an animation to
> a textview in a particular row. An example could be an application
> where there is a list of live games and I want to update a particular
> score with an animation.I have tried to put a textview.setAnimation in
> my getView of my adapter however this makes an animation on every row
> of my listview when I only want it at a particular row.
>
> Any Help would be great.
>
> 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

-- 
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: Getting the already set alarm (AlarmManager)

2010-12-18 Thread Kostya Vasilyev
BTW, setting a new alarm with the same pending intent replaces any existing
alarm that used that intent.

"Same" has a well defined meaning here, look it up under PendingIntent. It
does not have to be the same Java object reference.

So if you are looking to update an existing alarm (with a new
interval,perhaps), there is already a way to do this without querying for
existing alarms.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
19.12.2010 1:54 пользователь "Dianne Hackborn" 
написал:
> We will not be persisting alarms.
>
> On Sat, Dec 18, 2010 at 2:49 PM, Sari AlHiari  wrote:
>
>> Thanks Mark
>>
>> You're right. I will need to keep track of toss info.
>>
>> Sounds likea good potential enhancement area for the apis. To persist
>> alarms and allow user to query them.
>>
>> I appreciate the help.
>>
>> On Dec 18, 1:13 pm, Mark Murphy  wrote:
>> > There is no such API, unfortunately. You will need to keep track of
>> > that information yourself. You probably needed to do that anyway,
>> > since the alarms are cleared on reboot, so you probably need that
>> > information in order to re-establish the alarms at that point.
>> >
>> > On Sat, Dec 18, 2010 at 5:57 AM, Sari AlHiari 
>> wrote:
>> > > Hello,
>> >
>> > > I want my app to be able to query the Alarm service to see if there
is
>> > > a previous Alarm already set for this app, and if not to set one.
>> >
>> > > I could not find any api to get a list of set alarms or a specific
>> > > alarm for that matter.
>> >
>> > > Can anyone help?
>> >
>> > > I Appreciate any assistance.
>> >
>> > > --
>> > > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>> >
>> > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
>> > Available!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com

>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails. All such
> questions should be posted on public forums, where I and others can see
and
> answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
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] Application not visible in market and on Developer console.where to check

2010-12-18 Thread Atik
Hello,
 i have published one paid app on market. but on developer console i
am unable to see that application. so after some time i tried to
upload the apk again and that time i got the msg that "YOU HAVE
UPLOADED THE APP WITH THE SAME PACKAGE NAME"... here i came to know
that my application is successfully uploaded. can any one tell me how
to see that app on developer console.

All Android Market Listing is still showing me blank page. can any one
tell me how much time does it take to reflect the application in
android market...please solve my issue..

Thanks
Atik

-- 
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] MMS messages

2010-12-18 Thread yves...@gmail.com
Hi I use android.provider.Telephony.SMS_RECEIVED to listen to new SMS
message received. But what should I use to listen to MMS message
received?

Thanks

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


Re: [android-developers] New maps app features and mapview

2010-12-18 Thread Dianne Hackborn
On Fri, Dec 17, 2010 at 9:48 AM, TreKing  wrote:

> On Fri, Dec 17, 2010 at 6:31 AM, Federico Paolinelli 
> wrote:
>
>> Will new map app features be available in mapview as well?
>
> The people qualified to answer that question are not going to answer you,
> but don't count on it.
>

They aren't?

The maps library has clearly been stagnant, with only a few changes since
1.0 (fwiw fixes for densities went in to I believe 2.2, and were back-ported
to older versions).

This is something that definitely should be improved, but I don't know a
schedule for it.  The library was originally owned and used by the maps
application, but for the application to be able to evolve as quickly as it
has (and not be tied to newer platform versions), it was changed to have its
own built-in copy of the maps library; this left ownership of the library
somewhat in limbo.

So yes we are aware of the library not getting the love it deserves, but
there is nothing concrete to report about it at this point.

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

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

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

Re: [android-developers] SharedPreferences not persisting

2010-12-18 Thread Dianne Hackborn
If you want to ensure the data is saved, it must be done in onPause().
 Under low memory situations, an activity can be killed before its onStop()
is called.

On Sat, Dec 18, 2010 at 2:07 PM, Mark Murphy wrote:

> Generally, I recommend PreferenceManager.getDefaultSharedPreferences()
> to get the SharedPreferences, as that will be the one that
> PreferenceActivity uses. Otherwise, your code seems fine. However,
> bear in mind that onDestroy() is not guaranteed to be called, so you
> may be better served writing them in onStop(), anyway.
>
> On Sat, Dec 18, 2010 at 5:01 PM, neuromit  wrote:
> > I've been trying to save some state variables in the SharedPrefs, this
> > seems to work fine when onPause, and onStop are called but not when
> > OnDestroy() is called. When that happens the next time my activity
> > loads the preference values have disappeared.
> >
> > Here is the code I use to save the variables:
> >
> > SharedPreferences settings = getSharedPreferences("PrivateVariables",
> > MODE_PRIVATE);
> > SharedPreferences.Editor prefEditor = settings.edit();
> > prefEditor.putBoolean("playingState", playingState);
> > prefEditor.putString("songInfo", songInfo);
> > prefEditor.commit();
> >
> > and here is how I retrieve them:
> >
> > prefs = PreferenceManager.getDefaultSharedPreferences(context);
> > playingState = prefs.getBoolean("playingState", true);
> > songInfo = prefs.getString("songInfo", " No Value ");
> >
> > Is anything I'm doing obviously wrong?
> >
> > --
> > 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
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Service or no service

2010-12-18 Thread Hans-Erik

> I guess if you have a significantly large user base, but I'm assuming that's
> not the case, or is it?

Im planing ahead, trying to learn what it takes to make and app like
that

> Is some lagging or some delay in the delivery of these messages
> completely unacceptable?

yes im playing with the ide since mail or sms is no instant

> What is so urgent about these messages that they *must* be received
> instantaneously?

That is a powerful features for a mobile app

> Perhaps give the user a "poll interval" or an option for manually refreshing
> the data, if it makes sense for your app.

no, that way the phone is "never" ready to receive .

> I would rethink what you're trying to accomplish and try to work within the
> restrictions imposed by mobile devices.

your right ofcorce, im new to android but not to Java so the
transition is
a bit painful

> You can certainly keep your AsyncTask alive between orientation changes -
> but only as long as the user keeps your app in focus as the current
> Activity. Once you get put in the background you're subject to being killed.

AsyncTask out the door, Services welcome in.

> There's really no such thing as "keeping a connection alive". Your process
> can and will be killed at some point, if not by the system then explicitly
> by the user.

In my Desire phone i see both fring and Google mssagin always running
Read some about a service being "Sticky"

I read elsewhere that a service can be started with a Brodcastcmmand
http://stackoverflow.com/questions/4468006/can-i-start-a-service-without-activity-or-receiver

cant wrap my head around the code implementation here.
after reading many questions here and elsewhere about this.
I think the method is:
- an apk file which contains a Service an activity and a
BroadcastReceiver Class.
- action.BOOT_COMPLETED will start only my Service, not the Activity.
  The user can from Main Launcher start Activity for "in app settings"
and I Bind
  to Service and Unbind when done

Yea will try this tomorrow after work.

I look at your TreKing app. Im impressed nice work
That app would really been helpful this morning
when i was waiting for the buss in the snowstorm.
Can I ask how did you tap into CTA bus tracker system
GPS signal for all there Busses location?




-- 
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: Getting the already set alarm (AlarmManager)

2010-12-18 Thread Dianne Hackborn
We will not be persisting alarms.

On Sat, Dec 18, 2010 at 2:49 PM, Sari AlHiari  wrote:

> Thanks Mark
>
> You're right. I will need to keep track of toss info.
>
> Sounds likea good potential enhancement area for the apis. To persist
> alarms and allow user to query them.
>
> I appreciate the help.
>
> On Dec 18, 1:13 pm, Mark Murphy  wrote:
> > There is no such API, unfortunately. You will need to keep track of
> > that information yourself. You probably needed to do that anyway,
> > since the alarms are cleared on reboot, so you probably need that
> > information in order to re-establish the alarms at that point.
> >
> > On Sat, Dec 18, 2010 at 5:57 AM, Sari AlHiari 
> wrote:
> > > Hello,
> >
> > > I want my app to be able to query the Alarm service to see if there is
> > > a previous Alarm already set for this app, and if not to set one.
> >
> > > I could not find any api to get a list of set alarms or a specific
> > > alarm for that matter.
> >
> > > Can anyone help?
> >
> > > I Appreciate any assistance.
> >
> > > --
> > > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
> >
> > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> > Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: Setting Wallpaper

2010-12-18 Thread Dianne Hackborn
Oh yeah if you want to *prevent* scrolling, you'll need to do a live
(unlive) wallpaper.

For a static bitmap image, it's pretty easy, but more than 2 lines of code.

On Sat, Dec 18, 2010 at 2:48 PM, String wrote:

> Don't know what to tell you, man, but Context.setWallpaper does work, and
> doesn't resize bitmaps that are the requested size to start with. The code I
> posted earlier was directly from one of my apps.
>
> However, I do stand by what I said about multiple home screen panes. I
> don't think there's a way around that one without live wallpapers.
>
> String
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Getting the already set alarm (AlarmManager)

2010-12-18 Thread Sari AlHiari
Thanks Mark

You're right. I will need to keep track of toss info.

Sounds likea good potential enhancement area for the apis. To persist
alarms and allow user to query them.

I appreciate the help.

On Dec 18, 1:13 pm, Mark Murphy  wrote:
> There is no such API, unfortunately. You will need to keep track of
> that information yourself. You probably needed to do that anyway,
> since the alarms are cleared on reboot, so you probably need that
> information in order to re-establish the alarms at that point.
>
> On Sat, Dec 18, 2010 at 5:57 AM, Sari AlHiari  wrote:
> > Hello,
>
> > I want my app to be able to query the Alarm service to see if there is
> > a previous Alarm already set for this app, and if not to set one.
>
> > I could not find any api to get a list of set alarms or a specific
> > alarm for that matter.
>
> > Can anyone help?
>
> > I Appreciate any assistance.
>
> > --
> > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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: Setting Wallpaper

2010-12-18 Thread String
Don't know what to tell you, man, but Context.setWallpaper does work, and 
doesn't resize bitmaps that are the requested size to start with. The code I 
posted earlier was directly from one of my apps. 

However, I do stand by what I said about multiple home screen panes. I don't 
think there's a way around that one without live wallpapers. 

String 

-- 
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] Standalone product using Android

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 5:04 AM, A K S  wrote:

> I wanted to develop a product which will run only my application.


You probably want a different group, like the "platform" group, and you
should probably elaborate on what you mean by "product".

-
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] snaps not attaching to market while uploading the app

2010-12-18 Thread Atik
hello,
i have created application, i have tested it on device, and while
uploading the app to market its giving me some erroe like

The screenshot must be 320x480, 480x800, or 480x854 pixels.

i have taken the screenshots of the emulator and uploading it..

pls tell me something.. i tried diff image editors to edit the image
to the required size but still its showing the same .

please suggest.. i need to upload it.

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


Re: [android-developers] Creating Multiple Activities:

2010-12-18 Thread TreKing
On Fri, Dec 17, 2010 at 9:33 AM, Esmelin Bisono wrote:

> If you can include the sample files that would be great.


http://developer.android.com/guide/topics/fundamentals.html

-
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] Camera works fine, but deployed camera app says that I need an SD card

2010-12-18 Thread Mark Murphy
If you have the SD card mounted on your WinXP box, that SD card is not
available to the phone. You need to unmount first before you can save
photos, etc. to the SD card. See Environment and
getExternalStorageState().

On Sat, Dec 18, 2010 at 5:00 PM, David Karr  wrote:
> I have a droid2.  I can take pictures with the camera. I can browse
> the pictures I've taken on the phone.
>
> I can connect the phone to my WinXP box and browse the SD card through
> File Explorer.
>
> I'm now trying a sample tutorial (SizedCameraIntent) from the "Pro
> Android Media" book. When I deploy to the phone, the camera starts,
> but when I try to take the picture, it gives me "Please insert an SD
> card before using the camera".
>
> What am I doing wrong?
>
> --
> 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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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] google analytics jar and notifying my app users

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 7:41 AM, David Liebman wrote:

> So the question is, how do I notify my users that I'm using
> Google Analytics?
>

Update your app description.
Show a dialog on first run / update that shows the message.
Add a TOS dialog / screen that includes the information and must be accepted
to continue using the app.

-
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] SharedPreferences not persisting

2010-12-18 Thread Mark Murphy
Generally, I recommend PreferenceManager.getDefaultSharedPreferences()
to get the SharedPreferences, as that will be the one that
PreferenceActivity uses. Otherwise, your code seems fine. However,
bear in mind that onDestroy() is not guaranteed to be called, so you
may be better served writing them in onStop(), anyway.

On Sat, Dec 18, 2010 at 5:01 PM, neuromit  wrote:
> I've been trying to save some state variables in the SharedPrefs, this
> seems to work fine when onPause, and onStop are called but not when
> OnDestroy() is called. When that happens the next time my activity
> loads the preference values have disappeared.
>
> Here is the code I use to save the variables:
>
> SharedPreferences settings = getSharedPreferences("PrivateVariables",
> MODE_PRIVATE);
> SharedPreferences.Editor prefEditor = settings.edit();
> prefEditor.putBoolean("playingState", playingState);
> prefEditor.putString("songInfo", songInfo);
> prefEditor.commit();
>
> and here is how I retrieve them:
>
> prefs = PreferenceManager.getDefaultSharedPreferences(context);
> playingState = prefs.getBoolean("playingState", true);
> songInfo = prefs.getString("songInfo", " No Value ");
>
> Is anything I'm doing obviously wrong?
>
> --
> 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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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: start a new activity and then... come back to the old one!

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 3:44 PM, Utumno  wrote:

> here are the flags to my main activity:


I would try taking out the "clear" and "finish" (and maybe even noHistory)
flags to see if that makes a difference.
Otherwise not sure. Works for me.

-
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] SharedPreferences not persisting

2010-12-18 Thread neuromit
I've been trying to save some state variables in the SharedPrefs, this
seems to work fine when onPause, and onStop are called but not when
OnDestroy() is called. When that happens the next time my activity
loads the preference values have disappeared.

Here is the code I use to save the variables:

SharedPreferences settings = getSharedPreferences("PrivateVariables",
MODE_PRIVATE);
SharedPreferences.Editor prefEditor = settings.edit();
prefEditor.putBoolean("playingState", playingState);
prefEditor.putString("songInfo", songInfo);
prefEditor.commit();

and here is how I retrieve them:

prefs = PreferenceManager.getDefaultSharedPreferences(context);
playingState = prefs.getBoolean("playingState", true);
songInfo = prefs.getString("songInfo", " No Value ");

Is anything I'm doing obviously wrong?

-- 
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] Camera works fine, but deployed camera app says that I need an SD card

2010-12-18 Thread David Karr
I have a droid2.  I can take pictures with the camera. I can browse
the pictures I've taken on the phone.

I can connect the phone to my WinXP box and browse the SD card through
File Explorer.

I'm now trying a sample tutorial (SizedCameraIntent) from the "Pro
Android Media" book. When I deploy to the phone, the camera starts,
but when I try to take the picture, it gives me "Please insert an SD
card before using the camera".

What am I doing wrong?

-- 
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: TextView inner shadow

2010-12-18 Thread Stefan Klumpp
I'm also interested in that.

Anyone?

-- 
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: New maps app features and mapview

2010-12-18 Thread JP
Huh  interesting find, thanks!
I'm not sure in howfar Googlenav is the way to go. (I remember
com.google.googlenav from wayback in m3-rc37 and m5-rc15). There's
actually documentation around, but with the release of Android 0.9,
googlenav was booted from developers direct reach. I.e. the way I
understand, this is one of those dreaded internal libraries where
Google will give no guarantee (strike that, promise) on forward
compatibility. I guess I'll leave my fingers off of that approach,
although it's striking.

This kindof confirms how much effort has gone into the Android Maps
API. In my mind, Google should have maintained this over time and not
leave us all wet having to rely on aerobatics messing with internal
libraries. So franksmule, there's your answer, I suppose: Don't hold
your breath.


On Dec 17, 1:21 pm, Igor Korobka  wrote:
> I've solved the issue with small labels on the google maps on hdpi
> screens.
>
> You need a bit of reflection (see the snippet of smali code below):
> class com.google.googlenav.map.MapTile {
>
> .field public static final TEXT_SIZE_DESKTOP:B = 0x0t
> .field public static final TEXT_SIZE_LARGE:B = 0x3t
> .field public static final TEXT_SIZE_MEDIUM:B = 0x2t
> .field public static final TEXT_SIZE_SMALL:B = 0x1t
>
> .field static textSize:I
>
> }
>
> Setting static field textSize to constant value  TEXT_SIZE_LARGE at
> the end of onCreate method makes a miracle - labels on the maps become
> large enough to read easily.
> Note: you need to clean application cache to kill old map tiles.
>
> On Dec 17, 8:29 pm, JP  wrote:
>
> > I was wondering for quite some time now about the apparent detachment
> > of the Maps API from the underlying system that the Google Maps app
> > enjoys. Having loosely followed the updates to the Google Maps app on
> > Android, it appears the Maps API is stuck in 2007 (save pinch-zoom).
> > The biggest issue to me actually rakes back more than a year. I could
> > not find an answer how to scale the Maps API "correctly" to the higher
> > resolution devices. This means street names and labels are too small
> > to be legible on devices like the Nexus One. Possibly there is no
> > answer at this point. The only "option" that I have found is to set up
> > the app to run in backwards "compatibility mode", which is hardly the
> > answer.
> > Receiving an update of the Maps API to the same vector-based system
> > that the Google Maps app uses, would be a sweeping solution to that
> > problem, and of course would offer the benefits and the hedonistic
> > quality of the 3D-style view that we've seen released in Google Maps.
> > It'll be interesting to see how long the developers using the Android
> > Maps API will remain hanging high an dry, now that the disconnect to
> > the underlying system of the Google Maps app is all too apparent.
>
> > On Dec 17, 4:31 am, Federico Paolinelli  wrote:
>
> > > Will new map app features be available in mapview as well?
> > > I'd really love to see rotation in it.
>
> > > Thanks
>
> > >        Federico

-- 
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: start a new activity and then... come back to the old one!

2010-12-18 Thread Utumno
here are the flags to my main activity:



On Dec 19, 5:35 am, TreKing  wrote:
> On Sat, Dec 18, 2010 at 3:04 PM, Utumno  wrote:
> > 1) when user exits the mail application ( either by actually sending
> > the email or simply by pressing the 'BACK' button ) then he gets
> > kicked out of my app entirely ( back to the main screen, while it
> > should go back to my app! )
>
> This works fine for me. Do you have any flags specified for your own
> activity?
>
>
>
> > 2) when having the email application on top, user presses the 'HOME'
> > button, the Android correctly comes back to the main screen. However,
> > when I now re-launch my app, user lands in the mail application again,
> > which is confusing. I would like him to get back to my app's main
> > activity.
>
> I don't think that's confusing. The last thing the user did in your app was
> open the email screen - that's where they left off. So when they go back to
> your app, they should pick up where they left off - on the email screen.
>
> -
> 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] start a new activity and then... come back to the old one!

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 3:04 PM, Utumno  wrote:

> 1) when user exits the mail application ( either by actually sending
> the email or simply by pressing the 'BACK' button ) then he gets
> kicked out of my app entirely ( back to the main screen, while it
> should go back to my app! )
>

This works fine for me. Do you have any flags specified for your own
activity?

>
> 2) when having the email application on top, user presses the 'HOME'
> button, the Android correctly comes back to the main screen. However,
> when I now re-launch my app, user lands in the mail application again,
> which is confusing. I would like him to get back to my app's main
> activity.
>

I don't think that's confusing. The last thing the user did in your app was
open the email screen - that's where they left off. So when they go back to
your app, they should pick up where they left off - on the email screen.

-
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] Listview Row Animation

2010-12-18 Thread Petar K.
Hello,

I have created a listview where each row contains several textviews.
In my application some of these textviews can be updated based on what
I receive from my server. I want to know how I can set an animation to
a textview in a particular row. An example could be an application
where there is a list of live games and I want to update a particular
score with an animation.I have tried to put a textview.setAnimation in
my getView of my adapter however this makes an animation on every row
of my listview when I only want it at a particular row.

Any Help would be great.

Thanks,

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


Re: [android-developers] How to uninstall app?

2010-12-18 Thread TreKing
On Thu, Dec 16, 2010 at 7:41 PM, kong  wrote:

> why?


It's probably a built-in app which can't be uninstalled without rooting,
AFAIK.

-
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] Porting valgrind-3.6.0 on Android-2.2.

2010-12-18 Thread TreKing
On Fri, Dec 17, 2010 at 1:52 AM, black panther wrote:

> I am trying to build the valgrind-3.6.0 for Android 2.2 using codesourcery
> toolchain .
>

You will probably have better luck on a group geared toward this valgrind
thing.

-
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: App disappeared from Market Home

2010-12-18 Thread TreKing
On Sat, Dec 18, 2010 at 2:58 PM, Chister Nordvik  wrote:

> I really can't understand why they cannot just make the console unavailable
> instead of developers experiencing buggy behavior like this.
>

Then who's going to test their stuff for them!? =P

-
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: Service or no service

2010-12-18 Thread TreKing
On Fri, Dec 17, 2010 at 1:44 AM, Hans-Erik  wrote:

> On scenario is if 200 phones connect to my server wanting to send one jpg
> to another phone.
>

What are the odds that 200 devices are going to perform the same action at
the same time?
I guess if you have a significantly large user base, but I'm assuming that's
not the case, or is it?


>  200 messages would go out trough google notifying all phones there is jpg
> package for them.
> Google has Limitations in that C2DM about "Google limits the number of
> messages a sender sends in aggregate". Also possible lagging.
>

Is some lagging or some delay in the delivery of these messages
completely unacceptable?
What is so urgent about these messages that they *must* be received
instantaneously?
And regardless, there will always be some delay or lagging due to users's
network restrictions.


> My initial naive thought was that all those 200 phones could have an app
> installed that make a connection to me PC server and keep that connection
> alive.
>

There's really no such thing as "keeping a connection alive". Your process
can and will be killed at some point, if not by the system then explicitly
by the user.


> I'm searching for a best way to do do this. What would you do?
>

I would rethink what you're trying to accomplish and try to work within the
restrictions imposed by mobile devices.

Perhaps give the user a "poll interval" or an option for manually refreshing
the data, if it makes sense for your app.


> - Services are bad design and a user might think his battery get drained
> - Activity with AsyncTask is beautiful if android not killing the app Hmmm
> (not sure there).
> One AsyncTask constantely listening for incoming and another AsyncTask gets
> created when user send jpg. Can an AsyncTask live that long, Is it possible
> to protect the AsyncTask from onCreate updates, orientationchanges?
>

You can certainly keep your AsyncTask alive between orientation changes -
but only as long as the user keeps your app in focus as the current
Activity. Once you get put in the background you're subject to being killed.

-
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: Fm Radio

2010-12-18 Thread Mark Murphy
On Sat, Dec 18, 2010 at 4:13 PM, wolf  wrote:
> thanks again mr bob, and how i can to view the code from FM Radio app?

I am not aware of any "FM Radio" apps for Android that are open source.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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] 3D Figures in Android

2010-12-18 Thread Simon Platten
Search for min3D excellent java class library with examples for OpenGL ES.
Check out My MRU (Motion Reference Unit) Created using it.

Regards,Sy

On 18 Dec 2010 20:56, "harishsyndrome"  wrote:

Hello All

Am a android new bie, but am good in java. My immediate requirement is
to draw 3D figures, like 3D Cube, 3D rectangle.

Some light will be worshiped!


Thanks
&yndie



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

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

[android-developers] start a new activity and then... come back to the old one!

2010-12-18 Thread Utumno
Hello Android gurus,

I would like to do the following:  in my app's 'Help' area, have a
button that launches the default email application and lets users drop
me an email.

That seems simple huh? Let's just create a new Activity ( code
shamelessly stolen from http://www.androidsnippets.org/snippets/29/index.html
) this way:

final Intent emailIntent = new
Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]
{"t...@email.com"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
"Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text");
context.startActivity(Intent.createChooser(emailIntent, "Send
mail..."));

now, that *almost* works. Almost, because there are two problems with
it:

1) when user exits the mail application ( either by actually sending
the email or simply by pressing the 'BACK' button ) then he gets
kicked out of my app entirely ( back to the main screen, while it
should go back to my app! )

2) when having the email application on top, user presses the 'HOME'
button, the Android correctly comes back to the main screen. However,
when I now re-launch my app, user lands in the mail application again,
which is confusing. I would like him to get back to my app's main
activity.

Adding the following line

emailIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);

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


Re: [android-developers] The only way to make my app compatible is...

2010-12-18 Thread Mark Murphy
On Fri, Dec 17, 2010 at 7:43 PM, Sandia_Man  wrote:
> The only way to make my app compatible with all the phones in market
> that supports different screen resolutions is to make diferent UI for
> each "skin" of the AVD??

Or, design layouts that adapt well to different screen sizes, and
supply appropriate drawable resources for screen densities.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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: Fm Radio

2010-12-18 Thread wolf
thanks again mr bob, and how i can to view the code from FM Radio app?
i wish you good luck from everything you do!

On Dec 17, 5:06 pm, Bob Kerns  wrote:
> By the way, I got my build with the FM Radio app here:
>
> http://tinyurl.com/modoco-kitchen-with-fm
> (that's a shortened link to android.modoco.com).
>
> On Dec 17, 1:26 am, wolf  wrote:> thank you mr bob
>
> > On Dec 16, 1:58 pm, Bob Kerns  wrote:
>
> > > Well, I doubt HTC is going to tell you, so your best approach, I
> > > think, would either to see what the people who integrated it on to
> > > Nexus One did, or to reverse engineer the com.htc.fm app yourself.
>
> > > I suspect that's more trouble than it's worth, as the result won't be
> > > something that's supported, and will only work on a limited number of
> > > devices.
>
> > > On Dec 16, 12:59 am, wolf  wrote:> thanks mr brill, 
> > > you are closer than the other answer, i want to know
> > > > how the FM Radio app is work, the code, not how to use it in my
> > > > programs.
>
> > > > On Dec 15, 3:07 pm, Bob Kerns  wrote:

-- 
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 2.x Documentation is printable / pdf format ...

2010-12-18 Thread Mark Murphy
On Sat, Dec 18, 2010 at 2:26 AM, Arsalan  wrote:
> Anyone know where I could get the latest documentation in a printable/
> pdf format.

I am not aware of anyone offering this.

If anyone with Java doclet experience reads this, drop me a line.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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] Options for Loading app apk

2010-12-18 Thread Mark Murphy
On Fri, Dec 17, 2010 at 7:07 PM, AndroidDevTime
 wrote:
>  This starts loading of application apkFileName
>
> Intent intent = new Intent(Intent.ACTION_VIEW);
>            intent.setDataAndType(Uri.fromFile(new File(apkFileName)),
> "application/vnd.android.package-archive");
>                       ctx.startActivity(intent);
>
> It also auto starts the Activity for loading app loading which goes
> outside my admin app.
>
> What other options are there for loading an application.  I would
> rather not go thru this page every time?

If you are looking to install the application, there are no other
options available to SDK applications. If you have some other
definition of "loading an application", please explain further what
you are seeking.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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 to search inbox messages

2010-12-18 Thread Mark Murphy
On Fri, Dec 17, 2010 at 6:42 AM, Jaya  wrote:
> Can some one tell me how to search the inbox sms messages for a
> particular format and display the messages.

An SMS "inbox" is not part of the operating system, but rather is part
of each and every SMS client. You are welcome to contact the authors
of SMS clients and ask them how to do it with their product. The
Messenger application that is part of the Android open source project
does not have a documented and supported API for this.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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] Why my queries are not publishing on this group :(.

2010-12-18 Thread Mark Murphy
On Sat, Dec 18, 2010 at 9:23 AM, Zainu  wrote:
> Why my queries are not publishing on this group

Because this group is moderated, and you were in the moderation queue.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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] Math Display, Data efficiency, why no pre-populated db in apk?

2010-12-18 Thread Mark Murphy
On Thu, Dec 16, 2010 at 5:11 PM, MereMortal  wrote:
> 1) Displaying math notations: There seems to be no support for
> displaying math equations. How can we handle this? Generating an image
> on server and sending it to the app seems like a hammer for a fly? I
> tried adding  which shows superscripts but we cannot use
> &radic for square roots. Any insights are deeply appreciated.

Try getting the MathML->PNG code from http://jeuclid.sourceforge.net/ to work.

> 2) What is the most efficient way to handle relational data? The
> dictionary example puts stuff in a text file and populates it in
> sqllite db at runtime, this seems very counter intutive, what is the
> reason for that and why can't we copy the DB and store it as some
> example on the web suggest? What are the performance implications?

You can "copy the DB and store it as some example on the web suggest".
Store it as an asset or raw resource and copy it to the filesystem on
first run.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
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 disappeared from Market Home

2010-12-18 Thread Chister Nordvik
Be careful updating now, I just tried and the following happened:
- The app disappears
- The category changes to games (if you forget that the console
changes the category to games when you edit...)
- Next time you edit it (by tweaking the URL) you get screenshots and
icons from the first time you published it. I got 1 year old icons.

So I decided that this is not the weekend to update any apps. I know
that Google are updating the market but I really can't understand why
they cannot just make the console unavailable instead of developers
experiencing buggy behavior like this.

-Christer



On Dec 18, 8:02 pm, TreKing  wrote:
> On Sat, Dec 18, 2010 at 11:32 AM, Ilya Shinkarenko wrote:
>
> > Does anybody have an idea what has happened?
>
> You published on the Android Market.
>
> No, seriously, the Developer Console is extremely buggy. Particularly when
> they make changes they break A LOT. A there have been quite a few changes
> going on recently. So ... wait it out. Maybe trying clearing your browser
> cache or try a different browser altogether.
>
> --- 
> --
> 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] Bitmap.createBitmap vs. Decodestream alpha performance

2010-12-18 Thread olivier
Hi,

I'm loading transparent PNGs into bitmaps using two different methods.
The first being BitmapFactory.decodeStream() of a resource stream. The
second being Bitmap.createBitmap(), populated by a Bitmap.setPixels()
call.

When drawn on a canvas, the bitmaps loaded by decodeStream() perform
significantly better. At first I thought the difference might be due
to using a createBitmap() overload that returns a mutable bitmap, but
changing it to return an immutable bitmap did not cover the difference
in performance.
Calling getConfig() on the bitmaps returned by decodeStream() returns
null, could the bitmap have been converted to an ARGB1555 or similar
format internally? Is it possible to get the same configuration using
createBitmap() with setPixels()?


// Method A ~55FPS
BitmapFactory.Options sBitmapOptions
= new BitmapFactory.Options();
sBitmapOptions.inPreferredConfig = Bitmap.Config.RGB_565;
InputStream is = context.getResources().openRawResource(resource_id);
Bitmap bitmap = BitmapFactory.decodeStream(is, null, sBitmapOptions);

// Method B ~45FPS
Bitmap bitmap = Bitmap.createBitmap(width, height,
Bitmap.Config.ARGB_);
int length = (width*height);
int[] arrColor = new int[length];
// fill arrColor
bitmap.setPixels(arrColor, 0, width, 0, 0, width, height);

Thanks

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


Re: [android-developers] Re: Determining in advance how much text will fit into a given TextView?

2010-12-18 Thread emaildevbr.str...@gmail.com


Connected by MOTOBLUR™

-Original message-
From: HippoMan 
To: Android Developers 
Sent: Fri, Dec 17, 2010 23:34:05 GMT+00:00
Subject: [android-developers] Re: Determining in advance how much text will fit 
into a given TextView?

Yes, but I can only apply this math if I know how the text will be
word-wrapped. This means that I have to word-wrap it myself and then
do the calculations.

The problem with this is that I may not wrap the text the same way
that the TextView (or other subsidiary object) wraps it.

I'm sure I can dig through the source code to find the algorithm that
the appropriate Android object uses to perform the word wrapping.
However, there is no guarantee that this is the same algorithm that
will be used in other Android versions. Therefore, my code might break
when run in the future.

For that matter, future versions of Android might also manage spacing
and fonts differently than today's version.

This is why I was hoping for a way to query Android objects,
themselves, to find out exactly how much text will fit into the
visible area of the View. If this info were returned via method calls,
it would be a lot less likely that future versions of these methods
would fail to provide the correct data for the given Android version.

But I guess I'm just SOL about this. It's too bad that Google didn't
see fit to encapsulate the functionality that I'm looking for. I
couldn't possibly be the only person who would need it.

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

-- 
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] 3D Figures in Android

2010-12-18 Thread harishsyndrome
Hello All

Am a android new bie, but am good in java. My immediate requirement is
to draw 3D figures, like 3D Cube, 3D rectangle.

Some light will be worshiped!


Thanks
&yndie



-- 
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] EditText inside ListView

2010-12-18 Thread Andy Savage
I've found a plethora of older unanswered questions about this, so I'm
adding one more in the hope that someone has now found a solution.

I have an EditText inside a ListView (Specifically its in a custom
Preference inside a PreferenceScreen, but a simple ListView is enough
to replicate it). When the EditText is touched, the software keyboard
is popped up and the EditText "loses focus". You can retouch the
EditText and try to type, but when the predictive text suggests a word
it again "loses focus" and empties itself.

Upon inspection the EditText's parent view is being recreated, which
explains the losing focus and content. Digging a little deeper
Preference's getView(View convertView, ViewGroup parent) is being
called with a blank convertView, rebuilding the entire view rather
than reusing the existing one. I don't know if that's the right place
to be looking, or if that is normal for a ListView child. The view is
also recreated as the user scrolls (which makes scrolling somewhat
slower, but that's another issue).

I don't really know where to go from here. A PreferenceScreen expects
a ListView so I can't just change the view to LinearLayout or
something. I also don't really want to give up the custom EditText
preferences as they fit very well in the context they are being used.

Any ideas on how to stop this issue would be great.

-- 
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 simulate a (missing) DPADt

2010-12-18 Thread emaildevbr.str...@gmail.com


Connected by MOTOBLUR™

-Original message-
From: blindfold 
To: Android Developers 
Sent: Fri, Dec 17, 2010 11:53:12 GMT+00:00
Subject: [android-developers] Re: How to simulate a (missing) DPAD

Thanks Mark. I can easily detect touch events by their coordinates,
but not so easily identify what UI elements lie underneath - unless I
define and layout each of these UI elements graphically myself in
terms of screen coordinates. I think your proposed TalkBackOverlayView
would require that too, if I understand you correctly. My main screen
already uses different touch screen events for gross positions like
center, top middle, left middle, bottom left and bottom right, and
speaks the relevant user actions. Here I did without an exploration
mode, although that should have been easily possible through handling
ACTION_DOWN and ACTION_UP events separately in dispatchTouchEvent().
This very basic level of touch screen use is indeed accessible for
blind persons, as are the keyboard shortcuts that I have defined for
phones with a physical keyboard.

However, at some point one would want to make good use of standard UI
elements (listviews, buttons, radio buttons, checkboxes etc) for which
Android determines the concrete layout instance, and render these
standard elements accessible rather than having to define a range of
dedicated touch views corresponding to each and every activity view
that sighted users would use. I have no ambition to reinvent the
Android layout framework. The iPhone, through VoiceOver, offers a
generic touch screen solution for this as part of the OS. I feel that
any accessibility "hook" for standard UI elements that I add at
application level to my specific Android app should be only an interim
solution and a stop gap until Android catches up and offers a
similarly general accessibility solution as part of the OS. Otherwise,
blind users will in the future at best have a few accessible point
solutions, but no general accessibility with phones that lack a
physical keyboard and/or d-pad.

Now while trying to bridge the current accessibility limitations for d-
pad-less Android phones, apparently even a simple key remapping is not
that, erm... simple, with the current set of event Listeners and
onWhatevers(). :-(


On Dec 17, 11:37 am, Mark Murphy  wrote:
> On Fri, Dec 17, 2010 at 4:31 AM, blindfold  wrote:
> > This currently requires physical keys, because
> > Android still lacks the kind of touch event model of the iPhone where
> > (blind) users can explore the screen by touch and hear GUI elements
> > spoken without immediately activating whatever elements they are
> > touching or sliding over.
>
> If this is your own app, I would think you could do this on your own.
> Have a "blind mode" that puts a TalkBackOverlayView on top of the
> regular UI. TalkBackOverlayView would use the same techniques as
> GestureOverlayView to detect touch events and selectively pass them
> through. In particular, in an "exploration" mode, it would behave as
> you describe -- when the screen is touched, find out the widget
> underneath it at those pixel coordinates, and announce what it is.
>
> Offering this for other apps would require firmware mods, of course.
>
> And, of course, I haven't tried this, nor have I looked at the
> GestureOverlayView code to see how tough it would be to implement.
> It's just an idea that popped to mind while reading your post.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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] ADB Failed - Dalvik Debug Monitor

2010-12-18 Thread alexus
Hi all,
I'm trying to start dalvik monitor so I can take screenshots of my app
but im getting an errror :(
I'm running Win 7 64bit (SDK installed through installer and paired
with 32bit jdk)

Error im getting is this:

03:24:39 E/adb: Failed to get the adb version: Cannot run program
"adb": CreateP
rocess error=2, The system cannot find the file specified


Any one can help me out here?
Thank you!

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


[android-developers] Extract a bit code from a image

2010-12-18 Thread denper
Hi, I'm working in a project to reconize a bit code from a image like
this, where black rectangle rappresents 0 bit, and white (white space,
not visible) 1 bit.



Somebody have any idea to process the image in order to extract this
informations? Thanks in avance. Denis.

-- 
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] switch camera to video error

2010-12-18 Thread kong
when I click ox or swtich camera to video ,there is error.

Can anyone 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] Re: New maps app features and mapview

2010-12-18 Thread Igor Korobka
I've solved the issue with small labels on the google maps on hdpi screens.

You need a bit of reflection (see the snippet of smali code below): 

class com.google.googlenav.map.MapTile {

.field public static final TEXT_SIZE_DESKTOP:B = 0x0t
.field public static final TEXT_SIZE_LARGE:B = 0x3t
.field public static final TEXT_SIZE_MEDIUM:B = 0x2t
.field public static final TEXT_SIZE_SMALL:B = 0x1t

.field static textSize:I
}

Setting static field textSize to constant value  TEXT_SIZE_LARGE at the end 
of onCreate method makes a miracle - labels on the maps become large enough 
to read easily.
Note: you need to clean application cache to kill old map tiles.

-- 
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] Options for Loading app apk

2010-12-18 Thread AndroidDevTime
 This starts loading of application apkFileName

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(apkFileName)),
"application/vnd.android.package-archive");
   ctx.startActivity(intent);

It also auto starts the Activity for loading app loading which goes
outside my admin app.

What other options are there for loading an application.  I would
rather not go thru this page every time?

-- 
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 only way to make my app compatible is...

2010-12-18 Thread Sandia_Man
The only way to make my app compatible with all the phones in market
that supports different screen resolutions is to make diferent UI for
each "skin" of the AVD??

And an other question, where can I find examples with code of UI,
because I'm trying to build something nice but I nice some examples to
see how to make it...

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] Re: How to Customize android Os For supporting regional languages

2010-12-18 Thread emaildevbr.str...@gmail.com


Connected by MOTOBLUR™

-- 
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] Hello Localization

2010-12-18 Thread Atassano
Hello>

 I'm learning Android and I see that there is a bugg in the sample
Hello Localization.

There is a reference to differents attributes (R.string.dialog_title,
R.string.dialog_text) from a an object un declared.


Please could you help me, saying to me what is the definition of this
object?

Sincerely


Alfredo

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


[android-developers] Problem adding sensor library for new device

2010-12-18 Thread db
Hi folks,

I have written a sensor library to support a new device I am working on. I 
have written a very simple application to get a reference to the 
SensorManager, register a listener, and get updates on changes. However my 
app never gets any updates, and upon debugging I found that the 
SensorManager thread was never getting started. It turns out that this is 
because SensorManager.SensorThread,startLocked() fails to get a data channel 
to the SensorService (service,getDataChannel()) throws a read exception.

So my question is: does anyone who is familiar with the internals of android 
know why this might be happening? Is there something that I might need to 
configured in android for my target device so that RPC works correctly? Any 
suggestions about what else to look for to get clues about what may be 
happening?

Thanks!
--
Regards, Devin

-- 
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 most amazing space photographs in the universe.

2010-12-18 Thread am biga
The most amazing space photographs in the universe.


The Sombrero Galaxy - 28 million light years from Earth - was voted
best picture taken ...


http://space-photos.notlong.com

http://photoday.notlong.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] Android 2.x Documentation is printable / pdf format ...

2010-12-18 Thread Arsalan
Hi,

Anyone know where I could get the latest documentation in a printable/
pdf format.

Thanks

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


Re: [android-developers] Re: Data is not displaying in lin

2010-12-18 Thread emaildevbr.str...@gmail.com


Connected by MOTOBLUR™

-Original message-
From: TreKing 
To: android-developers@googlegroups.com
Sent: Sat, Dec 18, 2010 05:53:18 GMT+00:00
Subject: Re: [android-developers] Re: Data is not displaying in line

On Fri, Dec 17, 2010 at 11:41 PM, pramod.deore wrote:

> myAdapter = new SimpleCursorAdapter(this, R.layout.schedule, c,
> columns,names);
>

OK, that explains it. I think what's happening is each entry in your list is
being created using the table layout you defined. So basically you have a
list of tables, not a single table with rows, and they're all independent
and won't line up.

Honestly not sure if this would work with an adapter as you have it.

An alternative would be to just create a TableLayout and add each row into
it dynamically from the data in your cursor.

Or wait for someone who knows more about CursorAdapters and Tables to help
you out :-)

-
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

-- 
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] Standalone product using Android

2010-12-18 Thread A K S
Friends,

I wanted to develop a product which will run only my application. The
product will not be kind of mobile. That will help certain group of
people to use. The product will have nothing to connect to emails,
chat or other mobile features.

So can I do that with use of Android? If so, what should be the
requirements for the product hardware?

Or does this Android comes only for mobile & Pads?

Help me pls.


Regards,

AKS

-- 
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] Determining in advance how much text will fit into a given TextView?

2010-12-18 Thread g
i no fix the prob. androids

On Tue, Dec 14, 2010 at 5:43 AM, HippoMan  wrote:

> In a different thread, I asked if there was a way to query some object
> to define what subset of a long piece of text is actually being shown
> within a given TextView.
>
> Based on the scant feedback I received in response to this query, I
> have come to the conclusion that android probably does not provide any
> programmatic way to ask a TextView or one of its subsidary objects
> what subset of text is actually being displayed in the visible area of
> this view.
>
> So now, I'd like to approach this problem from a different direction:
>
> If I have a large piece of text (where "large" means that there is
> more text that can fit into the visible portion of a given TextView),
> how can I determine *in advance* which subset of the text will fit
> into the current visible screen area?
>
> I know that I can calculate this by taking the text view dimensions,
> its border and spacing characteristics, its font size, and other info
> into account. I also have to figure out how the text will be word-
> wrapped when writing it into the TextView.
>
> Of course, this can all be calculated, but I'm wondering if there
> already is a pre-existing method I can call (or a small number of pre-
> existing methods) which can tell me how much of a given piece of text
> will actually fit into the view?
>
> I do not want to reverse engineer existing android objects and "re-
> invent the wheel" if there already is a straightforward way to get
> this information from existing objects.
>
> Thanks in advance for any pointers you could give 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

-- 
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] Why my queries are not publishing on this group :(.

2010-12-18 Thread Zainu
Why my queries are not publishing on this group

-- 
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] google analytics jar and notifying my app users

2010-12-18 Thread David Liebman
Hi,

I have a game app that I'm working on. I've already published a
version on Android Market. I've heard about the google analytics jar
from the following sites.

http://android-developers.blogspot.com/2010/12/analytics-for-android-apps.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FhsDu+%28Android+Developers+Blog%29

http://code.google.com/mobile/analytics/docs/android/

I have installed the jar as a library in my app on eclipse, and now I
need some advice before I put another version of the app on the
android market. On the google code site it's stated that:

"You must indicate to your users, either in the application itself or
in your terms of service, that you reserve the right to anonymously
track and report a user's activity inside of your app. Your use of the
Google Analytics SDK is additionally governed by the Google Analytics
Terms of Service, which you must agree to when signing up for an
account."

How should I go about notifying my users that I'm making a change to
the app that involves tracking usage with Google Analytics? I already
have a Google Analytics account, and so I believe I have already
agreed to the 'Terms of Service".

So the question is, how do I notify my users that I'm using Google
Analytics?

Thanks

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


[android-developers] Android bluetooth api connect to multiple devices at the same time

2010-12-18 Thread 苗鹏
It is possible to connect simultaneously to multiple bluetooth 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: ListView Selected

2010-12-18 Thread emaildevbr.str...@gmail.com


Connected by MOTOBLUR™

-Original message-
From: David Toledo 
To: android-developers@googlegroups.com
Sent: Fri, Dec 17, 2010 21:21:19 GMT+00:00
Subject: [android-developers] Re: ListView Selected

The answers is the following :)

   lv1.setOnItemClickListener(new ListView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView a, View v, int i, long l) {
try {
lv1.requestFocusFromTouch();
lv1.setSelection(i);
lv1.getSelectedView().setSelected(true);
}
catch(Exception e) {
System.out.println("Nay, cannot get the selected index");
}
}
});

2010/12/17 David Toledo 

> Hi All
>
> How to can stay HIGHLIGHTED the row selected in my ListView
>
> Thanks
> David
>

-- 
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: Datag is not displaying in lin

2010-12-18 Thread emaildevbr.str...@gmail.com
9R

Connected by MOTOBLUR™n

-Original message-
From: "emaildevbr.str...@gmail.com" 
To: android-developers@googlegroups.com
Sent: Sat, Dec 18, 2010 15:14:29 GMT+00:00
Subject: Re: [android-developers] Re: Data is not displaying in lin



Connected by MOTOBLUR™

-Original message-
From: TreKing 
To: android-developers@googlegroups.com
Sent: Sat, Dec 18, 2010 05:53:18 GMT+00:00
Subject: Re: [android-developers] Re: Data is not displaying in line

On Fri, Dec 17, 2010 at 11:41 PM, pramod.deore wrote:

> myAdapter = new SimpleCursorAdapter(this, R.layout.schedule, c,
> columns,names);
>

OK, that explains it. I think what's happening is each entry in your list is
being created using the table layout you defined. So basically you have a
list of tables, not a single table with rows, and they're all independent
and won't line up.

Honestly not sure if this would work with an adapter as you have it.

An alternative would be to just create a TableLayout and add each row into
it dynamically from the data in your cursor.

Or wait for someone who knows more about CursorAdapters and Tables to help
you out :-)

-
TreKing  - Chicago
transit tracking

-- 
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] Simulate call on real device

2010-12-18 Thread android10
Hi guys...I was wondering if someone could ever simulate a call on a
real phone such as Nexus One or other...

I have trying to figure out how to do this...but couldn't..

I will really appreciate your help...

Thanks in advance..

Regards

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


  1   2   >