Re: [android-developers] Re: Eclipse/ADT not rebuilding correctly

2011-05-10 Thread Xavier Ducrohet
interesting. I've been playing with Eclipse 3.6.2 recently and saw
this quite a bit, but I never see it with Eclipse 3.5.2 which is my
main development version.
I'll do more testing after IO to see what's up.

Xav

On Sat, May 7, 2011 at 2:52 PM, Kamil kmichal...@gmail.com wrote:
 I've noticed this issue not working with Android SDK but with J2EE
 project. In my case turning off autobuild option and cleaning whole
 project fixed problem. After this few steps automatic build can be
 switched to on again. I think this is IDE bug, so it should be
 reported to eclipse developers.

 On 7 Maj, 19:45, snpe snp...@gmail.com wrote:
 Can anybody reproduce this issue on Linux ?

 On May 5, 4:59 pm, Jake Basile jakerbas...@gmail.com wrote:

  This problem has not gone away, and is getting worse. I need to fully
  restart eclipse so often now to get it to use my new code that I do it 
  about
  15 times a day.

  Incredibly frustrating, and a waste of my 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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. 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] setTypeface

2011-05-10 Thread Sakthivel A M
Hi Subha,

  Can u help me how to search Employee details by typing employee name. Try
to send Code.

Thank u

On Mon, May 9, 2011 at 3:27 PM, subhashini alaguchokku 
subhashini.andr...@gmail.com wrote:

 Hi!

 how to implement the following concept


 Typeface tf=Typeface.createFromAsset(getAssets(), maduram.ttf);
 tv.setTypeface(tf);




 Here.



   public View getView(int position, View convertView, ViewGroup parent) {
 View vi=convertView;
 ViewHolder holder;
 if(convertView==null){
 System.out.println(inside
 null);
 vi = inflater.inflate(R.layout.item, null);
 holder=new ViewHolder();
 holder.text=(TextView)vi.findViewById(R.id.text);
 holder.text1=(TextView)vi.findViewById(R.id.text1);
 //Typeface typeface =
 Typeface.createFromAsset(myContext.getAssets(), FONT.TTF);

 holder.image=(ImageView)vi.findViewById(R.id.image);
 vi.setTag(holder);

 }
 else
 holder=(ViewHolder)vi.getTag();

 holder.text.setText(Listdisplay.name[position]);
 holder.text1.setText(Listdisplay.count[position]);

 holder.image.setTag(data[position]);
 System.out.println(inside not
 null...);
 imageLoader.DisplayImage(data[position], activity, holder.image);
 return vi;
 }
 }

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: Eclipse/ADT not rebuilding correctly

2011-05-10 Thread Zsolt Vasvari
Yes, please fix this.  This is very large productivity hindrence.
Every time I add/remove a resource, I need to Clean and Rebuild
twice.  It always fails the first time around with an ! showing next
to the project name.



On May 10, 2:07 pm, Xavier Ducrohet x...@android.com wrote:
 interesting. I've been playing with Eclipse 3.6.2 recently and saw
 this quite a bit, but I never see it with Eclipse 3.5.2 which is my
 main development version.
 I'll do more testing after IO to see what's up.

 Xav





 On Sat, May 7, 2011 at 2:52 PM, Kamil kmichal...@gmail.com wrote:
  I've noticed this issue not working with Android SDK but with J2EE
  project. In my case turning off autobuild option and cleaning whole
  project fixed problem. After this few steps automatic build can be
  switched to on again. I think this is IDE bug, so it should be
  reported to eclipse developers.

  On 7 Maj, 19:45, snpe snp...@gmail.com wrote:
  Can anybody reproduce this issue on Linux ?

  On May 5, 4:59 pm, Jake Basile jakerbas...@gmail.com wrote:

   This problem has not gone away, and is getting worse. I need to fully
   restart eclipse so often now to get it to use my new code that I do it 
   about
   15 times a day.

   Incredibly frustrating, and a waste of my 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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. Thanks!- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: where to put files to be read by jni native code

2011-05-10 Thread Droid
This works for a file on the SDCard:
#include string.h
#include jni.h
#include stdio.h
/* This is a trivial JNI example where we use a native method
 * to return a new VM String. See the corresponding Java source
 * file located at:
 *
 *   apps/samples/hello-jni/project/src/com/example/HelloJni/
HelloJni.java
 */
jstring
Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
  jobject thiz )
{
FILE* file = fopen(/sdcard/hello.txt,w+);

if (file != NULL)
{
fputs(HELLO WORLD!\n, file);
fflush(file);
fclose(file);
}

return (*env)-NewStringUTF(env, Hello from JNI (with file
io)!);
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: emulator too slow

2011-05-10 Thread Droid
You can reduce the screen size of the emulator - from SDK Manager and
launch button.
A small screen size is generally faster all round.

On May 10, 2:34 am, bob b...@coolgroups.com wrote:
 Is there any way to make the emulator faster?  It pretty much runs
 slow as molasses on my Macbook.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] hash functions

2011-05-10 Thread Nikolay Elenkov
On Tue, May 10, 2011 at 2:52 PM, pasamblue1 parulcha...@gmail.com wrote:
 I am developing an android application for encryption decryption of
 messages. I need some hash algorithm to generate key from password. I
 am using SHA1 for the same. Not sure if it is good to use it for
 security reasons. Is there any other algorithm to be used as hash
 function.


Search for 'password based encryption'. There are standard algorithms to
derive a key from a password securely. For Java, you might want to use
'PBKDF2WithHmacSHA1' or some equivalent available on Android.

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


[android-developers] Re: hash functions

2011-05-10 Thread gjs
http://developer.android.com/reference/java/security/spec/MGF1ParameterSpec.html

SHA256, 384, 512

http://developer.android.com/reference/java/security/MessageDigest.html

MD5 is weaker than SHA

On May 10, 3:52 pm, pasamblue1 parulcha...@gmail.com wrote:
 I am developing an android application for encryption decryption of
 messages. I need some hash algorithm to generate key from password. I
 am using SHA1 for the same. Not sure if it is good to use it for
 security reasons. Is there any other algorithm to be used as hash
 function.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 - is it possible to limit the fling speed?

2011-05-10 Thread Omar Adobati
than to all the guys who have been replying to me,

So, I have understood I can't limit the speed the fling scroll, but it would
be at least possible to stop the scroll when I do touch the list? As I
wrote, when I do perform a scroll that then come up to be a fling my list
scroll to the top or the bottom (depending by the direction I do the
movement) without having the chance to stop it.

Thanks,

Omar


On Tue, May 10, 2011 at 07:27, Romain Guy romain...@android.com wrote:

 This API is used by the calendar view in the Calendar application to let
 you scroll more precisely from week to week. It is a very It is true however
 that you should avoid changing the friction in regular lists. Your
 application should behave and feel the same to he user as any other
 application. It makes sense for a calendar view because it does not look
 like a ListView, the ListView is just an implementation detail.


 On Mon, May 9, 2011 at 10:23 PM, Dianne Hackborn hack...@android.comwrote:

 Oh well look at that...  didn't know Romain added that to HC.  Hm.  Not
 sure I'm thrilled about it. :)

 On Mon, May 9, 2011 at 5:12 PM, Jona medicalsou...@gmail.com wrote:

 I haven't tested this but API 11 supports friction. See:

 http://developer.android.com/reference/android/widget/AbsListView.html#setFriction(float)

 Moto

 On May 9, 2:36 pm, Dianne Hackborn hack...@android.com wrote:
  ListView already limits its fling speed; you shouldn't change it to
 behave
  differently than it does everywhere else in the UI.
 
  On Mon, May 9, 2011 at 12:03 PM, Omar Adobati omar.adob...@gmail.com
 wrote:
 
 
 
 
 
   Hi Everyone,
 
   I would like to knoe if I can limit the speed of the fling gestures
 in my
   ListActivity and if it is possible to stop the scrolling of the
 same list
   when I touch it.
 
   My current situation is the following: If I perform a vertical scroll
 that
   trigers the Fling state, sometimes (often actually) my List View
 scrolls
   full speed to the bottom (or to the top) and dose't stop till it
 reaches the
   final position. This is not really user friendly... is there a way to
 limit
   it?
 
   I have already tried with setFastScrollEnabled(false); but it seems
 to
   don't work.
 
   Thanks to everyone who would like to 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
 
  --
  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




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




 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  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

[android-developers] How to Override progress bar message i.e.. 0/100

2011-05-10 Thread Jitesh dedhiya
How to Override progress bar message i.e..* 0/100* to say *0 remaining out
of 100*

-- 
--Jitesh .V. Dedhiya---

Don't Learn To Hack but Hack To Learn

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

[android-developers] Data transfer from WindowManagerService.java to WindowManager.java

2011-05-10 Thread siva prasad
Hi everyone,
I have some required data in WindowManagerService.java file (let me
say , mWindows).  I want to query that data from WindowManager.java
file.
For example :
   I want to have the list of Window Objects in WindowManager.java
file , I can get the list from  WindowManagerService.java file
(mWindows). So I want to add one function in WindowManager.java ,
say   public Window[ ] getWindowObjects ();

Could anyone tell me how can I do this.. I will be waiting for
someone's help.



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] SetTypeface with holder

2011-05-10 Thread subha
Hi!

 public View getView(int position, View convertView, ViewGroup parent) {
View vi=convertView;
ViewHolder holder;

if(convertView==null){
System.out.println(inside
null);
vi = inflater.inflate(R.layout.item, null);
holder=new ViewHolder();
holder.text=(TextView)vi.findViewById(R.id.text);
holder.text1=(TextView)vi.findViewById(R.id.text1);
   Typeface tf = holder.text1.getTypeface();
holder.text1.setTypeface(tf);
holder.image=(ImageView)vi.findViewById(R.id.image);
vi.setTag(holder);


}
else
holder=(ViewHolder)vi.getTag();

holder.text.setText(Listdisplay.name[position]);
holder.text1.setText(Listdisplay.count[position]);

holder.image.setTag(data[position]);
System.out.println(inside not
null...);
imageLoader.DisplayImage(data[position], activity, holder.image);
return vi;
}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Data transfer from WindowManagerService.java to WindowManager.java

2011-05-10 Thread Dianne Hackborn
You can't do that -- WindowManagerService has an array of WindowState
objects, which only inside its process.  A Window object only exists inside
of the process of that window, and the window manager services knows nothing
about it.  Further, there is no direct association between a window in the
window manager and a Window object, in fact not every window has a Window
object.

Please direct further questions to android-platform or android-porting, I
won't respond any more since this is not about developing applications
against the SDK.

On Tue, May 10, 2011 at 12:17 AM, siva prasad siva4...@gmail.com wrote:

 Hi everyone,
 I have some required data in WindowManagerService.java file (let me
 say , mWindows).  I want to query that data from WindowManager.java
 file.
 For example :
   I want to have the list of Window Objects in WindowManager.java
 file , I can get the list from  WindowManagerService.java file
 (mWindows). So I want to add one function in WindowManager.java ,
 say   public Window[ ] getWindowObjects ();

 Could anyone tell me how can I do this.. I will be waiting for
 someone's help.



 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




-- 
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: ListView - is it possible to limit the fling speed?

2011-05-10 Thread Dianne Hackborn
When the user presses on the screen during a fling it stops the screen.
 This is how list view and other scrolling containers have always working in
Android since 1.0.

On Tue, May 10, 2011 at 12:07 AM, Omar Adobati omar.adob...@gmail.comwrote:

 than to all the guys who have been replying to me,

 So, I have understood I can't limit the speed the fling scroll, but it
 would be at least possible to stop the scroll when I do touch the list? As I
 wrote, when I do perform a scroll that then come up to be a fling my list
 scroll to the top or the bottom (depending by the direction I do the
 movement) without having the chance to stop it.

 Thanks,

 Omar


 On Tue, May 10, 2011 at 07:27, Romain Guy romain...@android.com wrote:

 This API is used by the calendar view in the Calendar application to let
 you scroll more precisely from week to week. It is a very It is true however
 that you should avoid changing the friction in regular lists. Your
 application should behave and feel the same to he user as any other
 application. It makes sense for a calendar view because it does not look
 like a ListView, the ListView is just an implementation detail.


 On Mon, May 9, 2011 at 10:23 PM, Dianne Hackborn hack...@android.comwrote:

 Oh well look at that...  didn't know Romain added that to HC.  Hm.  Not
 sure I'm thrilled about it. :)

 On Mon, May 9, 2011 at 5:12 PM, Jona medicalsou...@gmail.com wrote:

 I haven't tested this but API 11 supports friction. See:

 http://developer.android.com/reference/android/widget/AbsListView.html#setFriction(float)

 Moto

 On May 9, 2:36 pm, Dianne Hackborn hack...@android.com wrote:
  ListView already limits its fling speed; you shouldn't change it to
 behave
  differently than it does everywhere else in the UI.
 
  On Mon, May 9, 2011 at 12:03 PM, Omar Adobati omar.adob...@gmail.com
 wrote:
 
 
 
 
 
   Hi Everyone,
 
   I would like to knoe if I can limit the speed of the fling gestures
 in my
   ListActivity and if it is possible to stop the scrolling of the
 same list
   when I touch it.
 
   My current situation is the following: If I perform a vertical
 scroll that
   trigers the Fling state, sometimes (often actually) my List View
 scrolls
   full speed to the bottom (or to the top) and dose't stop till it
 reaches the
   final position. This is not really user friendly... is there a way
 to limit
   it?
 
   I have already tried with setFastScrollEnabled(false); but it seems
 to
   don't work.
 
   Thanks to everyone who would like to 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
 
  --
  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




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




 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  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 

Re: [android-developers] Re: ListView - is it possible to limit the fling speed?

2011-05-10 Thread Omar Adobati
Hi Thanks for your reply...

...but mine dosen't what can I have done to prevent it?
I mean, for what reason mine keeps scrolling?


*Omar Adobati | omar.adob...@gmail.com | @0m4r http://www.twitter.com/0m4r
*


On Tue, May 10, 2011 at 09:46, Dianne Hackborn hack...@android.com wrote:

 When the user presses on the screen during a fling it stops the screen.
  This is how list view and other scrolling containers have always working in
 Android since 1.0.

 On Tue, May 10, 2011 at 12:07 AM, Omar Adobati omar.adob...@gmail.comwrote:

 than to all the guys who have been replying to me,

 So, I have understood I can't limit the speed the fling scroll, but it
 would be at least possible to stop the scroll when I do touch the list? As I
 wrote, when I do perform a scroll that then come up to be a fling my list
 scroll to the top or the bottom (depending by the direction I do the
 movement) without having the chance to stop it.

 Thanks,

 Omar


 On Tue, May 10, 2011 at 07:27, Romain Guy romain...@android.com wrote:

 This API is used by the calendar view in the Calendar application to let
 you scroll more precisely from week to week. It is a very It is true however
 that you should avoid changing the friction in regular lists. Your
 application should behave and feel the same to he user as any other
 application. It makes sense for a calendar view because it does not look
 like a ListView, the ListView is just an implementation detail.


 On Mon, May 9, 2011 at 10:23 PM, Dianne Hackborn hack...@android.comwrote:

 Oh well look at that...  didn't know Romain added that to HC.  Hm.  Not
 sure I'm thrilled about it. :)

 On Mon, May 9, 2011 at 5:12 PM, Jona medicalsou...@gmail.com wrote:

 I haven't tested this but API 11 supports friction. See:

 http://developer.android.com/reference/android/widget/AbsListView.html#setFriction(float)

 Moto

 On May 9, 2:36 pm, Dianne Hackborn hack...@android.com wrote:
  ListView already limits its fling speed; you shouldn't change it to
 behave
  differently than it does everywhere else in the UI.
 
  On Mon, May 9, 2011 at 12:03 PM, Omar Adobati 
 omar.adob...@gmail.comwrote:
 
 
 
 
 
   Hi Everyone,
 
   I would like to knoe if I can limit the speed of the fling gestures
 in my
   ListActivity and if it is possible to stop the scrolling of the
 same list
   when I touch it.
 
   My current situation is the following: If I perform a vertical
 scroll that
   trigers the Fling state, sometimes (often actually) my List View
 scrolls
   full speed to the bottom (or to the top) and dose't stop till it
 reaches the
   final position. This is not really user friendly... is there a way
 to limit
   it?
 
   I have already tried with setFastScrollEnabled(false); but it seems
 to
   don't work.
 
   Thanks to everyone who would like to 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
 
  --
  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




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




 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  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 

Re: [android-developers] Re: hash functions

2011-05-10 Thread Nikolay Elenkov
On Tue, May 10, 2011 at 3:59 PM, gjs garyjamessi...@gmail.com wrote:
 http://developer.android.com/reference/java/security/spec/MGF1ParameterSpec.html

 SHA256, 384, 512

What does the mask generation function has to do with this?
Don't just paste random links.


 http://developer.android.com/reference/java/security/MessageDigest.html

 MD5 is weaker than SHA


Qualify 'weaker'. See above.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] what these logs specify

2011-05-10 Thread chetan
Hi,
  Can anybody help me to understand the below logs.

05-10 11:02:23.560   436   436 I am_on_paused_called:
com.android.phone.InCallScreen
05-10 11:02:23.560   180   498 I am_failed_to_pause:
[1078345632,com.android.phone/.InCallScreen,(none)]
05-10 11:02:23.600   436   436 I phone_ui_enter: []
05-10 11:02:23.600   436   436 I am_on_resume_called:
com.android.phone.InCallScreen
05-10 11:02:23.680   436   444 I dvm_gc_info:
[8099846449757488679,-9041955949517117391,-3993703548519360479,8640562]
05-10 11:02:23.710   593   593 I binder_sample:
[android.view.IWindowSession,4,54,com.sec.android.app.twlauncher,10]
05-10 11:02:23.770   180   355 I activity_launch_time:
[1078345632,com.android.phone/.InCallScreen,1714,1714]

Thanks
Chetan Chauhan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Not finding proxy and port values in the settings.db (Gingerbread)

2011-05-10 Thread Ashok Jeevan
Hi All,

I was trying to add the proxy and the port from the APN settings. After
pulling the settings.db, I found that the proxy:port values had not been
inserted in the 'secure' or 'system' table.

I looked in the above two tables since a lot of web queries showed the query
to insert the values into the mentioned tables.

On probing the source of Gingerbread, I found out that the values are being
stored in the com.android.providers.telephony/telephony.db

Is this a change in the Gingerbread or am I getting my research wrong?

Ashok Jeevan

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

Re: [android-developers] what these logs specify

2011-05-10 Thread Magghu India
Dear Chetan,

Could you more specific, like from where did you get data. It will help in
analysys.

Regards,
Mani
For Technical Help visit at
http://www.magghu.com


On Tue, May 10, 2011 at 1:23 PM, chetan chetanchauha...@gmail.com wrote:

 Hi,
  Can anybody help me to understand the below logs.

 05-10 11:02:23.560   436   436 I am_on_paused_called:
 com.android.phone.InCallScreen
 05-10 11:02:23.560   180   498 I am_failed_to_pause:
 [1078345632,com.android.phone/.InCallScreen,(none)]
 05-10 11:02:23.600   436   436 I phone_ui_enter: []
 05-10 11:02:23.600   436   436 I am_on_resume_called:
 com.android.phone.InCallScreen
 05-10 11:02:23.680   436   444 I dvm_gc_info:
 [8099846449757488679,-9041955949517117391,-3993703548519360479,8640562]
 05-10 11:02:23.710   593   593 I binder_sample:
 [android.view.IWindowSession,4,54,com.sec.android.app.twlauncher,10]
 05-10 11:02:23.770   180   355 I activity_launch_time:
 [1078345632,com.android.phone/.InCallScreen,1714,1714]

 Thanks
 Chetan Chauhan

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




-- 

Regards,

Mani

For Technical Help visit at
http://www.magghu.com

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

[android-developers] Re: Delete all rows from a table throws nullpointer

2011-05-10 Thread Capt Spaghetti
So the basic question remains the same. How do I delete everything in
a table without dropping and
re-creating the table?

Thanks


On May 9, 7:51 am, Mark Murphy mmur...@commonsware.com wrote:
 If the NullPointerException happens directly on that line, then your
 db variable is null.





 On Mon, May 9, 2011 at 7:49 AM, Capt Spaghetti gene_august...@msn.com wrote:
  I have been using the debugger to step through and the error is caused
  by the line:

          db.delete(TempCourses, null, null);

  The error occurs whether I check if there is data in the table or not.
  I guess I could try and
  drop the table everytime I want to clear it but it certainly seems I
  should be able to delete the
  contents.

  I have also tried the following:

        String sql = String.format(DELETE FROM TempCourses WHERE _id 
  0 );
        db.execSQL(sql);

  I get the same NullPointerException error on the line:

       db.execSQL(sql);

  Thanks...

  On May 7, 12:09 pm, Kostya Vasilyev kmans...@gmail.com wrote:
  Assuming that com.oys is your application's package, you have a null
  pointer access somewhere.

  The exact location is just below the lines you posted. You could also
  use the debugger to step through, checking that variables are not null
  before you access them.

  -- Kostya

  07.05.2011 19:42, Capt Spaghetti пишет:

   05-07 15:12:07.201: ERROR/AndroidRuntime(318):
   java.lang.RuntimeException: Unable to start activity
   ComponentInfo{com.oys.gfa.acecapper/
   com.oys.gfa.acecapper.DownSelectCourse}:
   java.lang.NullPointerException

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com

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

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

 Android Training...At Your Office:http://commonsware.com/training- Hide 
 quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: onBackPressed to hide Not destroy activity

2011-05-10 Thread Ali Chousein
I agree with Muhammad. Save your instance state and restore it when
necessary, instead of trying to do something against the framework.

-Ali

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Export contact to vCard

2011-05-10 Thread peleflip
Anyone did something similar using another library or is there another
way to do it?

Thanks

On 7 mayo, 10:44, peleflip jrpele...@gmail.com wrote:
 Hi everyone,

 i'm using the library android-vcard(http://code.google.com/p/android-vcard/) 
 to export data contacts to avCard

 The problem i'm having is that i only suceed exporting name,phone and
 email, but i want to export other fields like website,birthday or
 nickname, can anyone help me?I copy the code relationated to it

 import a_vcard.android.provider.Contacts;
 import a_vcard.android.syncml.pim.vcard.ContactStruct;
 import a_vcard.android.syncml.pim.vcard.VCardComposer;

 public classVcard{
         public VCardComposer mComposer = new VCardComposer();
         public ContactStruct mContact = new ContactStruct();

         public void addData( String mimeType,
                                                         String data1,
                                                         int data2,
                                                         String data3,
                                                         String data4,
                                                         String data5,
                                                         boolean isPrimary){
                 if ( 
 mimeType.equalsIgnoreCase(vnd.android.cursor.item/name) ){
                         mContact.name = data1;
                 }
                 else if ( mimeType.equalsIgnoreCase(vnd.android.cursor.item/
 phone_v2) ){
                         mContact.addPhone(data2, data1, data3, isPrimary);
                 }
                 else if ( mimeType.equalsIgnoreCase(vnd.android.cursor.item/
 email_v2) ){
                         mContact.addContactmethod(Contacts.KIND_EMAIL, data2, 
 data1, data3,
 isPrimary);
                 }
                 else if ( mimeType.equalsIgnoreCase(vnd.android.cursor.item/
 organization) ){

                 }
                 else if ( 
 mimeType.equalsIgnoreCase(vnd.android.cursor.item/im) ){

                 }
                 else if ( mimeType.equalsIgnoreCase(vnd.android.cursor.item/
 nickname) ){

                 }
                 else if ( 
 mimeType.equalsIgnoreCase(vnd.android.cursor.item/note) )
 {

                 }
                 else if ( 
 mimeType.equalsIgnoreCase(vnd.android.cursor.item/postal-
 address_v2) ){

                 }
                 else if ( mimeType.equalsIgnoreCase(vnd.android.cursor.item/
 website) ){
                 }
                 else if ( mimeType.equalsIgnoreCase(vnd.android.cursor.item/
 contact_event) ){

                 }
         }

 }

 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: Delete all rows from a table throws nullpointer

2011-05-10 Thread Kostya Vasilyev

You call

db.delete( table name here, null, null);

If the value of db is null, you will get a NullPointerException, just 
like for any other method invocation on a null object, database or not.


Check to see where you get the value of db from, and fix it so that 
db actually is a valid database object.


-- Kostya

10.05.2011 12:24, Capt Spaghetti пишет:

So the basic question remains the same. How do I delete everything in
a table without dropping and
re-creating the table?

Thanks



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Re: Export contact to vCard

2011-05-10 Thread Kostya Vasilyev

Have you looked at the vCard format specs?

http://en.wikipedia.org/wiki/VCard

http://tools.ietf.org/html/draft-ietf-vcarddav-vcardrev-19

Even if the library you're using doesn't directly support the items you 
wish to export, with those specs and examples it should be pretty easy 
to implement.


-- Kostya

10.05.2011 13:01, peleflip пишет:

Anyone did something similar using another library or is there another
way to do it?

Thanks



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: Eclipse/ADT not rebuilding correctly

2011-05-10 Thread snpe
It's possible that ApkBuilder locks *.apk file when a exception
occurs. ApKBuilder work a lot operation with apk file without closing
them when a exception happen.
The problem disappear when user refresh (unlock) the file or restart
OS.
Restarting is obligate on Windows because Linux/Mac don't lock file.

To test it on Windows, you can try remove *apk file using OS command
(or using Eclipse Navigator view) when a problem occurs.
If the file is locked you won't remove it without restarting Eclipse.
On Linux refreshing helps and removing the file will work.

Unfortunately, I can't reproduce the issue on Linux. Maybe, I will be
able do it, if somebody attach a project example and some test case.

Regards,
Peco

On May 10, 8:07 am, Xavier Ducrohet x...@android.com wrote:
 interesting. I've been playing with Eclipse 3.6.2 recently and saw
 this quite a bit, but I never see it with Eclipse 3.5.2 which is my
 main development version.
 I'll do more testing after IO to see what's up.

 Xav









 On Sat, May 7, 2011 at 2:52 PM, Kamil kmichal...@gmail.com wrote:
  I've noticed this issue not working with Android SDK but with J2EE
  project. In my case turning off autobuild option and cleaning whole
  project fixed problem. After this few steps automatic build can be
  switched to on again. I think this is IDE bug, so it should be
  reported to eclipse developers.

  On 7 Maj, 19:45, snpe snp...@gmail.com wrote:
  Can anybody reproduce this issue on Linux ?

  On May 5, 4:59 pm, Jake Basile jakerbas...@gmail.com wrote:

   This problem has not gone away, and is getting worse. I need to fully
   restart eclipse so often now to get it to use my new code that I do it 
   about
   15 times a day.

   Incredibly frustrating, and a waste of my 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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. 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] Not finding proxy and port values in the settings.db (Gingerbread)

2011-05-10 Thread sippy zenma
u did it from file?

On Tue, May 10, 2011 at 1:33 PM, Ashok Jeevan ashokjee...@gmail.com wrote:

 Hi All,

 I was trying to add the proxy and the port from the APN settings. After
 pulling the settings.db, I found that the proxy:port values had not been
 inserted in the 'secure' or 'system' table.

 I looked in the above two tables since a lot of web queries showed the
 query to insert the values into the mentioned tables.

 On probing the source of Gingerbread, I found out that the values are being
 stored in the com.android.providers.telephony/telephony.db

 Is this a change in the Gingerbread or am I getting my research wrong?

 Ashok Jeevan

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: hash functions

2011-05-10 Thread pasamblue1
How about PBKDF2. This one is as per FIPs standard.
Is SHA1 also a standard from FIPs.

On May 10, 12:52 pm, Nikolay Elenkov nikolay.elen...@gmail.com
wrote:
 On Tue, May 10, 2011 at 3:59 PM, gjs garyjamessi...@gmail.com wrote:
 http://developer.android.com/reference/java/security/spec/MGF1Paramet...

  SHA256, 384, 512

 What does the mask generation function has to do with this?
 Don't just paste random links.



 http://developer.android.com/reference/java/security/MessageDigest.html

  MD5 is weaker than SHA

 Qualify 'weaker'. See above.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] NFC testing rig?

2011-05-10 Thread Marcin Orlowski
Hi,

We're going to fight with NFC for the next project and since I saw a few
people with much more knowledge on the subject on that list I'd like to ask
if anyone got any thoughts to share on building testing environment for such
projects. I mostly need Android mobile and some standalone NFC device to
test it all with. I did quick research yesterday yet I failed to find
anything but Nexus S (I do not look for non-Android devices for this phase
of the project, not sure if any exists anyway - I found some announcements
but seem these did not turned into products yet). As for standalone device
some companies seem to offer what I need too, i.e.
http://www.insidesecure.com/eng/Products/NFC-Products so there's a hope :)

Anyway, if anyone who spent some time on the subject and is willing to share
the lesson, I am all ears. Thanks in advance :)


Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] customlistview not getting click events when there is only one item in list?

2011-05-10 Thread Hitendrasinh Gohil
hi,


this code works fine with 1.6 and 2.2  but doesnt work with 2.1 update
when there is only one element in list.
lvTrackData.setOnItemClickListener(new OnItemClickListener()
{
@SuppressWarnings(static-access)
public void onItemClick(AdapterView? arg0, View v, int
position,long id)
{}
 }

is there a bug for 2.2 update?


regards,
hitendrasinh gohil

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Register and UnRegister Broadcast Receiver

2011-05-10 Thread Pandi
Hi,

I am getting  an exception from my application.
From the logcat, found below call flow,
1.OnPause is getting called, here we are doing unregister broadcast
receiver.
2.Then OnResume is getting called, here we are registering event after
200ms in the separate task.
3.Before 200ms, OnPause is getting called and unregister done.
4.Then delayed task is getting to register broadcast event.

In fourth step, am getting below logcat
Activity com.android.camera.VideoCamera has leaked IntentReceiver
com.android.camera.VideoCamera$MyBroadcastReceiver@405da838 that was
originally registered here. Are you missing a call to
unregisterReceiver()?

05-10 09:52:57.649 E/ActivityThread( 9907):
android.app.IntentReceiverLeaked: Activity
com.android.camera.VideoCamera has leaked IntentReceiver
com.android.camera.VideoCamera$MyBroadcastReceiver@405da838 that was
originally registered here. Are you missing a call to
unregisterReceiver()?

After that exception generated
05-10 09:52:57.709 E/AndroidRuntime( 9907): android.view.WindowManager
$BadTokenException: Unable to add window -- token null is not valid;
is your activity running?

05-10 09:52:57.709 E/AndroidRuntime( 9907): at
android.view.ViewRoot.setView(ViewRoot.java:528)

05-10 09:52:57.709 E/AndroidRuntime( 9907): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)


Any idea how to overcome this message and make it run??

Thanks  Regards,
Pandi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Does android supports modal dialog box ?

2011-05-10 Thread ABS
Hi Everybody,

  I am new to android, working on one application in which
i am using series of dialog boxes to show alert to user , I have to
show dialogs one after another i.e simultaneously but when first
dialog comes out the code running behind dialog haven't stop still end
of method. hence it does not shows remaining dialogs simply it ignores
remaining dialogs.
 I have to stop control of program at the first dialog,
if  anybody has solution on this reply me


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


[android-developers] In a Native C program, how to call java API: ActivityManager::getMemoryInfo()

2011-05-10 Thread linlone9
In Java program, we can use following codes to get the system memory info:
===
ActivityManager activityManager = (ActivityManager)
getSystemService(ACTIVITY_SERVICE);
MemoryInfo info = new MemoryInfo();
activityManager.*getMemoryInfo*(info);
===

But now, we need to get system memory info from Native C program. So, I have
to implement following codes to new MemoryInfo object:
===
jclass cls = env-FindClass(android/app/ActivityManager$MemoryInfo);
jmethodID ctor = env-GetMethodID(cls, init, ()V);
jobject *objMemoryInfo* = env-NewObject(cls, ctor);
===

Up to now, we have got the MemoryInfo's object objMemoryInfo.


Then I need to input *objMemoryInfo* to *parcelMemoryInfo*, but don't
how to convert from Parcelable to Parcel:
===
int GET_MEMORY_INFO_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION+75;

spIServiceManager sm = defaultServiceManager();
spIBinder am = sm-getService(String16(activity));
Parcel *parcelMemoryInfo* = *objMemoryInfo*; * //HERE: how to convert
from Parcelable to Parcel
*Parcel reply;
status_t ret = am-transact(GET_MEMORY_INFO_TRANSACTION, *
parcelMemoryInfo*, reply);
===
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] Does android supports modal dialog box ?

2011-05-10 Thread Kumar Bibek
Hmm. I would say bad approach. Wait for one dialog to be dismissed and then
show the next one
On May 10, 2011 5:08 PM, ABS ravi.chavan...@gmail.com wrote:
 Hi Everybody,

 I am new to android, working on one application in which
 i am using series of dialog boxes to show alert to user , I have to
 show dialogs one after another i.e simultaneously but when first
 dialog comes out the code running behind dialog haven't stop still end
 of method. hence it does not shows remaining dialogs simply it ignores
 remaining dialogs.
 I have to stop control of program at the first dialog,
 if anybody has solution on this reply me


 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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Override progress bar message i.e.. 0/100

2011-05-10 Thread lbendlin
The progressbar is just that - a bar. You have to code the other view 
elements yourself. Add them all to a relative layout, use them in the 
dialog, and then refresh the values during onProgressUpdate.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Local variable type mismatch

2011-05-10 Thread Marco
On 2011-05-09 Igor Prilepov iprile...@gmail.com wrote:

 According  to  the message  you  are  trying to  set/get
 variable of  type Object  using local variable  which is
 defined as [] Object. Check your local arrays and how do
 you use them.

That's  a lot  of work  to check  the entire  code. Is  it
somehow possible to narrow down  the error to a particular
jar  package or  file?  It's kind-of  cumbersome to  check
every single source file in every jar package.

BTW:  This  error  only  appears  during  compilation  for
Android. The program compiles/runs fine for desktop.

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] Characters appear out of the screen in the TextView!

2011-05-10 Thread omar
Hey, I've been trying to fix this problem for a long time, The problem
is that some characters in the text are out of the screen, here is a
screenshot of what I mean:
http://i.imgur.com/fDqa6.png

xml:

?xml version=1.0 encoding=utf-8?

  RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:background=@drawable/list
  android:orientation=vertical
  android:padding=15dip
  android:layout_width=fill_parent
  android:id=@+id/relativeLayout1
  android:layout_height=fill_parent

  TextView
android:textSize=20sp
android:layout_width=wrap_content
android:layout_height=wrap_content
android:textColor=#000
android:id=@+id/Munawwat_Text_TextView_text
android:layout_alignParentRight=true
/

/RelativeLayout


Can anyone suggest a way/workaround to fix this problem?

A workaround for this is to put it into an EditText. If I put the text
into the EditText, the EditText gets horizontally scrollable
(scrollable for ~3px) which is good so you can see the characters that
are out of the screen but i dont want to let the users mess with the
text.. So:
1. Is it possible to not allow the users to edit in the EditText and
in the same time let the EditText get scrollable?
2. Is there any other view that i can put the TextView into it, so it
can get scrollable a bit so I can see the characters? (limit the
scroll of the view)
3. Is there a way to limit the number of characters in each line in
the TextView?

I know I asked a lot though this is one of the last problem I have so
I would really appreciate any comment/suggestion!
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: Local variable type mismatch

2011-05-10 Thread Kostya Vasilyev
Do you have any machine-generated .class files, or any supplied in 
compiled form, such as a jar file? (as opposed to compiled on your 
machine from Java sources)


If you do, that'd be the first place to check.

-- Kostya

10.05.2011 16:17, Marco пишет:

On 2011-05-09 Igor Prilepoviprile...@gmail.com  wrote:


According  to  the message  you  are  trying to  set/get
variable of  type Object  using local variable  which is
defined as [] Object. Check your local arrays and how do
you use them.

That's  a lot  of work  to check  the entire  code. Is  it
somehow possible to narrow down  the error to a particular
jar  package or  file?  It's kind-of  cumbersome to  check
every single source file in every jar package.

BTW:  This  error  only  appears  during  compilation  for
Android. The program compiles/runs fine for desktop.

Marco





--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] sending sms from emulator to real device connected on the computer

2011-05-10 Thread Amine KHANCHAR
hi ,i am looking for a solution to send sms from emulator to a real
android device  connected to the computer through usb cable .

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] NFC testing rig?

2011-05-10 Thread Xiaoliang Ding
Nokia C7 support NFC so far.

2011/5/10 Marcin Orlowski webnet.andr...@gmail.com

 Hi,

 We're going to fight with NFC for the next project and since I saw a few
 people with much more knowledge on the subject on that list I'd like to ask
 if anyone got any thoughts to share on building testing environment for such
 projects. I mostly need Android mobile and some standalone NFC device to
 test it all with. I did quick research yesterday yet I failed to find
 anything but Nexus S (I do not look for non-Android devices for this phase
 of the project, not sure if any exists anyway - I found some announcements
 but seem these did not turned into products yet). As for standalone device
 some companies seem to offer what I need too, i.e.
 http://www.insidesecure.com/eng/Products/NFC-Products so there's a hope :)

 Anyway, if anyone who spent some time on the subject and is willing to
 share the lesson, I am all ears. Thanks in advance :)


 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule
 handy...
 *Date In Tray* http://bit.ly/dateintraypro - current date at glance...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and 
 *Twitterhttp://webnetmobile.com/twitter/
 *

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: Local variable type mismatch

2011-05-10 Thread Marco
On 2011-05-10 Kostya Vasilyev kmans...@gmail.com wrote:

 Do you  have any machine-generated .class  files, or any
 supplied  in compiled  form,  such as  a  jar file?  (as
 opposed to compiled on your machine from Java sources)

I have many  jar files included. A few of  them I compiled
on my machine, most of them were provided from third party
or written and compiled by somebody else.

 If you do, that'd be the first place to check.

Thanks.

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] Does android supports modal dialog box ?

2011-05-10 Thread Satya Komatineni
Although the dialogs are *almost* modal in Android, they are
fundamentally (or practically) asynchronous.

Search for modal dialogs and android in google and you will see a lot
of write up from this news group.

So you have to reorient your programming where you can alert and wait
the main thread. This is just not possible (as far as I know).

If you are using alerts for debugging you may want to use toast or Log.d.

Bottom line you cannot stop the main thread while a dialog is being
acted upon and finished.


On Tue, May 10, 2011 at 7:38 AM, ABS ravi.chavan...@gmail.com wrote:
 Hi Everybody,

              I am new to android, working on one application in which
 i am using series of dialog boxes to show alert to user , I have to
 show dialogs one after another i.e simultaneously but when first
 dialog comes out the code running behind dialog haven't stop still end
 of method. hence it does not shows remaining dialogs simply it ignores
 remaining dialogs.
             I have to stop control of program at the first dialog,
 if  anybody has solution on this reply me


 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



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Re: Async Task or Spawn a Thread?

2011-05-10 Thread Satya Komatineni
I would say

1. Understand first how handler/looper/threrading works in android
2. Then you will realize that AsyncTask is just one pattern on top of
the above basics
3. Try to use AsyncTask if it can work for your problem as it
simplifies the mechanics of threading/handlers. if not then go for the
guts using handlers/threads

Coming to thread pools the latest documentation seem to suggest that
after honeycomb the AsyncTask may roll back to a single thread
implementation and have the programmer deal with multiple threads
explicitly.


On Mon, May 9, 2011 at 6:34 AM, Bob Kerns r...@acm.org wrote:
 I'm OK with having people who aren't very experienced with threads create a
 new AsynchTask for each recurrence. Better than debugging a synchronization
 problem -- or worse, living with it. And it's not really that high an
 overhead, either in code complexity or time and memory. It's not like it's
 creating a new thread each time.
 Just to be clear: Handler/Looper doesn't give you threads. I've seen people
 get very confused on this point! It does make using threads, well, not
 simpler, but safer. If you're interested in passing off work to another
 thread, then it's better to use Handler/Looper than to try to handle the
 synchronization of passing off the work item yourself.
 Still, since you have to create that work item to pass it off, generally
 speaking, you might as well make it an AsynchTask, and get thread pooling,
 clean interface to the UI thread, and convenient progress bar handling for
 free. The only time I can think of to prefer Handler/Looper is when the
 thread pooling behind AsynchTask doesn't fit your needs -- and if it
 doesn't, you may want to consider your needs, as having lots of threads
 takes lots of memory (for the stacks).

 On Sunday, May 8, 2011 4:33:44 PM UTC-7, Indicator Veritatis wrote:

 All the answers I have seen so far are true, but yours is the most
 informative. I would be a little careful about the generalization
 though, that if he has to ask, then AsyncTask is the answer. AsyncTask
 is not so convenient for recurring tasks, unless you are OK with
 having to start it up all over again each time the trigger occurs.

 And there is one other tool in Android that is still useful for
 Threads, when barebones Java Threads are too much of a bother to
 manage: Looper/Handler. This was the standard Android threading
 'workhorse' before AsyncTask (or its unoficcial predecessor UserTask)
 became so popular.

 On May 7, 11:31 am, Bob Kerns r@acm.org wrote:
  Use an AsyncTask -- unless both of the following are true:
 
     - AsyncTask doesn't meet your needs somehow
     - You know very clearly and well how to properly synchronize between
     threads, and how to transfer work to the UI thread where needed, etc.
 
  If AsyncTask doesn't meet your needs, and you don't have the second
  requirement -- you have a very steep (and error-prone) learning curve
  ahead
  of you. The whole idea of AsyncTask is to make it easier to write
  reliable
  asynchronous code.
 
  Generally speaking -- if you have to ask, AsyncTask is probably the
  answer.
 
  On Saturday, May 7, 2011 8:53:29 AM UTC-7, Droid wrote:
 
   Seems I can use an async task OR roll my own thread to do a background
   task.
 
   Is one better than the other?

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



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


[android-developers] Re: how to unit test drag n drop - honeycomb

2011-05-10 Thread jjoe64
When I try to manually send the motion events, the security exception
comes when I send the ACTION_MOVE event:

Instrumentation instrumentation = getInstrumentation();

long downTime = SystemClock.uptimeMillis();
long eventTime = SystemClock.uptimeMillis();

int x = 20;
int y = 150;

// down
MotionEvent event = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_DOWN, x, y, 0);
instrumentation.sendPointerSync(event);
instrumentation.waitForIdleSync();
Thread.sleep(1000); // long click

// move
for (; x200; x+=3) {
event = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_MOVE, x, y, 0);
//  SecurityException will be thrown 
/
instrumentation.sendPointerSync(event);
instrumentation.waitForIdleSync();
}

// up
event = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_UP, x, y, 0);
instrumentation.sendPointerSync(event);
instrumentation.waitForIdleSync();

On 6 Mai, 10:06, jjoe64 g.jjo...@googlemail.com wrote:
 hello,

 since honeycomb (api level 11) there is a the feature dragging and
 dropping.
 I wrote a very small and simple app to get involed with this new
 feature.

 Now I'd like to unit test this. I tried two ways to test it:
 1. Robotium: solo.drag(...)
 2. TouchUtils.dragViewBy(this, img, Gravity.TOP |
 Gravity.CENTER_HORIZONTAL, -80, -5);

 But both fail with this error: I/TestRunner(  648):
 java.lang.SecurityException: Injecting to another application requires
 INJECT_EVENTS permission
 1. in the manifest, this permission is included
 2. the app has the focus, there is no lock screen or something...

 When I try to debug the method TouchUtils.drag the javavm crashes at a
 simple integer calculation.

 It there any way to unit test the new drag n drop feature? Can anybody
 give me an example?

 Thanks,
 Jonas

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 working with SOAP (lib kSOAP2)

2011-05-10 Thread Gorka
Hi,

I am trying to access to a web service using SOAP using the ksoap2
libraries. The thing is that I can make some examples work, but I
cannot access the service I am interested in.

There is the service: http://apli.bizkaia.net/APPS/DANOK/TQWS/TQ.ASMX
And that is the method I want to consult:
http://apli.bizkaia.net/APPS/DANOK/TQWS/TQ.ASMX?op=GetPasoParada

Sort description

POST /APPS/DANOK/TQWS/TQ.ASMX HTTP/1.1
Host: apli.bizkaia.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: http://tempuri.org/LANTIK_TQWS/TQ/GetPasoParada;

?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://
schemas.xmlsoap.org/soap/envelope/
  soap:Body
GetPasoParada xmlns=http://tempuri.org/LANTIK_TQWS/TQ;
  strLineastring/strLinea
  strParadastring/strParada
/GetPasoParada
  /soap:Body
/soap:Envelope

That is my code:

private static final String SOAP_ACTION = http://tempuri.org/
LANTIK_TQWS/TQ/GetPasoParada;
private static final String METHOD_NAME = GetPasoParada;
private static final String NAMESPACE = http://tempuri.org/
LANTIK_TQWS/TQ/;
private static final String URL = http://apli.bizkaia.net/APPS/DANOK/
TQWS/TQ.ASMX;

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); //set up
request
request.addProperty(strLinea, *); //variable name, value. I got
the variable name, from the wsdl file!
request.addProperty(strParada, 48036029); //variable name, value.
I got the variable name, from the wsdl file!
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11); //put all required data
into a soap envelope
envelope.setOutputSoapObject(request);  //prepare request
envelope.dotNet = true;
HttpTransportSE httpTransport = new HttpTransportSE(URL);

try {
httpTransport.call(SOAP_ACTION, envelope);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //send request

SoapObject result=(SoapObject)envelope.bodyIn;
Log.d(TAG, Result:  + result.toString());

The thing is that I don´t get any response. Well, actually I do, but
it is an error message:
GetPasoParadaResponse{GetPasoParadaResult=Object reference not set to
an instance of an object.;}

It would be great if someone knows how can I solve my problem.

Thanks a lot, Gorka

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: sending sms from emulator to real device connected on the computer

2011-05-10 Thread Smiley
once your phone is connected run the adb devices command.
I think you would see your phone in  the list of devices.
Try txt to number that appears next to your phone. For example here I
would txt 5554 and get the emulator.



c:\java\android-sdk-windows\platform-toolsadb devices
List of devices attached
emulator-5554   device


On May 10, 4:08 pm, Amine KHANCHAR a.khanc...@gmail.com wrote:
 hi ,i am looking for a solution to send sms from emulator to a real
 android device  connected to the computer through usb cable .

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


Re: [android-developers] Problem working with SOAP (lib kSOAP2)

2011-05-10 Thread TreKing
On Tue, May 10, 2011 at 8:50 AM, Gorka gork...@gmail.com wrote:

 I am trying to access to a web service using SOAP using the
 ksoap2 libraries.


This group is for developing Android apps with the Android SDK. I don't see
anything in your post that is specifically Android related. You would have
much more luck, I think, in a group or forum dedicated to SOAP.

-
TreKing http://sites.google.com/site/rezmobileapps/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] Activity is destroyed than instantly created when pushing the sleep/lock-screen button

2011-05-10 Thread Jump
Hello

When I run my game app and then push the sleep/lock-screen button my 
activity is destroyed (onDestroy is called) and then directly after, 
onCreate is called.

However, if I first put my app in the background then push 
the sleep/lock-screen button the activity is not destroyed.

Can anyone explain this behavior and/or how I can get around it (keeping the 
app alive). Angry Birds actually keeps the music running when the lock 
screen is on, maybe there's some trick with that you can use?

I do not want to handle state.

Thx.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: sending sms from emulator to real device connected on the computer

2011-05-10 Thread Amine KHANCHAR
thank you Smiley but i've already tried that ,the problem is that iam
working on both :emulator and real device ; the first is acting like a
server and the second where the application is (client) so the real
device appear whith a certain ID  I5500f1aab23d not a port number
like emulator emulator-5554 witch 5554 is the port number .
so how can i target the real device from the emulator ?

On May 10, 2:43 pm, Smiley lior.za...@gmail.com wrote:
 once your phone is connected run the adb devices command.
 I think you would see your phone in  the list of devices.
 Try txt to number that appears next to your phone. For example here I
 would txt 5554 and get the emulator.

 c:\java\android-sdk-windows\platform-toolsadb devices
 List of devices attached
 emulator-5554   device

 On May 10, 4:08 pm, Amine KHANCHAR a.khanc...@gmail.com wrote:







  hi ,i am looking for a solution to send sms from emulator to a real
  android device  connected to the computer through usb cable .

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Long process before a dialog is opened

2011-05-10 Thread Satya Komatineni
I have thought about this a bit further.

You should be able to do this with some work.

If I am not mistaken what you are wanting to do is a special case of
something like a Progress Dialog except it is custom and the user
wants to dismiss it explicitly. Also you must not wait for the
onPostExecute.

My high level thougths are:

1. Create a dialog as you normally do in onCreateDialog() and return that dialog
2. Keep a pointer to the dialog so that you can alter the view in that
dialog some manner
3. Kick off your asynctask
4. Update progress on your dialog with a visual cue
5. OnPostExecute enable a button on the dialog to do the desired
action by the user

I think this will work...(if it suits your intent)

On Fri, May 6, 2011 at 5:14 PM, venkata raidu venkata.ra...@gmail.com wrote:
 Thank you Satya. Using Activity would solve the problem. But, I
 thought, by using a dialog, the user don't have to leave the current
 screen and also, since the dialog is transparent,  the user can see
 the background always. By the way, I own your book. It is a very good
 comprehensive book for Android.

 Venkata

 On May 6, 1:57 pm, Satya Komatineni satya.komatin...@gmail.com
 wrote:
 Venkata,
 All you probably need is an activity. May be just the activity that
 you are on when the menu is clicked.

 Eitherway on the menu click start an asynctask and you can show the
 progress bar while the asynctask is in progress.

 At the end of that asynctask you can update the view in your activity
 with the data. Or you can start a new actvity first and have that new
 activity start an async task.









 On Fri, May 6, 2011 at 2:44 PM, venkata raidu venkata.ra...@gmail.com 
 wrote:
  Problem:
  I need to display a dialog upon the click of a menu item. The
  information to be displayed on the dialog will be downloaded each time
  and is a lengthy process. How do you solve this problem, so that a
  progress bar is displayed during this process.

  Solution I tried:
   I used onCreateDialog() of the Activity and wrote a class which
  extends AsyncTask to create a dialog with new data. But in the method
  onCreateDialog(), it waits for a dialog to be returned, and I was not
  able to send using my class because onPostExecute() method's return
  type is void.

  Please suggest a solution. Thanks.

  -Venkata

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

 --
 Satya Komatinenihttp://www.satyakomatineni.comhttp://www.androidbook.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



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Re: Long process before a dialog is opened

2011-05-10 Thread Satya Komatineni
 Or (if I understand your context right) better yet, show a progress
dialog when the menu is clicked and when the progress dialog finishes
show your special dialog thereby fulfilling both requirements of
visibility and long running process.



On Tue, May 10, 2011 at 10:41 AM, Satya Komatineni
satya.komatin...@gmail.com wrote:
 I have thought about this a bit further.

 You should be able to do this with some work.

 If I am not mistaken what you are wanting to do is a special case of
 something like a Progress Dialog except it is custom and the user
 wants to dismiss it explicitly. Also you must not wait for the
 onPostExecute.

 My high level thougths are:

 1. Create a dialog as you normally do in onCreateDialog() and return that 
 dialog
 2. Keep a pointer to the dialog so that you can alter the view in that
 dialog some manner
 3. Kick off your asynctask
 4. Update progress on your dialog with a visual cue
 5. OnPostExecute enable a button on the dialog to do the desired
 action by the user

 I think this will work...(if it suits your intent)

 On Fri, May 6, 2011 at 5:14 PM, venkata raidu venkata.ra...@gmail.com wrote:
 Thank you Satya. Using Activity would solve the problem. But, I
 thought, by using a dialog, the user don't have to leave the current
 screen and also, since the dialog is transparent,  the user can see
 the background always. By the way, I own your book. It is a very good
 comprehensive book for Android.

 Venkata

 On May 6, 1:57 pm, Satya Komatineni satya.komatin...@gmail.com
 wrote:
 Venkata,
 All you probably need is an activity. May be just the activity that
 you are on when the menu is clicked.

 Eitherway on the menu click start an asynctask and you can show the
 progress bar while the asynctask is in progress.

 At the end of that asynctask you can update the view in your activity
 with the data. Or you can start a new actvity first and have that new
 activity start an async task.









 On Fri, May 6, 2011 at 2:44 PM, venkata raidu venkata.ra...@gmail.com 
 wrote:
  Problem:
  I need to display a dialog upon the click of a menu item. The
  information to be displayed on the dialog will be downloaded each time
  and is a lengthy process. How do you solve this problem, so that a
  progress bar is displayed during this process.

  Solution I tried:
   I used onCreateDialog() of the Activity and wrote a class which
  extends AsyncTask to create a dialog with new data. But in the method
  onCreateDialog(), it waits for a dialog to be returned, and I was not
  able to send using my class because onPostExecute() method's return
  type is void.

  Please suggest a solution. Thanks.

  -Venkata

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

 --
 Satya Komatinenihttp://www.satyakomatineni.comhttp://www.androidbook.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



 --
 Satya Komatineni
 http://www.satyakomatineni.com
 http://www.androidbook.com




-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.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] Why is my progress bar not visible?

2011-05-10 Thread Ralph Bergmann
Hi,


I have an indeterminate progress bar in the window's title bar. I have
also requested it with:

@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

// ...
}

But why it is not visible when I call
setProgressBarIndeterminateVisibility(true); ?

In another activity it works.


Ralph

-- 

Ralph Bergmann


www  http://www.dasralph.de/
mail ra...@dasralph.de
skypedasralph

facebook http://www.facebook.com/dasralph
xing http://www.xing.com/profile/Ralph_Bergmann3
linkedin http://www.linkedin.com/in/ralphbergmann
model kartei http://dasralph.model-kartei.de/

java user group  http://www.jug-bb.de | http://www.xing.com/net/jugbb
ios dev grouphttp://www.xing.com/net/iosberlin


pgp key id   30C4ECD8
pgp fingerprint  C6E4 3435 7CC8 5008 54EC 1C86 4176 7F75 30C4 ECD8

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


Re: [android-developers] what exact mean by (Void...) in asyntask?

2011-05-10 Thread Kostya Vasilyev

http://today.java.net/pub/a/today/2004/04/19/varargs.html

10.05.2011 18:49, Hitendrasinh Gohil пишет:

hi,

can anybody tell me wht the three elipses added after Void and this
Void is different from void.
because if i remove it  simply preexecute() then  some functionality
not working.

regards,
hitendra gohil




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] what exact mean by (Void...) in asyntask?

2011-05-10 Thread Hitendrasinh Gohil
hi,

can anybody tell me wht the three elipses added after Void and this
Void is different from void.
because if i remove it  simply preexecute() then  some functionality
not working.

regards,
hitendra gohil

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 - is it possible to limit the fling speed?

2011-05-10 Thread Omar Adobati
OK, it was my bad.
I have found the reason, well the stupid reason.
Probably, with testing purpose, I did put a notifyDataChange in the
getView Adapter method.
This was preventing the list to stop scrolling when touched...

Sorry for being wasting your time!

*Omar Adobati | omar.adob...@gmail.com | @0m4r http://www.twitter.com/0m4r
*


On Tue, May 10, 2011 at 09:49, Omar Adobati omar.adob...@gmail.com wrote:

 Hi Thanks for your reply...

 ...but mine dosen't what can I have done to prevent it?
 I mean, for what reason mine keeps scrolling?


 *Omar Adobati | omar.adob...@gmail.com | @0m4rhttp://www.twitter.com/0m4r
 *



 On Tue, May 10, 2011 at 09:46, Dianne Hackborn hack...@android.comwrote:

 When the user presses on the screen during a fling it stops the screen.
  This is how list view and other scrolling containers have always working in
 Android since 1.0.

 On Tue, May 10, 2011 at 12:07 AM, Omar Adobati omar.adob...@gmail.comwrote:

 than to all the guys who have been replying to me,

 So, I have understood I can't limit the speed the fling scroll, but it
 would be at least possible to stop the scroll when I do touch the list? As I
 wrote, when I do perform a scroll that then come up to be a fling my list
 scroll to the top or the bottom (depending by the direction I do the
 movement) without having the chance to stop it.

 Thanks,

 Omar


 On Tue, May 10, 2011 at 07:27, Romain Guy romain...@android.com wrote:

 This API is used by the calendar view in the Calendar application to let
 you scroll more precisely from week to week. It is a very It is true 
 however
 that you should avoid changing the friction in regular lists. Your
 application should behave and feel the same to he user as any other
 application. It makes sense for a calendar view because it does not look
 like a ListView, the ListView is just an implementation detail.


 On Mon, May 9, 2011 at 10:23 PM, Dianne Hackborn 
 hack...@android.comwrote:

 Oh well look at that...  didn't know Romain added that to HC.  Hm.  Not
 sure I'm thrilled about it. :)

 On Mon, May 9, 2011 at 5:12 PM, Jona medicalsou...@gmail.com wrote:

 I haven't tested this but API 11 supports friction. See:

 http://developer.android.com/reference/android/widget/AbsListView.html#setFriction(float)

 Moto

 On May 9, 2:36 pm, Dianne Hackborn hack...@android.com wrote:
  ListView already limits its fling speed; you shouldn't change it to
 behave
  differently than it does everywhere else in the UI.
 
  On Mon, May 9, 2011 at 12:03 PM, Omar Adobati 
 omar.adob...@gmail.comwrote:
 
 
 
 
 
   Hi Everyone,
 
   I would like to knoe if I can limit the speed of the fling
 gestures in my
   ListActivity and if it is possible to stop the scrolling of the
 same list
   when I touch it.
 
   My current situation is the following: If I perform a vertical
 scroll that
   trigers the Fling state, sometimes (often actually) my List View
 scrolls
   full speed to the bottom (or to the top) and dose't stop till it
 reaches the
   final position. This is not really user friendly... is there a way
 to limit
   it?
 
   I have already tried with setFastScrollEnabled(false); but it
 seems to
   don't work.
 
   Thanks to everyone who would like to 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
 
  --
  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




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

[android-developers] Re: what exact mean by (Void...) in asyntask?

2011-05-10 Thread Chris


On May 10, 10:49 am, Hitendrasinh Gohil
hitendra.virtuei...@gmail.com wrote:
 hi,

 can anybody tell me wht the three elipses added after Void

Its called a variable-length argument list.  See
http://www.deitel.com/articles/java_tutorials/20060106/VariableLengthArgumentLists.html
for example.

 and this Void is different from void.

A Void is a void object.  void is a void type.

Cheers,
- C

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


[android-developers] 3d model loading

2011-05-10 Thread bob
Are there any good examples of loading a 3d model on Android?

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


[android-developers] Re: sending sms from emulator to real device connected on the computer

2011-05-10 Thread Amine KHANCHAR
any idea ?

On May 10, 3:16 pm, Amine KHANCHAR a.khanc...@gmail.com wrote:
 thank you Smiley but i've already tried that ,the problem is that iam
 working on both :emulator and real device ; the first is acting like a
 server and the second where the application is (client) so the real
 device appear whith a certain ID  I5500f1aab23d not a port number
 like emulator emulator-5554 witch 5554 is the port number .
 so how can i target the real device from the emulator ?

 On May 10, 2:43 pm, Smiley lior.za...@gmail.com wrote:







  once your phone is connected run the adb devices command.
  I think you would see your phone in  the list of devices.
  Try txt to number that appears next to your phone. For example here I
  would txt 5554 and get the emulator.

  c:\java\android-sdk-windows\platform-toolsadb devices
  List of devices attached
  emulator-5554   device

  On May 10, 4:08 pm, Amine KHANCHAR a.khanc...@gmail.com wrote:

   hi ,i am looking for a solution to send sms from emulator to a real
   android device  connected to the computer through usb cable .

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 model loading

2011-05-10 Thread Marcin Orlowski
On 10 May 2011 17:15, bob b...@coolgroups.com wrote:

 Are there any good examples of loading a 3d model on Android?


Any file I/O tutorial shall do.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: where to put files to be read by jni native code

2011-05-10 Thread Jim
Thanks.  Copying from the Assets file list to the sdCard solved my
problem in the simplest way.



On May 9, 9:07 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Tue, May 10, 2011 at 12:57 PM, Jim j...@harmonicsystems.net wrote:
  I am trying include a small data file with my package.  I need to pass
  the name of the datafile down to a JNI native 'c' function that will
  open and read the file.  I am confused as to where to put this file.
  I've tried in res/raw, and in assets, but I can't seem to get an
  absolute pathname to where these files live to give to the 'c'
  routine.

  I supposed I could use AssetManager to open a fd and pass that down to
  the C code, but that is not how my existing library works at the
  moment.

 That's probably not going to work reliably, even if you managed it.
 The latest NDK allows you to create an activity entirely in native
 code, so it probably has API's to access assets (haven't used it).

  How can I get the absolute path to an asset file or resource file, and
  can it be opened by the 'c' code?

 The easiest way is to copy the file on the file system (or SD card),
 in your app's onCreate() the first time you run it, and pass the
 absolute path to your native code from there.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Async Task or Spawn a Thread?

2011-05-10 Thread Dianne Hackborn
On Tue, May 10, 2011 at 6:30 AM, Satya Komatineni 
satya.komatin...@gmail.com wrote:

 Coming to thread pools the latest documentation seem to suggest that
 after honeycomb the AsyncTask may roll back to a single thread
 implementation and have the programmer deal with multiple threads
 explicitly.


The only thing that may change there is you need to explicitly specify to
the AsyncTask to run in multiple threads.

-- 
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] menu item disabled, but clickable

2011-05-10 Thread Zanarotti Michele
I ever thought that a disabled menu item (setEnabled(false)) should appear 
grayed out (and that works) and
furthermore it should not be active as i click on it (it should not close 
the menu).

How can avoid the closing of the menu ? shouldn't this be the default 
behavior of a disabled menu item ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Intent to launch Google Latitude

2011-05-10 Thread cg-dev
Hi all,

I'm trying to launch Google Latitude using Intent.

I'm using an URI found on the net :

latitude://latitude/friends/location/exam...@gmail.com

And this code :

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivity(intent);

It's seems ok.

1°) But I would like to know if there is an official documentation
about this URI syntax.
I'll check in GoogleAPI doc, but did not find anything specific to
Android.

2°) Do you know a way to launch a check in in latitude application ?

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] putExtra not working for a pending intent

2011-05-10 Thread Boozel
Hi i have a widget which runs a service when pressed using the code below
Intent intent = new Intent(context, SignalSpotWidgetService.class);
intent.putExtra(a, 9);
PendingIntent pendingIntent = PendingIntent.getService(context, 
0, intent, 0); 

however in the service intent.hasExtra(a) is always false. why? does this 
not work for pending intents? How can I pass a a value between the two?
public void onStart( Intent intent, int startId )
{ 
Log.i(TAG,onStart());
 Log.i(TAG,%%EXTRA: +intent.hasExtra(a)); 

Thanks for 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] putExtra not working for a pending intent

2011-05-10 Thread TreKing
On Tue, May 10, 2011 at 11:40 AM, Boozel boozelcl...@gmail.com wrote:

 however in the service intent.hasExtra(a) is always false. why? does this
 not work for pending intents? How can I pass a a value between the two?


Try this:
http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT

-
TreKing http://sites.google.com/site/rezmobileapps/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 Distortion

2011-05-10 Thread neuromit
I'm loading a png file using

Bitmap eBitmap = BitmapFactory.decodeResource(r, R.drawable.pm) ;

and then drawing it using:

canvas.drawBitmap(eBitmap, x, y, mPaint);

The problem I'm experiencing is the bitmap is coming out distorted.
The corners are getting rounded and messing up the image.

Is there a way to prevent the bitmap from being distorted?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Convert from Polyline to ArrayListLocation

2011-05-10 Thread Felix Garcia Lainez
Hi,

I need to convert from google maps polyline to an array of android
Location objects.

Could anyone tell me if there is some utility function for that?

Thanks!

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


[android-developers] Re: NFC testing rig?

2011-05-10 Thread nemik
The ACR122U/Touchatag USB adapter has been pretty great for my
purposes so far. The SCL3711 USB adapter is also pretty good. I use
those in combination with libnfc.

On May 10, 5:02 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 Hi,

 We're going to fight with NFC for the next project and since I saw a few
 people with much more knowledge on the subject on that list I'd like to ask
 if anyone got any thoughts to share on building testing environment for such
 projects. I mostly need Android mobile and some standalone NFC device to
 test it all with. I did quick research yesterday yet I failed to find
 anything but Nexus S (I do not look for non-Android devices for this phase
 of the project, not sure if any exists anyway - I found some announcements
 but seem these did not turned into products yet). As for standalone device
 some companies seem to offer what I need too, 
 i.e.http://www.insidesecure.com/eng/Products/NFC-Productsso there's a hope :)

 Anyway, if anyone who spent some time on the subject and is willing to share
 the lesson, I am all ears. Thanks in advance :)

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 *Date In Tray* http://bit.ly/dateintraypro - current date at glance...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Bitmap Distortion

2011-05-10 Thread neuromit
I was able to fix most of the distortion by either adding a small
amount of noise in photoshop or but placing the image under res/raw/
 but the image is still getting clipped.  I have a sharp edge that is
getting rounded out.  The image is about 20x20 pixels and looks fine
on my computer but on the phone it looks terrible.

On May 10, 1:06 pm, neuromit stuart.lay...@gmail.com wrote:
 I'm loading a png file using

 Bitmap eBitmap = BitmapFactory.decodeResource(r, R.drawable.pm) ;

 and then drawing it using:

 canvas.drawBitmap(eBitmap, x, y, mPaint);

 The problem I'm experiencing is the bitmap is coming out distorted.
 The corners are getting rounded and messing up the image.

 Is there a way to prevent the bitmap from being distorted?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Convert from Polyline to ArrayListLocation

2011-05-10 Thread Igor Prilepov
 I doubt you would find a ready to use solution because the task seems to be 
unrealistic (as well as trivial) .

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] putExtra not working for a pending intent

2011-05-10 Thread Satya Komatineni
There is enough material on this forum if you search with 'pending
intent' especially around its uniqueness criteria.

At a high level, pending intents are references to already stored
intents. A pending intent uses the input intent as a key to locate
previously established pending intent for this intent. The key to
locate this does not include the extras. All other parts of an
intent participate in this uniqueness.

So even if you set extras different on 10 different intents
(everyother part of an intent being same) will result in a single
pendingintent.

The flag that was suggested will retreive that previous intent and
replaces the new extras on the old one.

You can also use something called a requestid to make the intents
unique. But it is suggested in the docs that you don't want to create
a lot of pendign intents if you have other ways of solving it.

Hope this brings a bit more background to pending intent


On Tue, May 10, 2011 at 12:58 PM, TreKing treking...@gmail.com wrote:
 On Tue, May 10, 2011 at 11:40 AM, Boozel boozelcl...@gmail.com wrote:

 however in the service intent.hasExtra(a) is always false. why? does
 this not work for pending intents? How can I pass a a value between the two?

 Try
 this: http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT

 -
 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



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] putExtra not working for a pending intent

2011-05-10 Thread Satya Komatineni
Also here are some previous notes I have collected on pending intents

Quick intro to pending intents:
http://www.satyakomatineni.com/item/3301

How alarmmanager and pending intents interact
http://www.satyakomatineni.com/item/3503

At this later link there is a lot of discussion on how pending intents
are unique and what happens extras etc. You will also see links to a
number of useful posts on pending intents.


On Tue, May 10, 2011 at 1:36 PM, Satya Komatineni
satya.komatin...@gmail.com wrote:
 There is enough material on this forum if you search with 'pending
 intent' especially around its uniqueness criteria.

 At a high level, pending intents are references to already stored
 intents. A pending intent uses the input intent as a key to locate
 previously established pending intent for this intent. The key to
 locate this does not include the extras. All other parts of an
 intent participate in this uniqueness.

 So even if you set extras different on 10 different intents
 (everyother part of an intent being same) will result in a single
 pendingintent.

 The flag that was suggested will retreive that previous intent and
 replaces the new extras on the old one.

 You can also use something called a requestid to make the intents
 unique. But it is suggested in the docs that you don't want to create
 a lot of pendign intents if you have other ways of solving it.

 Hope this brings a bit more background to pending intent


 On Tue, May 10, 2011 at 12:58 PM, TreKing treking...@gmail.com wrote:
 On Tue, May 10, 2011 at 11:40 AM, Boozel boozelcl...@gmail.com wrote:

 however in the service intent.hasExtra(a) is always false. why? does
 this not work for pending intents? How can I pass a a value between the two?

 Try
 this: http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT

 -
 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



 --
 Satya Komatineni
 http://www.satyakomatineni.com
 http://www.androidbook.com




-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.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] ActionBar Tabs

2011-05-10 Thread André
Hi,

I'm trying to customize the look of my tabs in the actionbar by
following this tutorial:
http://androidunlocked.net/archive/customizing-the-action-bar/
But I can't figure out how to change the standard blue line that is a
little bit thicker when the tab is selected to a different colour.
Any ideas of how I could achieve this?

Regards
André

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Password Manager For Ipad and other fPlatforms

2011-05-10 Thread Ezine.sbr23
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Register and UnRegister Broadcast Receiver

2011-05-10 Thread Igor Prilepov
1. Register broadcast receiver in onResume() without any additional 200ms 
and add some logic inside receiver to ignore intents for the first 200ms 
after startup. 
or
2. If you still want to do such weird things (i.e. to register BR in another 
task?!) then you need to inform this task when onPause is called to prvent 
new BR to be created. Because this is exactly what has happened: your 200ms 
task creates a broadcast receiver after the app has received and processed 
onPause(). 
IMHO the whole idea of creating BR in another task contradicts the Android 
design and should be avoided.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: hash functions

2011-05-10 Thread DanH
For your purposes any standard hash algorithm that produces the
desired number of bits should be fine.  The weakness of hash
algorithms has to do mostly with the ability to counterfeit data
that produces a given hash value -- this is an important consideration
when the hash is being used in a digital signature algorithm, but
not important if you're just hashing, say, an alpha password to create
a key.

On May 10, 12:52 am, pasamblue1 parulcha...@gmail.com wrote:
 I am developing an android application for encryption decryption of
 messages. I need some hash algorithm to generate key from password. I
 am using SHA1 for the same. Not sure if it is good to use it for
 security reasons. Is there any other algorithm to be used as hash
 function.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Convert from Polyline to ArrayListLocation

2011-05-10 Thread Felix Garcia Lainez
I don't understand, sorry... Could you explain me?

On 10 mayo, 19:35, Igor Prilepov iprile...@gmail.com wrote:
  I doubt you would find a ready to use solution because the task seems to be
 unrealistic (as well as trivial) .

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Custom themes on honeycomb

2011-05-10 Thread faah
It is possible to inherit the main theme with Theme.Holo.Light BUT use
the dialogs and menu style from Theme.Holo?

Can someone explain this?

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


[android-developers] Status bar area not covered when activity is resumed

2011-05-10 Thread groob
Hello!

I'm experiencing very nasty bug trying to implement Admob in my
application.
I thought the problem is in my code, but after some investigation I
found it present also in Android-Banner-Essentials example (available
for download here: 
http://code.google.com/mobile/ads/docs/android/fundamentals.html)
I wonder if anyone ever met this problem or maybe knows how to deal
with it.

Basically, when application has both status and title bar disabled, it
should use full screen.
Banner Essentials example displays nothing but Admob banner on the
very top of area available.
I downloaded the example, changed only two things:
- added my publisher ID to compile properly and receive any ads ;)
- added one param to activity's manifest to disable title and status
bar:
android:theme=@android:style/Theme.NoTitleBar.Fullscreen

Compiled binary, no matter what device is it launched on (tried Nexus
One, G1, Desire, different Android versions), is affected with the
same issue:
- when ad banner is displayed press Home,
- once taken back to home screen press and hold Home to see recently
launched apps,
- select back Banner Essentials app.
My tests reveal that with 50% reproduction chance Admob banner doesn't
go back to its position -the very top of the screen.
To show better what I mean I prepared three screenshots:
http://goo.gl/u9DTl

Important notices:
- when app is resumed normally, banner is displayed just below status
bar, and slides up until is aligned to the top screen border,
- when error appears the banner doesn't move at all,
- I couldn't reproduce the issue with any other interrupt (pressing
Back, Power Button),
- I think it may be somehow connected to gaining/losing foucs (see
screenshots).

My app is bit more complex than Banner Essentials so I started with
searching the issue in my code, with no luck, thus tried to simplify
the situation as much as possible and here are the results.

Does anyone know what may be causing the problem? Maybe some
additional flags or properties has to be set to handle this behaviour?

Any advice will be appreciated.

Regards.

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


[android-developers] Re: Convert from Polyline to ArrayListLocation

2011-05-10 Thread Igor Prilepov
It is unrealistic because people collect points and then show them as 
polyline, polygon or just dots not the other way around.
It is unrealistic because Google MapActivity on Android is different from 
the full scale Google Map API.
It is trivial because any Polyline (or Polygon) should be stored as some set 
of points and therefore all you need to do is to open a documentation to 
find out how exactly to do this. For example, if you open 
http://code.google.com/apis/maps/documentation/javascript/3.3/reference.html#Polyline
 you 
will find getPath()method to get 
MVCArrayhttp://code.google.com/apis/maps/documentation/javascript/3.3/reference.html#MVCArray
 
LatLnghttp://code.google.com/apis/maps/documentation/javascript/3.3/reference.html#LatLng
. 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] directly loading dynamically created classes (in dex format)

2011-05-10 Thread Tomasz
Hi friends,

I have an application which dynamically creates classes at runtime (in
the dex format). Is it possible to load these dex bytes directly
without saving them to a dex file, and then zipping it (many such
classes are created). An equivalent of
ClassLoader.createClass(className, classDexBytes) is what I'd like.
I.e. a DexClassLoader that doesn't have to reference a physical file,
but can be passed byte arrays instead.

Thank you very much for your help,
Tomasz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] directly loading dynamically created classes (in dex format)

2011-05-10 Thread Tomasz
Hi friends,

I have an application which dynamically creates classes at runtime (in
the dex format). Is it possible to load these dex bytes directly
without saving them to a dex file, and then zipping it (many such
classes are created). An equivalent of
ClassLoader.defineClass(className, classDexBytes, 0,
classDexBytes.length) is what I'd like. I.e. a DexClassLoader that
doesn't have to reference a physical file, but can be passed byte
arrays instead.

If I try just extending ClassLoader is get a
java.lang.UnsupportedOperationException: can't load this type of class
file
despite the byte[] definitely being in dex format (it starts with 'd'
'e' 'x' bytes). The trace for this is:
W/System.err(  362): java.lang.UnsupportedOperationException: can't
load this type of class file
W/System.err(  362):at java.lang.VMClassLoader.defineClass(Native
Method)
W/System.err(  362):at
java.lang.ClassLoader.defineClass(ClassLoader.java:338)
W/System.err(  362):at
java.lang.ClassLoader.defineClass(ClassLoader.java:301)

Thank you very much for your help,
Tomasz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: directly loading dynamically created classes (in dex format)

2011-05-10 Thread Tomasz
It turns out that VMClassloader defineClass() methods do nothing, but
throw the class format error. So how is one supposed to load class
bytes directly from a byte array? Hmmm.

On May 10, 10:50 pm, Tomasz pulchritud...@gmail.com wrote:
 Hi friends,

 I have an application which dynamically creates classes at runtime (in
 the dex format). Is it possible to load these dex bytes directly
 without saving them to a dex file, and then zipping it (many such
 classes are created). An equivalent of
 ClassLoader.defineClass(className, classDexBytes, 0,
 classDexBytes.length) is what I'd like. I.e. a DexClassLoader that
 doesn't have to reference a physical file, but can be passed byte
 arrays instead.

 If I try just extending ClassLoader is get a
 java.lang.UnsupportedOperationException: can't load this type of class
 file
 despite the byte[] definitely being in dex format (it starts with 'd'
 'e' 'x' bytes). The trace for this is:
 W/System.err(  362): java.lang.UnsupportedOperationException: can't
 load this type of class file
 W/System.err(  362):    at java.lang.VMClassLoader.defineClass(Native
 Method)
 W/System.err(  362):    at
 java.lang.ClassLoader.defineClass(ClassLoader.java:338)
 W/System.err(  362):    at
 java.lang.ClassLoader.defineClass(ClassLoader.java:301)

 Thank you very much for your help,
 Tomasz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Mapactivity second intent

2011-05-10 Thread ingy abbas
If i have an activity open socket between my client Android and python
then i want  to go to other activity intent which is MapActivity by
clicking on Button ... So is it acceptable to open the second as
Mapactivity ?!! 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] Mapactivity second intent

2011-05-10 Thread TreKing
On Tue, May 10, 2011 at 5:18 PM, ingy abbas ingy.abba...@gmail.com wrote:

 If i have an activity open socket between my client Android and python then
 i want  to go to other activity intent which is MapActivity by clicking on
 Button ... So is it acceptable to open the second as Mapactivity ?!! any
 help


You may want to try that again. Currently your question makes no sense (to
me anyway).

-
TreKing http://sites.google.com/site/rezmobileapps/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: hash functions

2011-05-10 Thread Bob Kerns
The fundamental problem with starting with a human-managed password is that 
there is not a lot of entropy -- the possible values are not distributed 
over a huge range, compared to what an attacker could try with 
trial-and-error.

So just doing SHA1 or SHA256 for that matter, is not sufficient for a strong 
key generation algorithm.

The first thing you need to address are dictionary attacks, where the 
attacker can pre-compute a large dictionary of keys from likely passwords. 
Here, you can inject randomness into the process. What you do is to start 
with a large random number, termed a 'salt'. This is not a secret -- you'll 
save it away in cleartext somehow, and then combine it with the user's 
password. While the attacker could afford to build a dictionary of keys 
based on passwords, a dictionary of possible salt values + passwords would 
be vastly larger.

The other thing you need to do is to protect against trial-and-error 
attacks. To do this, what you do is make it expensive enough to compute the 
key that an attacker simply couldn't try enough to get anywhere. The usual 
way of doing this is to iterate some expensive function -- such as SHA1. 
More precisely, you iterate this:

hash = f(hash)

where f is some function that is expensive, and does not collapse the space 
of possible values into some smaller set. One way to accomplish this would 
be:
f(hash) = hash xor sha1(hash).

I went with SHA1 above, because I want to tie this to PBKDF2, which Nikolay 
referenced.

What I outline above is roughly what PBKDF2 does for you. You can read the 
full details in rfc2898 http://tools.ietf.org/html/rfc2898, and I 
encourage you to do so. I did skip over a lot of detail to focus on the 
motivation and approach.

So there are basically two parameters -- the salt (selected randomly) and 
the iteration count (selected to make it expensive but not too expensive). 
 iOS4 uses I believe something like 1 iterations. Blackberry used 1, and 
was seriously pwned as a result.

Together, these compensate for the narrow range of human-generated 
passwords.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Mapactivity second intent

2011-05-10 Thread TreKing
Please respond to the group.

On Tue, May 10, 2011 at 5:32 PM, ingy abbas ingy.abba...@gmail.com wrote:

 Can i open the first activity normal activty then the second
 activity MapsActivity??


Yes - you could have figured this out by just trying it ...

-
TreKing http://sites.google.com/site/rezmobileapps/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: NullPointerException in process com.android.inputmethod.latin

2011-05-10 Thread HanWriting
hi,
I would like the know the steps to reproduce the crash.
Thanks!

HanWriting https://market.android.com/developer?pub=Honso

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: directly loading dynamically created classes (in dex format)

2011-05-10 Thread Tomasz
Here is some more illumination from PathClassLoader.java in android
(inside the loadClass() method):
/* --this doesn't work in current version of Dalvik--
if (data != null) {
System.out.println(--- Found class  + name
+  in zip[ + i + ] ' + mZips[i].getName() +
');
int dotIndex = name.lastIndexOf('.');
if (dotIndex != -1) {
String packageName = name.substring(0, dotIndex);
synchronized (this) {
Package packageObj = getPackage(packageName);
if (packageObj == null) {
definePackage(packageName, null, null,
null, null, null, null, null);
}
}
}

return defineClass(name, data, 0, data.length);
}
*/

Does anyone know when they are planning on implementing this?

On May 10, 11:13 pm, Tomasz pulchritud...@gmail.com wrote:
 It turns out that VMClassloader defineClass() methods do nothing, but
 throw the class format error. So how is one supposed to load class
 bytes directly from a byte array? Hmmm.

 On May 10, 10:50 pm, Tomasz pulchritud...@gmail.com wrote:

  Hi friends,

  I have an application which dynamically creates classes at runtime (in
  the dex format). Is it possible to load these dex bytes directly
  without saving them to a dex file, and then zipping it (many such
  classes are created). An equivalent of
  ClassLoader.defineClass(className, classDexBytes, 0,
  classDexBytes.length) is what I'd like. I.e. a DexClassLoader that
  doesn't have to reference a physical file, but can be passed byte
  arrays instead.

  If I try just extending ClassLoader is get a
  java.lang.UnsupportedOperationException: can't load this type of class
  file
  despite the byte[] definitely being in dex format (it starts with 'd'
  'e' 'x' bytes). The trace for this is:
  W/System.err(  362): java.lang.UnsupportedOperationException: can't
  load this type of class file
  W/System.err(  362):    at java.lang.VMClassLoader.defineClass(Native
  Method)
  W/System.err(  362):    at
  java.lang.ClassLoader.defineClass(ClassLoader.java:338)
  W/System.err(  362):    at
  java.lang.ClassLoader.defineClass(ClassLoader.java:301)

  Thank you very much for your help,
  Tomasz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: hash functions

2011-05-10 Thread Bob Kerns
https://www.kb.cert.org/vuls/id/836068

https://www.kb.cert.org/vuls/id/836068Nothing new should have been using 
MD5 for a looong time, and people need to know to stay away from it.

Fake SSL certs that exploit this have been produced. It's not just a 
theoretical concern.

On Tuesday, May 10, 2011 12:52:24 AM UTC-7, Nikolay Elenkov wrote:

 On Tue, May 10, 2011 at 3:59 PM, gjs garyjam...@gmail.com wrote:

  http://developer.android.com/reference/java/security/MessageDigest.html
 
  MD5 is weaker than SHA
 

 Qualify 'weaker'. See above.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Mapactivity second intent

2011-05-10 Thread ingy abbas
Done and the first activity work well i make a button to make me view
the next  activity but it forse close Due to this errors
05-11 02:46:19.823: ERROR/AndroidRuntime(311): Uncaught handler:
thread main exiting due to uncaught exception
05-11 02:46:19.843: ERROR/AndroidRuntime(311):
java.lang.NoClassDefFoundError: yaraby.y.Mapy
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at yaraby.y.yaraby
$1.onClick(yaraby.java:51)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.View.performClick(View.java:2364)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.View.onTouchEvent(View.java:4179)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.widget.TextView.onTouchEvent(TextView.java:6534)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.View.dispatchTouchEvent(View.java:3709)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
1107)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.app.Activity.dispatchTouchEvent(Activity.java:2061)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.os.Looper.loop(Looper.java:123)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
android.app.ActivityThread.main(ActivityThread.java:4338)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
java.lang.reflect.Method.invokeNative(Native Method)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
java.lang.reflect.Method.invoke(Method.java:521)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-11 02:46:19.843: ERROR/AndroidRuntime(311): at
dalvik.system.NativeStart.main(Native Method)


On 11 مايو, 00:34, TreKing treking...@gmail.com wrote:
 Please respond to the group.

 On Tue, May 10, 2011 at 5:32 PM, ingy abbas ingy.abba...@gmail.com wrote:
  Can i open the first activity normal activty then the second
  activity MapsActivity??

 Yes - you could have figured this out by just trying it ...

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/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] HttpsURLConnection's getResponseCode() returns -1

2011-05-10 Thread John Gaby
I am trying to use HttpsURLConnection to connect to a secure site, and
it is failing and getResponseCode() is returning -1.  The following is
the code that I am using.  Note that this very same code works in
other cases.  Can anyone give me a clue as to why I might get the -1,
and how I can get more information about what is going wrong.  Also
note, that if I take the URL that I am trying to connect to in this
call and paste it into a browser, I get the correct response, so I am
pretty sure that the URL itself is correct.  In this particular call,
m_data is null, so it is performing a GET and no data is written.

Thanks

HttpsURLConnection connection = null;

try
{
URL url = new URL(arg0[0]);
connection = (HttpsURLConnection) url.openConnection();

// Allow Inputs  Outputs if there is data to send
connection.setDoInput(true);
connection.setDoOutput(m_data != null);
connection.setUseCaches(false);

// Enable GET or POST depending on whether there is data to
send
connection.setRequestMethod((m_data == null) ? GET :
POST);

connection.setRequestProperty(Connection, Keep-Alive);
connection.setRequestProperty(Content-Type, application/
octet-stream);

if (m_data != null)
{
DataOutputStream outputStream = null;

connection.setFixedLengthStreamingMode(m_data.length);

outputStream = new
DataOutputStream( connection.getOutputStream() );
outputStream.write(m_data);

outputStream.flush();
outputStream.close();
}

// Responses from the server (code and message)
int serverResponseCode = connection.getResponseCode();
String serverResponseMessage =
connection.getResponseMessage();

InputStream inputStream = connection.getInputStream();

int nBytes;

m_curBytes= 0;
m_totBytes= connection.getContentLength();

byte[] bytes = new byte[65536];

while ((nBytes = inputStream.read(bytes))  0)
{
if (m_file != null)
{
m_file.write(bytes, 0, nBytes);
}
else if (m_result != null)
{
m_result.append(bytes, 0, nBytes);
}

m_curBytes+= nBytes;

m_handler.post(new Runnable()
{
public void run()
{
if (m_pInet != 0)
{
GDownloadProgress(m_pInet, m_curBytes,
m_totBytes);
}
else
{
int i = 0;
}
}
});

}


if (m_file != null)
{
m_error = false;
}
else if (m_result != null)
{
m_error= (m_result.length() = 0);
}
else
{
m_error= true;
}
}
catch (Exception ex)
{
GSystem.GLogWarning(GINet: error =  + ex.getMessage());
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Adding points automatic

2011-05-10 Thread ingy abbas
Using googlemaps How to add small points or dashes --- between
two overlay items on the googlemaps to be added electronics not as
overlay added manually i can add a path but i want to add - or
points electronics please 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] Re: Mapactivity second intent

2011-05-10 Thread TreKing
On Tue, May 10, 2011 at 6:48 PM, ingy abbas ingy.abba...@gmail.com wrote:

 *05-11 02:46:19.843: ERROR/AndroidRuntime(311):
 java.lang.NoClassDefFoundError: yaraby.y.Mapy*


Did you include the class in you manifest?

-
TreKing http://sites.google.com/site/rezmobileapps/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] Error while Compile Android Gingerbread 2.3.3

2011-05-10 Thread spurwa
When I compile the source android Gingerbread 2.3.3 is that I receive
an error message like this:
build / core / binary.mk: 25: *** external / stlport: Invalid
LOCAL_NDK_VERSION '4 'Choices acres. Stop.)

For information I have to download and Compile on 64bit Linux Ubuntu
10.04 Lucid in accordance with the instructions.

Any ideas what's the solution?

Thank you
SGP

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: hash functions

2011-05-10 Thread Nikolay Elenkov
On Wed, May 11, 2011 at 8:32 AM, Bob Kerns r...@acm.org wrote:
 https://www.kb.cert.org/vuls/id/836068
 Nothing new should have been using MD5 for a looong time, and people need to
 know to stay away from it.
 Fake SSL certs that exploit this have been produced. It's not just a
 theoretical concern.

I know :) But as with most things, one shouldn't avoid it just because
one heard somewhere that it's 'weaker'. At least a bit of research
is needed, that's what my comment was meant to say. And the
MessageDigest class reference was not exactly relevant.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Serial Number

2011-05-10 Thread New Developer
When I start or connect my Xoom  I get  in Console

[2011-05-10 21:15:29 - eeds] Automatic Target Mode: Unable to detect device 
compatibility. Please select a target device.
[2011-05-10 21:16:20 - eeds] Uploading new.apk onto device '0288...b397'
[2011-05-10 21:16:22 - eeds] Installing new.apk...

I assumed 0288...b397  is the serial number yet when I execute

SERIAL_NUMBER  = Secure.getString(getBaseContext().getContentResolver() ,  
Secure.ANDROID_ID);
Log.i(Activity , Serial Number =   ' + SERIAL_NUMBER   + ' 
 );
I get the following in LogCat

05-10 21:16:26.400: INFO/Activity(1354): Serial Number =   '7299...b099'  

Not the same Number.
So which is the correct serial Number and how do I find the serial number on 
the Xoom itself ??

Thanks in advance

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

[android-developers] eCarrel: tech eBook reader and bookstore for Android 3.0 tablets

2011-05-10 Thread jacek
Just shipped today, a new eReading solution mostly for developers,
with bookstore filled by all the latest and greatest O'Reilly titles.
You will find lots of recent titles very highly relevant to what we do
in Android programming,
including books on HTML5, SQLite, JavaScript, etc. etc.
One book, Mining the Social Web is GitHub integrated; soon there
will be more

https://market.android.com/details?id=com.ambrosoft.searchlib

You can preview all the books before buying at a discount.
After you buy a book, you will be able to download EPUB for your
archival purposes
eCarrel is specialized for non-fiction, scientific or technical text.
Superb search engine and social networking built-in.

This is only a beta so please be patient -- bugs are quite likely,
as you can expect.
I'd love to get your positive feedback and ideas for improvement.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Error while Compile Android Gingerbread 2.3.3

2011-05-10 Thread TreKing
On Tue, May 10, 2011 at 8:02 PM, spurwa spu...@gmail.com wrote:

 When I compile the source


Questions regarding building the source should go on a more appropriate
list, like porting or platform.

-
TreKing http://sites.google.com/site/rezmobileapps/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: hash functions

2011-05-10 Thread DanH
Of course, hashing a password, per se, doesn't really make it any
stronger.  And doing things like using a salt don't do much if the
concern is simple trial-and-error cracking of a single encrypted
message (unless you're relying on security by obscurity).  Salting
does help prevent known plaintext attacks and signature spoofing, but
those are not likely to be problems in low-volume messaging.
Iterating on an expensive hash can help discourage the trial-and-error
cracking attack, but it can add considerable overhead to the normal
path, and simply increasing the length of a weak password would be far
more effective.

On May 10, 5:34 pm, Bob Kerns r...@acm.org wrote:
 The fundamental problem with starting with a human-managed password is that
 there is not a lot of entropy -- the possible values are not distributed
 over a huge range, compared to what an attacker could try with
 trial-and-error.

 So just doing SHA1 or SHA256 for that matter, is not sufficient for a strong
 key generation algorithm.

 The first thing you need to address are dictionary attacks, where the
 attacker can pre-compute a large dictionary of keys from likely passwords.
 Here, you can inject randomness into the process. What you do is to start
 with a large random number, termed a 'salt'. This is not a secret -- you'll
 save it away in cleartext somehow, and then combine it with the user's
 password. While the attacker could afford to build a dictionary of keys
 based on passwords, a dictionary of possible salt values + passwords would
 be vastly larger.

 The other thing you need to do is to protect against trial-and-error
 attacks. To do this, what you do is make it expensive enough to compute the
 key that an attacker simply couldn't try enough to get anywhere. The usual
 way of doing this is to iterate some expensive function -- such as SHA1.
 More precisely, you iterate this:

 hash = f(hash)

 where f is some function that is expensive, and does not collapse the space
 of possible values into some smaller set. One way to accomplish this would
 be:
 f(hash) = hash xor sha1(hash).

 I went with SHA1 above, because I want to tie this to PBKDF2, which Nikolay
 referenced.

 What I outline above is roughly what PBKDF2 does for you. You can read the
 full details in rfc2898 http://tools.ietf.org/html/rfc2898, and I
 encourage you to do so. I did skip over a lot of detail to focus on the
 motivation and approach.

 So there are basically two parameters -- the salt (selected randomly) and
 the iteration count (selected to make it expensive but not too expensive).
  iOS4 uses I believe something like 1 iterations. Blackberry used 1, and
 was seriously pwned as a result.

 Together, these compensate for the narrow range of human-generated
 passwords.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: hash functions

2011-05-10 Thread Nikolay Elenkov
On Wed, May 11, 2011 at 7:34 AM, Bob Kerns r...@acm.org wrote:

 More precisely, you iterate this:
 hash = f(hash)
 where f is some function that is expensive, and does not collapse the space
 of possible values into some smaller set. One way to accomplish this would
 be:
 f(hash) = hash xor sha1(hash).
 I went with SHA1 above, because I want to tie this to PBKDF2, which Nikolay
 referenced.

Do you mean you implemented this yourself? Not that it's too hard to do, but
Android has the Bouncy Castle JCE provider, so all you have to do is usually:

SecretKeyFactory factory = SecretKeyFactory.getInstance(KEYGEN_ALGORITHM)
KeySpec keySpec = new PBEKeySpec(password, salt, numInterations,  keyLen);
SecretKey key = factory.generateSecret(keySpec);

where KEYGEN_ALGORITHM is a supported PBE algorithm.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: hash functions

2011-05-10 Thread Nikolay Elenkov
On Wed, May 11, 2011 at 12:35 PM, DanH danhi...@ieee.org wrote:
 Of course, hashing a password, per se, doesn't really make it any
 stronger.  And doing things like using a salt don't do much if the
 concern is simple trial-and-error cracking of a single encrypted
 message (unless you're relying on security by obscurity).

If the attacker doesn't know that the key is derived from a password,
may be not. But since it's a reasonable assumption that they have
seen the application, which has an 'input password to encrypt message'
dialog, they probably do. And if so, it's trivial to take a dictionary and
compute all keys derivable from it. Then cracking the message becomes
really easy. Adding a salt and multiple iterations does make this
considerably more expensive/harder.

(BTW, the usual term is actually 'brute force attack', not 'trial-and-error'.)

 Iterating on an expensive hash can help discourage the trial-and-error
 cracking attack, but it can add considerable overhead to the normal
 path, and simply increasing the length of a weak password would be far
 more effective.

No. Increasing a *human selected* password from 6 to say 12 characters,
wouldn't really increase the entropy, people are just likely to pick a longer
word or append '123' to their usual password. Plus the overhead of deriving
a password is hardly 'considerable', especially considering that it will be
done only once on encryption/decryption.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   >