Re: [android-developers] Activity Not coming to foreground

2010-05-03 Thread Anurag Singh
This is typo mistake, I want to say that we can't use intent.getIntent(),
This method is depricated now.

 So, please choose another option like onNewIntent() or sendbrodcast.

On Mon, May 3, 2010 at 10:58 AM, Anurag Singh anusingh...@gmail.com wrote:

 intent.getAction() ,  This method is depricated now. So, please choose
 another option like onNewIntent() or brodcast.

 - Anurag Singh


 On Sun, May 2, 2010 at 6:52 PM, mike hasitharand...@gmail.com wrote:

 hi guys,

 i'm getting the outgoing number using BroadCastReceiver and then
 starts a Activity.
 but my activity runs in the background???  how can i bring it to
 foreground??

public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
this.context = context;
// this.inten = intent;
// String s = intent.getAction();

if (intent.getAction()

  .equalsIgnoreCase(Intent.ACTION_NEW_OUTGOING_CALL)) {
phonenbr =
 intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
intent = new Intent(context, OutGoing.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(Number, phonenbr);
context.startActivity(intent);
} else {
telManager = (TelephonyManager) context

  .getSystemService(Context.TELEPHONY_SERVICE);
telManager.listen(new StateListener(),

  PhoneStateListener.LISTEN_CALL_STATE);
}
}


 regards,
 Rrandika

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: Notification icon from a different package

2010-05-03 Thread Menny
I can only specify the icon resource ID. I can not use Drawable
objects.
I need some way to (maybe) create a notification of a different
Context, or some how USE a Drawable object with Notification

On Apr 29, 11:18 pm, Nerdrow troybe...@gmail.com wrote:
 I can't remember it exactly off-hand, but if you can get a ResolveInfo
 for wherever you want to load the icon from, there's a loadIcon method
 there;  I THINK it's ResolveInfo.loadIcon(PackageManager
 packageManager, Context context), where context = your current
 context.  Search the source for Launcher/Launcher2 on github, I know
 that's where I found it originally.  If that doesn't work for you,
 there's also a method to getResourceIdForName or something to that
 effect in either PackageManager or ResolveInfo.

 On Apr 28, 8:25 am, Menny menn...@gmail.com wrote:



  Hi,
  I want to show a notification icon in my application, but to take the
  icon from a different package.

  My application loads resources from external packages, and ,may show
  some information in the notification bar.
  I can take the title and text from the external package, but the icon
  can be specified only as resource ID, and Android extract the resource
  from the running context.

  Anyone can 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 
  athttp://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 
 athttp://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: Communicating from Android Service to an Activity

2010-05-03 Thread madmax
Thanks a lot Mark! This is exactly what i was looking for.. It
works..


Regards,
  Prafull.

On May 1, 6:25 pm, Mark Murphy mmur...@commonsware.com wrote:
 madmaxwrote:
               I have an AndroidServicethat runs indefinitely

 That's not possible and is not a good idea in general:

 http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...

  and
  wants to notify when a specific interesting event occurs to an
  activity. Now the problem is the interesting event occurs anytime
  and i don't want to poll to theserviceall the time to get that
  event... Theserviceitself should notify the activity about the
  event occuring. I looked around and came across a few methods to do
  it.
  1) Using Intents and putExtras() : This method wont suffice for me
  because i don't want to start a new activity all  the time.
  2) Using aidl : I already have an aidl for communication between the
 serviceand activity. This is essentially the polling mechanism.

 Have theservicesend a broadcast Intent via sendBroadcast(), and have
 the activity (when it is on-screen) dynamically register for that Intent
 via registerReceiver().

 Here is a sample project from one of my books that demonstrates the
 technique:

 http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/

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

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Can I use OpenGL to make Bitmap without GLSurfaceView

2010-05-03 Thread Robert Green
Awesome that you worked that out - but man... that sure isn't
lightweight!  I bet you could get substantial performance gains doing
that conversion natively and passing the processed array up to java.

On May 2, 4:34 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 Below is a snippet of code that turns a buffer from GL into a buffer
 that can be used by a Bitmap.
 I'm not sure if you can get a buffer from GL without been having
 showing it before or if this is what you're exactly looking for.
 But here goes anyway :-)

 

 public void savePixels(int x, int y, int w, int h, GL10 gl) {
         if (gl == null)
                 return;

         // synchronized (this) {
         // if (mSavedBM != null) {
         // mSavedBM.recycle();
         // mSavedBM = null;
         // }
         // }

         int b[] = new int[w * (y + h)];
         int bt[] = new int[w * h];
         IntBuffer ib = IntBuffer.wrap(b);
         ib.position(0);
         gl.glReadPixels(x, 0, w, y + h, GL10.GL_RGBA,GL10.GL_UNSIGNED_BYTE,
 ib);

         for (int i = 0, k = 0; i  h; i++, k++) {// remember, that OpenGL
 bitmap
                                         // is incompatible with
                                         // Android bitmap
                                            // and so, some correction need.
                 for (int j = 0; j  w; j++) {
                         int pix = b[i * w + j];
                         int pb = (pix  16)  0xff;
                         int pr = (pix  16)  0x00ff;
                         int pix1 = (pix  0xff00ff00) | pr | pb;
                         bt[(h - k - 1) * w + j] = pix1;
                 }
         }

         Bitmap sb = Bitmap.createBitmap(bt, w, h, Bitmap.Config.ARGB_);
         synchronized (this) {
                 mSavedBM = sb;
         }}

 

 On May 2, 2:45 pm, SChaser crotalistig...@gmail.com wrote:





  I would like to be able to use OpenGL in the Android to render into a
  bitmap (or any other sort of buffer I can turn into one), without
  actually displaying a GLSurfaceView.

  The purpose is to dynamically create very complex images using OpenGL,
  and then drawing those images on the canvas of a MapView.

  I have tried overlaying a translucent GLSurfaceView over a MapView, my
  preferred approach, but it has some problems:

  1) I have complex menus I need to display from either the MapView or
  the GLSurfaceView. I have been doing this using a ListView with its
  own activity. Unfortunately, that activity pushes the MapView down the
  stack. The result is a bit of flickering when the ListView activity
  finishes, popping the MapView back to the top. Even worse, if I use
  the ListView to overlay the GLSurfaceView (giving it the same complex
  menu capabilities), when it finishes, the GLSurfaceView reappears but
  the MapView doesn't display.

  2)As soon as the GLSurfaceView is created, the MapView stops fetching
  and rendering tiles. There seems to be no way to know when the MapView
  is complete, so I have to delay an arbitrary interval before creating
  the surfaceview.

  3) When the GLSurfaceView is present, the MapView's built-in user
  interface functions are obscured.

  Anyone know if there is a way around any of these problems?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://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 
 athttp://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] App for glowing LEDs

2010-05-03 Thread santanu
Hi,
I am wirting one app which will glow the LED according to the user
instraction. pls help is there any framework APIs to do so..
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] Problem in renaming file in Sdcard

2010-05-03 Thread brijesh masrani
Hello Everyone,

I want to rename a file in sdcard using program, i am not able to do that
using

String[] prog ={mv HArdcore.chm h_ardcore.chm};

Process p = Runtime.getRuntime().exec(prog);

so if anyone knows how to do that than please reply.


Regards,
Brijesh Masrani

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

2010-05-03 Thread Nithin
Hi,

In google Map, when the zoom level is 21, The plus button is
disabled and in the same way., when the zoom level is 1, minus
button is disabled. Can we programmatically disable the ZoomControl
buttons. That is, when the zoom level is 15, I want to disable the
plus button. Map should not zoom out further. But minus button
should be enabled.

Nithin

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

2010-05-03 Thread Anonymous Anonymous
Hi All,

Was playing with CTS ,and came across a failure like below

   testAnimation
 fail
 junit.framework.AssertionFailedError: unexpected timeout at
android.view.animation.cts.DelayedCheck.run DelayedCheck.java:51)


Can anyone pass me some light on , how to fix this issue? or what should be
the approach in cases like this?
Any information will be appreciated.

Thanks
Binish

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

2010-05-03 Thread CMF
however it just close activity B:(

On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:
 well there is a function called activity obj.finish()

 this wud suffice ur needs i guess.

 hope this helps.

 Regards,
 Saurav Mukherjee.

 On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
  I have two activities,A ,B
  A will start activity B
  When I press backbutton in B, I want to close A also
  But how can I close A here?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 
 athttp://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 close all activities in a app

2010-05-03 Thread jamesc
Use Activity.setResult() with your own defined result value, then call
Activity.finish().

So, B will call setResult() then finish().  A will now be at the top
of the task, and the finish() called by B will result in a call to A's
onActivityResult() (that is providing that B was started with
startActivityForResult()) which can check for your user defined result
value and then call finish() itself.

On May 3, 8:42 am, CMF manf...@gmail.com wrote:
 however it just close activity B:(

 On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:



  well there is a function called activity obj.finish()

  this wud suffice ur needs i guess.

  hope this helps.

  Regards,
  Saurav Mukherjee.

  On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
   I have two activities,A ,B
   A will start activity B
   When I press backbutton in B, I want to close A also
   But how can I close A here?

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 
  athttp://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 
 athttp://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] CTS Failure in View.

2010-05-03 Thread Anonymous Anonymous
Hi All,

Was playing with CTS ,and came across a failure like below

   testAnimation
 fail
 junit.framework.AssertionFailedError: unexpected timeout at
android.view.animation.cts.DelayedCheck.run DelayedCheck.java:51)

 Can anyone pass me some light on , how to fix this issue? or what should be
the approach in cases like this?
Any information will be appreciated.

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: How to close all activities in a app

2010-05-03 Thread CMF
I did try startActivityForResult
however, i get trouble with this because my
Activity B is a translucent OpenGL activity, with activity A as a
background
when I use startActivityForResult, the translucent effect cannot be
used, it becomes black in color:(

On May 3, 3:48 pm, jamesc jame...@gmail.com wrote:
 Use Activity.setResult() with your own defined result value, then call
 Activity.finish().

 So, B will call setResult() then finish().  A will now be at the top
 of the task, and the finish() called by B will result in a call to A's
 onActivityResult() (that is providing that B was started with
 startActivityForResult()) which can check for your user defined result
 value and then call finish() itself.

 On May 3, 8:42 am, CMF manf...@gmail.com wrote:



  however it just close activity B:(

  On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:

   well there is a function called activity obj.finish()

   this wud suffice ur needs i guess.

   hope this helps.

   Regards,
   Saurav Mukherjee.

   On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
I have two activities,A ,B
A will start activity B
When I press backbutton in B, I want to close A also
But how can I close A here?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 
   athttp://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 
  athttp://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 
 athttp://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 close all activities in a app

2010-05-03 Thread jamesc
Well, that's a different problem :-)

Have you searched on this forum to see if anyone else has had the same
issue (re: transparency)?  I tried and do get a lot of hits for
'transparent+black'.  Alternatively, if you don't find any solutions,
just post another question relating to the new issue.

Cheers

James

On May 3, 9:27 am, CMF manf...@gmail.com wrote:
 I did try startActivityForResult
 however, i get trouble with this because my
 Activity B is a translucent OpenGL activity, with activity A as a
 background
 when I use startActivityForResult, the translucent effect cannot be
 used, it becomes black in color:(

 On May 3, 3:48 pm, jamesc jame...@gmail.com wrote:



  Use Activity.setResult() with your own defined result value, then call
  Activity.finish().

  So, B will call setResult() then finish().  A will now be at the top
  of the task, and the finish() called by B will result in a call to A's
  onActivityResult() (that is providing that B was started with
  startActivityForResult()) which can check for your user defined result
  value and then call finish() itself.

  On May 3, 8:42 am, CMF manf...@gmail.com wrote:

   however it just close activity B:(

   On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:

well there is a function called activity obj.finish()

this wud suffice ur needs i guess.

hope this helps.

Regards,
Saurav Mukherjee.

On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
 I have two activities,A ,B
 A will start activity B
 When I press backbutton in B, I want to close A also
 But how can I close A here?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 
athttp://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 
   athttp://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 
  athttp://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 
 athttp://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] Widget updated without my invoking

2010-05-03 Thread yidongsoft
Widget updated without my invoking and text size and colour settings
lost.

My widget consists of a TextView. I set the text colour and text size
with

views.setInt(R.id.widgetText, setTextColor,
getResources().getColor(textColorResource));
views.setFloat(R.id.widgetText, setTextSize, textSize);

in provider.

configure xml file is:
?xml version=1.0 encoding=utf-8?
appwidget-provider xmlns:android=http://schemas.android.com/apk/res/
android
android:updatePeriodMillis=0 android:minWidth=294dp
android:minHeight=294dp android:configure=com.abc.WidgetOperator
android:initialLayout=@layout/widget_normal
/appwidget-provider

Note: updatePeriod is 0, no automatic update.

But the widget itself updates erratically. I set a tag in the
broadcast receiver and know that the widget is not updated via the
widget provider. It seems that the widget application (of android
system) updates the widget without loading the text colour and size.
After some time or some action (for example sending a shortcut to
desktop. Sometimes this sending action causes the widget lose the text
size and colour, sometimes does nothing to the widget.) That's the
worst thing. It's updated, but the text size and colour is set to the
initialLayout. This make my widget text size and colour nosense.

Any one can help me? 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] [Help] How to get thumbnail picture from HTC Hero?

2010-05-03 Thread Vincent Tsao
i'm trying to fetch a  thumbnail with picture URI using these code below:

long id = ContentUris.parseId(selectedImageURI);
String[] projection = { MediaStore.Images.Thumbnails.DATA };
Cursor c =
Images.Thumbnails.queryMiniThumbnail(getContentResolver(),
id, Images.Thumbnails.MINI_KIND, projection);

unfortunately, it's always return me the null cursor. finally, i found HTC
hero never generate picture thumbnail under \sdcard\DCIM\.thumbnails,  but
only create a picture under this folder: \sdcard\DCIM\100MEDIA, which
means i can only get the full size picture. What's am i supposed to do?
create a thumbnail by myself?

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

2010-05-03 Thread FrankG
Hello Mark,

I have short question to your example :

If I understood it right, the Broadcast from the WeatherPlusService
will not start
up the WeatherPlus Activity ?

So how must the example be changed, that the first broadcast will
startup the activity
and the next ones are normal broadcast to send the new status to the
activity.

I know that I can use startActivity( Intent ) to startup the
activity ..and use then sendBroadcast(Intent),
but you cannot know, whether then your Activity is still running.
I have the requirement, that when the devise status changed I have to
popup an alert dialog.

Must this really be done by the Service ?

Thanks  !

  Frank

On 3 Mai, 08:38, madmax madmax.1...@gmail.com wrote:
 Thanks a lot Mark! This is exactly what i was looking for.. It
 works..

     Regards,
       Prafull.

 On May 1, 6:25 pm, Mark Murphy mmur...@commonsware.com wrote:





  madmaxwrote:
                I have an AndroidServicethat runs indefinitely

  That's not possible and is not a good idea in general:

 http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...

   and
   wants to notify when a specific interesting event occurs to an
   activity. Now the problem is the interesting event occurs anytime
   and i don't want to poll to theserviceall the time to get that
   event... Theserviceitself should notify the activity about the
   event occuring. I looked around and came across a few methods to do
   it.
   1) Using Intents and putExtras() : This method wont suffice for me
   because i don't want to start a new activity all  the time.
   2) Using aidl : I already have an aidl for communication between the
  serviceand activity. This is essentially the polling mechanism.

  Have theservicesend a broadcast Intent via sendBroadcast(), and have
  the activity (when it is on-screen) dynamically register for that Intent
  via registerReceiver().

  Here is a sample project from one of my books that demonstrates the
  technique:

 http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/

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

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://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 
 athttp://groups.google.com/group/android-developers?hl=en- Zitierten Text 
 ausblenden -

 - Zitierten Text anzeigen -

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

2010-05-03 Thread CMF
Thanks Jamesc, I will post another question:) Thanks!

On May 3, 4:37 pm, jamesc jame...@gmail.com wrote:
 Well, that's a different problem :-)

 Have you searched on this forum to see if anyone else has had the same
 issue (re: transparency)?  I tried and do get a lot of hits for
 'transparent+black'.  Alternatively, if you don't find any solutions,
 just post another question relating to the new issue.

 Cheers

 James

 On May 3, 9:27 am, CMF manf...@gmail.com wrote:



  I did try startActivityForResult
  however, i get trouble with this because my
  Activity B is a translucent OpenGL activity, with activity A as a
  background
  when I use startActivityForResult, the translucent effect cannot be
  used, it becomes black in color:(

  On May 3, 3:48 pm, jamesc jame...@gmail.com wrote:

   Use Activity.setResult() with your own defined result value, then call
   Activity.finish().

   So, B will call setResult() then finish().  A will now be at the top
   of the task, and the finish() called by B will result in a call to A's
   onActivityResult() (that is providing that B was started with
   startActivityForResult()) which can check for your user defined result
   value and then call finish() itself.

   On May 3, 8:42 am, CMF manf...@gmail.com wrote:

however it just close activity B:(

On May 3, 12:56 pm, Saurav to.saurav.mukher...@gmail.com wrote:

 well there is a function called activity obj.finish()

 this wud suffice ur needs i guess.

 hope this helps.

 Regards,
 Saurav Mukherjee.

 On Mon, May 3, 2010 at 8:52 AM, CMF manf...@gmail.com wrote:
  I have two activities,A ,B
  A will start activity B
  When I press backbutton in B, I want to close A also
  But how can I close A here?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 
 athttp://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 
athttp://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 
   athttp://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 
  athttp://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 
 athttp://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] ADT Problem: Creating new Android Project

2010-05-03 Thread harjeet
Hello,
While trying to create a new Android Project., Get a error  -
An SDK Target must be specified.

The documentation states that - Under Target, select an Android
target to be used as the project's Build Target. The Build Target
specifies which Android platform you'd like your application built
against. 

However in my case The Build Target section of the open dialog does
not contain any text field or select dropdown, so I am not able to
specify anything.

Help in solving this is most appreciated.

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] Translucent theme turns black when using startActivityForResult

2010-05-03 Thread CMF
Hi all, I have two activities, A and B
A is a background activity and B is a translucent Open GL activity
I can see the background when using startActivity() , however when I
use startActivityForResult, the transparency lost, and the background
turns black in color
is it a bug for the android? Or someone has a solution about it?
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] onDraw being called - is that correct?

2010-05-03 Thread Gaurav Vaish
Hi,

I have a custom view that I use in the activity.
Here's the final structure:

Button 1
My View
Button 2


When either Button 1 or Button 2 are clicked, onDraw is dispatched to
My View also.
Is this the correct behaviour?
Since drawing in my view is resource intensive, can this be avoided?

What's the best way / practices for the same?


--
Happy Hacking,
Gaurav Vaish
www.mastergaurav.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] Question about reading contacts

2010-05-03 Thread EPecorari
Hi,
I'm trying to read all the contacts stored in the phone using this
code:

Cursor cursorNumber =
context.getContentResolver().query( Contacts.Phones.CONTENT_URI,
new String[] { Contacts.Phones._ID, 
Contacts.Phones.NAME,
Contacts.Phones.NUMBER }, null, null, null );

but the result seems empty until the moment I sync the contacts with
Google. Is that possible? Is it a limitation of Google Contacts API?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Finally, I published my Android/GAE based MMO War Game

2010-05-03 Thread Robert Green
And yet another game has the referrals - this time a featured one
called iMobsters has it.  I'm sure it's a fine game but it's funny
because their description says, reached #1 in the iPhone market!  I
wonder how??  ... Almost every comment is (5 stars - Add me!  code)

On Apr 29, 3:08 pm, Mario Zechner badlogicga...@gmail.com wrote:
 Got spamed too. Not holding my breath that anything will be done about
 it though...

 On 28 Apr., 22:22, Mike michaeldouglaskra...@gmail.com wrote:



  Also, section 3.8 of the Android Market Terms of Service covers unfair
  competition law.  Encouraging 5 star comments on your app in exchange
  for benefits to your users is clearly a method of spreading false
  information for competitive advantage.

  3.8 You agree that Google and/or third parties own all right, title
  and interest in and to the Market and the Products available through
  the Market, including without limitation all applicable Intellectual
  Property Rights in the Products. Intellectual Property Rights means
  any and all rights existing under patent law, copyright law, trade
  secret law, trademark law, unfair competition law, and any and all
  other proprietary rights worldwide. You agree that you will not, and
  will not allow any third party to, (i) copy, sell, license,
  distribute, transfer, modify, adapt, translate, prepare derivative
  works from, decompile, reverse engineer, disassemble or otherwise
  attempt to derive source code from the Products, unless otherwise
  permitted, (ii) take any action to circumvent or defeat the security
  or content usage rules provided, deployed or enforced by any
  functionality (including without limitation digital rights management
  or forward-lock functionality) in the Products, (iii) use the Products
  to access, copy, transfer, transcode or retransmit content in
  violation of any law or third party rights, or (iv) remove, obscure,
  or alter Google's or any third party's copyright notices, trademarks,
  or other proprietary rights notices affixed to or contained within the
  Products. 

  - Mike

  On Apr 28, 2:13 pm, Mike michaeldouglaskra...@gmail.com wrote:

   Google Android Market TOS Section 3.4 states:

   3.4 You agree that you will not engage in any activity that
   interferes with or disrupts the Market (or the servers and networks
   which are connected to the Market). You agree that you will not use
   any of the Products found on the Market in a way that interferes or
   disrupts any servers, networks, or websites operated by Google or any
   third-party.

   I would count artificially enhancing the ratings/ranking of your app,
   as well as posting spam comments on other apps as feedback to be
   engaging in activity that interferes with or disrupts the Market.

   - Mike

   On Apr 28, 12:34 pm, Ralf Schneider li...@gestaltgeber.com wrote:

I just checked World War. This game uses a referral system, too. The
generated codes look similar as the referral codes from PE. Wrold War 
has
over 25 downloads as PE.

Unfortunately I think there is no easy solution to the problem for 
google.
Is a referral system really violating the TOS of the market? What can be
done to reduce spamming comments on other apps? Is it really illegal to 
ask
users to advertise your apps in comments for other apps? Is an automatic
solution possible to clean the comments?

The problem will get much more serious if other developers will follow. 
It
can ruin the whole comment system. On the other hand: If it work so 
well and
nothing is done against it, it would be silly to not to use a similar
system.

2010/4/28 Robert Green rbgrn@gmail.com

 Just got another spam comment on one of my games, this time for a game
 called World War

 Also getting several pocket empires spam comments on my games.  Not
 cool.

 On Apr 28, 12:46 pm, Robert Green rbgrn@gmail.com wrote:
  Oh wow.  I had no idea they were actively telling people to spam 
  their
  game on our games.  Here are some alleged quotes from the 
  developer's
  chat with some android users:

  Pocket Play is the publisher of this game:

  [4/18/2010 9:05:40 PM] Pocket Play: Could use some help advertising
  our game on the market. I'll reward anyone who helps with 200 gems.
  [4/18/2010 9:07:20 PM] Pocket Play: Basically, I need some people to
  go to apps and post one time per app about our game.
  [4/18/2010 9:07:24 PM] Pocket Play: So we can spread the news.
  [4/18/2010 9:07:51 PM] Pocket Play: Not every app needs to be done 
  but
  just some.
  [4/18/2010 9:08:43 PM] Pocket Play: Just post something like..
  [4/18/2010 9:09:14 PM] Pocket Play: Want an awesome online medieval
  war game? Search up Pocket Empires in the market. 40,000 and
  counting.
  [4/18/2010 9:12:52 PM] Pocket Play: You have to rate it first
  [4/18/2010 9:12:56 

[android-developers] Re: htc droid incredible

2010-05-03 Thread ko5tik


On May 2, 5:43 pm, Simone simone.russ...@gmail.com wrote:
 Just a couple of questions. If I buy the droid incredible, would I be
 able to:
 -use it in Italy

Why not?  It surely can use all the mobile standards in place.

 -run my applications on it
Ig this is compatible with android version - why not?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed

2010-05-03 Thread Adrian Vintu
Hi all,

I am trying to run the rotation example from
http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationTwo/

I created an Eclipse project, added the files from the location above. I
created an emulator with target 2.0.1 API level 6. Resolution is 480x854.
Abstracted LCD density is 240 (also tried with 160).

For some reason, on rotation i get the Something wrong here, didn't expect
com.commonsware.android.rotation.two to be resumed message.

Did anyone get this thing running without the above warning?

Thank you,
Adrian Vintu

PS i also posted here, but got no answer :(
http://groups.google.com/group/android-developers/browse_thread/thread/b4922460c3c5c59f/0a0741860e6eb90d?hl=enlnk=gstq=Something+wrong+here#0a0741860e6eb90d

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

2010-05-03 Thread Eddie Ringle
The upcoming JIT for Dalvik will look for hot pieces of code and
compile it to native machine code, resulting in a speed boost. The JIT
is not there to convert Java bytecode to Dalvik bytecode, as Android
applications should already compile to Dalvik bytecode.

On May 3, 1:04 am, Justin King justin.matthew.k...@gmail.com wrote:
 Hello everyone,

 Is anyone able to explain to me exactly what the upcoming JIT compiler will
 provide? For example, I have Java programs that generate bytecode at runtime
 which I would like to port to android. Will the JIT compiler make this
 possible by converting the runtime generated Java byte code to Dalvik at
 runtime as required?

 Thanks!

 Justin

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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] Binding Json Array to Adapter

2010-05-03 Thread Rahul
Hi,

I have retrieved Json array by using the process below...

http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/

Now, I am trying to display the Json array in a list view.
So, can anyone help me determine how can i bind the values obtained
from Json array to a adapter so that i can display them in a list
view...I want to only display the text and the date of each value of
the array...

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

2010-05-03 Thread Uander
Can anyone on this mailing list help me out ??

On Fri, Apr 30, 2010 at 6:48 PM, Uander uandro...@gmail.com wrote:

 Hi All  ,

 Issue I mentioned here works fine in cupcake android 1.5 .
 it refers to a OHA issue 3985:


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

 Please suggest how to fix it .

 in Alarms.java file , I used  DateFormatSymbols(Locale.getDefault())
 instead of simple DateFormatSymbols() it doesn't work
 while in same file Locale.getDefault().toString()) equates to ja_JP that
 indicates japanese locales are supported in eclair 2.1 .

 Thanks :

 Uander



 On Fri, Apr 30, 2010 at 12:18 PM, Uander uandro...@gmail.com wrote:

 Hi All ,

 I am bit confused about location stuff in Alarm clock application in
 Eclair 2.1  . I want to confirm if its a feature or a bug .
 1 . Click on Main Menu - Alarm Clock -(Any Set Alarm)-Repeat . This
 pops up list of all weekdays from Monday to Sunday along with check button
 so as to enable them for corresponding alarm .
 2. Now select Dutch(Netherland language)
 Click on Main Menu-Settings- Language  Keyboard- Select Locale-Dutch
 (Netherlands)
 This will install Dutch environment in Android .
 3. Click on Main Menu - Alarm Clock(Wekker) -(Any Set Alarm)-
 Herhalen(Repeat) . This will show list of index for week days . rather than
 this dutch version of weekdays (Mon to Sun) should list out .

 Concern source code for fetching weekdays is in Alarms.java file under :
 ANDROID_TOP/packages/apps/AlarmClock/src/com/android/alarmclock


 for (int i = 0; i  7; i++) {
 if ((mDays  (1  i)) != 0) {

 ret.append(dayList[DAY_MAP[i]]);
 dayCount -= 1;
 if (dayCount  0) ret.append(
 context.getText(R.string.day_concat));
 }
 }

 Other localization strings are in strings.xml file under
 ANDROID_TOP/packages/apps/AlarmClock/res/values-*/

 Does it like to have only indexes 0,1,2,,,instead of translated strings
 for Mon,Tues,... in Dutch etc languages for Alarm Clock ??

 Any Help would be appreciated .




 Thanks :
 Uander




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

2010-05-03 Thread Sonic..
Hello,

I wanted to create an application that can be used to take the remote
connection of an android phone, on a desktop running Windows, using a
USB connection. So all the activity that can be performed on the
handset, should be visible on the desktop. Also, If the user interacts
with the PC window (e.g., type a key or use the mouse click), it
should be conveyed to the phone via the same remote mechanism.

So if anyone could tell me, in which direction does one should proceed
in order to do the above task.

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: Activity Not coming to foreground

2010-05-03 Thread mike
hi guys,

i think you all are wrong, it works fine i found out the issue.

the issue is not with the receive method. the issue was in the
activity there i have not set the setContentView();
instead of that i have diaplay a view.

anyhow thanks for your comments

regards,
Ranidka

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

2010-05-03 Thread adag
Hello,

I am receiving finalizing closable issues.
the snippet from the logcat as follows:

I/dalvikvm(  585): Ljava/lang/IllegalStateException;: Finalizing
cursor android.database.sqlite.sqlitecur...@437c0e60 on null that has
not been deactivated or closed

I/dalvikvm(  585):  at
android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)

I/dalvikvm(  585):  at dalvik.system.NativeStart.run(Native Method)

I/dalvikvm(  585): Uncaught exception thrown by finalizer (will be
discarded):
--
Here I do understand the problem is related to cursor that may not
have handled with in the code.
here pid 585 basically the main process ID. But I do I narrow down to
the code that particular cursor need to take care form this error in
logcat.

Please note I am using many cursors as I retrieving records from the
DB. And I have already taken care of all the cursor. But these error
forcing me to look that some cursor is overlooked.

Could anybody throw some light that would help me to track down the
particular cursor that are causing these trouble.

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

2010-05-03 Thread MobDev
thanks for the answer Mark...
Well the idea of the AsyncTask was to have a place where progress
would be shown to a GUI element...
And the onProgressUpdate() method oviously was very tempting ;)
Anyhow, everything being asynchronous and thus not possible to
implement within a doInBackgournd() method I will simply scrap the
AsyncTask...
Also get your ass to the netherlands for some training sessions ;)

On 28 apr, 13:15, Mark Murphy mmur...@commonsware.com wrote:
 MobDev wrote:
  hhmm ok...
  So I guess it should be possible for example to make my own class
  extendingAsyncTaskand implementing callaback interfaces to it from
  the aforementioned modules, does that sound feasable/logical at all ?

 You shouldn't need that. The point ofAsyncTaskis to do things in a
 background thread. Hence, use synchronous operations, not asynchronous
 ones, from calls originating *inside*AsyncTask'sdoInBackground().

  The
  conneciton module has to be started, then the AsynTask will have to
  wait for a response from that module telling it it's done downloading,
  then theAsyncTaskshould start the parsing, wait till that's done and
  then finally it can write to the DB...

 Why, then, are you using anAsyncTask?

 Either write everything as synchronous and then useAsyncTaskto move it
 to the background, or write everything as asynchronous and get rid of
 theAsyncTask. Using anAsyncTaskwon't make background work be even
 *more* background, after all.

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

 Android Training in NYC: 4-6 June 2010:http://guruloft.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 
 athttp://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] Always retrieve incomplete result from database

2010-05-03 Thread Monica Chrismawati
Hi all,

currently develop an application and when I catch data from database,
the record always incomplete.
I am curios whether this is because I use distinct, but when removed
distinct, the incomplete result also come too.
For the example I query to get all dates using rawQuery:

public Cursor getAllDates(String selectedMonth, String selectedYear){

String WHERE_MONTH_YEAR = t_month = '+selectedMonth+' and
t_year=' + selectedYear+';
return mDb.rawQuery(select t_date from finance where
t_month='+selectedMonth+' and t_year = '+selectedYear+', null);

}

the call method for the example: getAllDates(June, 2010);

when the query execute using command line with query: select t_date
from finance where t_month='June' and t_year='2010';

the result should be:
7
8

but in the emulator I get only 8.

Anybody ever got issue like this? This is because of what? Somebody
please help me, 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: Communicating from Android Service to an Activity

2010-05-03 Thread Mark Murphy
FrankG wrote:
 I have short question to your example :
 
 If I understood it right, the Broadcast from the WeatherPlusService
 will not start
 up the WeatherPlus Activity ?

Correct. In this case, the WeatherPlus activity is already running.

 So how must the example be changed, that the first broadcast will
 startup the activity
 and the next ones are normal broadcast to send the new status to the
 activity.
 
 I know that I can use startActivity( Intent ) to startup the
 activity ..and use then sendBroadcast(Intent),
 but you cannot know, whether then your Activity is still running.

Sure you can, though the sendBroadcast() model is probably not the right
one to use.

Have the activity bind to the service using the local binding pattern
and have it register a callback/listener object with the service once bound.

When the devise status changed, the service looks to see if it has a
listener from an activity.

-- If yes, it calls a method on that listener to tell the activity to
display the dialog or whatever.

-- If no, the service starts the activity with an extra indicating hey,
please go ahead and pop up that dialog, please

Bear in mind that popping up an activity from a service is a very bad
practice except in unusual circumstances (alarm clock, incoming phone
call). If the user is in the middle of doing something else, and you
interrupt them forcibly, and they do not think your interruption is
warranted, they will get...cranky. :-)

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

_Android Programming Tutorials_ Version 2.0 Available!

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


Re: [android-developers] Re: AsyncTask and progressUpdate()

2010-05-03 Thread Mark Murphy
MobDev wrote:
 thanks for the answer Mark...
 Well the idea of the AsyncTask was to have a place where progress
 would be shown to a GUI element...
 And the onProgressUpdate() method oviously was very tempting ;)
 Anyhow, everything being asynchronous and thus not possible to
 implement within a doInBackgournd() method I will simply scrap the
 AsyncTask...

Yeah, if the rest of your stuff is already asynchronous, I'd just have
them use a Handler or runOnUiThread() or something to update the
progress, either directly or through some common
updateTheProgressAndBeQuickAboutIt() method.

 Also get your ass to the netherlands for some training sessions ;)

You find a dozen or so people, and I'll be happy to head over. :-)

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

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

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


[android-developers] Re: Always retrieve incomplete result from database

2010-05-03 Thread adag
Hello Monica,
It seems the query is not correct. Missing quotes for WHERE_MONTH_YEAR
The correct query needs to treat WHERE_MONTH_YEAR as variable. It
should look like as follows:
 return mDb.rawQuery(select t_date from finance  + where t_month=
+\' + selectedMonth + \' and  + t_year = ' + selectedYear+',
null);

Hope this would resolve your problem.
ag

On May 3, 4:58 pm, Monica Chrismawati monica.rady...@gmail.com
wrote:
 Hi all,

 currently develop an application and when I catch data from database,
 the record always incomplete.
 I am curios whether this is because I use distinct, but when removed
 distinct, the incomplete result also come too.
 For the example I query to get all dates using rawQuery:

 public Cursor getAllDates(String selectedMonth, String selectedYear){

                 String WHERE_MONTH_YEAR = t_month = '+selectedMonth+' and
 t_year=' + selectedYear+';
                 return mDb.rawQuery(select t_date from finance where
 t_month='+selectedMonth+' and t_year = '+selectedYear+', null);

 }

 the call method for the example: getAllDates(June, 2010);

 when the query execute using command line with query: select t_date
 from finance where t_month='June' and t_year='2010';

 the result should be:
 7
 8

 but in the emulator I get only 8.

 Anybody ever got issue like this? This is because of what? Somebody
 please help me, 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 
 athttp://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed

2010-05-03 Thread Mark Murphy
Adrian Vintu wrote:
 Hi all,
 
 I am trying to run the rotation example from
 http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationTwo/
 
 I created an Eclipse project, added the files from the location above. I
 created an emulator with target 2.0.1 API level 6. Resolution is
 480x854. Abstracted LCD density is 240 (also tried with 160).
 
 For some reason, on rotation i get the Something wrong here, didn't
 expect com.commonsware.android.rotation.two to be resumed message.
 
 Did anyone get this thing running without the above warning?

I can reproduce your problem.

On Android 2.1, this has been downgraded to an informational message,
not a warning.

I'll look into this some more when I get a spare moment.

BTW, questions regarding the CommonsWare book examples are best asked on
the [cw-android] Google Group, so I don't accidentally miss them:

http://groups.google.com/group/cw-android

Thanks for pointing this out!

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

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

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


Re: [android-developers] Re: How to debug BadTokenException?

2010-05-03 Thread Mariano Kamp
My main issue is to find out what is really causing the BadTokenException.
Any way how to find out which code initiated the message that caused the
BadTokenException or which activity was expected to be running.

On Sun, Dec 20, 2009 at 1:03 PM, Chander Pechetty cspeche...@gmail.comwrote:

 As an example take the case of Market App. It doesn't give any toast
 or progress when you leave the app. Once the user leaves the app for
 whatever reason, only a notification is given if the download fails/
 succeeds.
 Any progress dialogs you have when you leave the app should be
 dismissed/cleaned up in the onPause. Depending on what kind of app
 yours is, you can either show a notification (may be from the service
 once the Task is completed, after it attempts several retries in case
 of error) using the NotificationManager, or I would just cancel the
 Task if I was using a AsyncTask.

 I wouldn't want a toast or progress result/or a force close  show up
 when I receive a call, or trying to use some other app; those make
 sense only when I am looking at your app.



 On Dec 19, 10:38 pm, Mariano Kamp mariano.k...@gmail.com wrote:
  Thanks for your help here.
 
  I reas the bug report, but I am not quite sure what to make of it and
 what
  the solution is.
 
  In my case the user enters username/password and then I show a progress
  monitor. When the user backs out or goes to home then I still want to
  display the result, at least when an error occurred.
 
  How is this to be accomplished?
 
  Can I somehow find out beforehand if I will run in this error and then
 use
  some other mean, say a toast, to at least notify the user that not all is
  good?
 
  On Mon, Nov 23, 2009 at 8:01 AM, Chander Pechetty cspeche...@gmail.com
 wrote:
 
   There are currently few issues logged around this bug:
  http://code.google.com/p/android/issues/detail?id=3953
 
   I don't know your specific case, but was easy to fix in my case, when
   I made sure that the dialogs/views/adapters that were being created
   are with the right context/activity.
   Pressing a back button usually finishes the activity, so if you have
   created for discussion sake created an static ListAdapter and passed
   it (this), an activity instance,
 
this static adapter can no longer be used for showing dialogs etc.
   with the previous contexts. This behaviour gets complex depending on
   the launch modes/flags you set when starting an activity, and also
   whether you handle back button events.
 
   So token
   android.os.binderpr...@431d28f0 is not valid; is your activity
   running?  means your activity instance is no longer in History stack,
   but your are trying to use it somewhere.
   Since there is no knowing when your activity got finished and the
   sequence of steps that caused it, depending on different modes, you
   get sporadic reports.
 
   -Chander
 
   On Nov 22, 1:23 pm, Mariano Kamp mariano.k...@gmail.com wrote:
Hey,
 
  I sporadically get bug reports with a BadTokenException.
 
  As I don't see my app in the stacktrace I am wondering how to find
 the
cause of this? Any idea?
 
Cheers,
Mariano
 
-- Android Version: sdk=3, release=1.5, inc=eng.root.20090719.200906
-- Memory free: 1.01MB total: 4.01MB max: 16.00MB
-- Custom ROM: Stock Android
-- NewsRob Version: 3.2.9/329
-- Stacktrace:(1178)
android.view.WindowManager$BadTokenException: Unable to add window --
   token
android.os.binderpr...@431d28f0 is not valid; is your activity
 running?
at android.view.ViewRoot.setView(ViewRoot.java:425)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:178)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:392)
at
  
 android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2674)
at
  
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2287)
at android.app.ActivityThread.access$1800(ActivityThread.java:112)
at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at
 
  
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 

[android-developers] Custom RatingBar

2010-05-03 Thread Ajay
Hi,
I wanted to use a different image for the rating bar. I tried to
do this by extending the RatingBar widget style.

?xml version=1.0 encoding=utf-8?
resources
 style
name=myRatingBar parent=@android:style/Widget.RatingBar
item name=android:progressDrawable@drawable/star_full/
item
item name=android:indeterminateDrawable@drawable/
star_full/item
 /style
/resources


But, the resultant rating bar had some additional bleeding effect.
The stars looked like they were bleeding and it was not the same as
the custom images I had added.
Also, how can we add the custom empty and half stars?

Thank you,
AJ

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed

2010-05-03 Thread Adrian Vintu
Hi Mark,

Thank you for your answer. Please let me (us) know if you have a solution
for this.

All the best,
Adrian Vintu


On Mon, May 3, 2010 at 2:16 PM, Mark Murphy mmur...@commonsware.com wrote:

 Adrian Vintu wrote:
  Hi all,
 
  I am trying to run the rotation example from
 
 http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationTwo/
 
  I created an Eclipse project, added the files from the location above. I
  created an emulator with target 2.0.1 API level 6. Resolution is
  480x854. Abstracted LCD density is 240 (also tried with 160).
 
  For some reason, on rotation i get the Something wrong here, didn't
  expect com.commonsware.android.rotation.two to be resumed message.
 
  Did anyone get this thing running without the above warning?

 I can reproduce your problem.

 On Android 2.1, this has been downgraded to an informational message,
 not a warning.

 I'll look into this some more when I get a spare moment.

 BTW, questions regarding the CommonsWare book examples are best asked on
 the [cw-android] Google Group, so I don't accidentally miss them:

 http://groups.google.com/group/cw-android

 Thanks for pointing this out!

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

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

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Disable hardware codecs

2010-05-03 Thread Uander
Hello   ,

I have a file a audio/3gp file that I can play in eclair-2.1 emulator but
its throwing error on my Zoom2
device  says Sorry , this player doesn't support this  type of audio file 
.

emulator will be using s/w codecs . while zoom2 has h/w codecs . The logic
of  MMM framework is like if h/w codecs are not present it should look for
s/w codec . if zoom2 is not finding h/w codec for my audio/3gp file , it
should search for s/w codec and play file , why does it fails with error ?

How to disable hardware acceleration of codecs ?

Please correct me If I am wrong .




Thanks :
Uander

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

[android-developers] Re: htc droid incredible

2010-05-03 Thread Sebastian
The HTC Incredible is a CDMA device, so it will NOT work in Italy. You
need a GSM-based phone, like the Nexus One (which has very similar
specs)

On May 3, 5:46 am, ko5tik kpriblo...@yahoo.com wrote:
 On May 2, 5:43 pm, Simone simone.russ...@gmail.com wrote:

  Just a couple of questions. If I buy the droid incredible, would I be
  able to:
  -use it in Italy

 Why not?  It surely can use all the mobile standards in place.

  -run my applications on it

 Ig this is compatible with android version - why not?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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] RelativeLayout bug ?

2010-05-03 Thread mbaroukh
Hi all.

I suppose it's not a bug but a works as designed but I found this to
be really frustrating.
The use case is simplified just to the point that is a problem for me.

Here is the first layout that works :
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=vertical

TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Test
android:gravity=center_vertical
/
/LinearLayout


and the layout that doesn't works :
?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=wrap_content

TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Test
android:gravity=center_vertical
android:layout_alignParentBottom=true
/
/RelativeLayout

In the first case, Test is written to the top of the screen.
In the second case, Test is written in the miiddle of the screen.

It seems, for me, that LinearLayout perfoems correctly.
That's not the case for RelativeLayout.
From my understanding, the two layout should rendre the samething.

Yes, if we remove alignParentBottom to the RelativeLayout case, it
works, but for what I wan't to do, I really need it.

So, does anybody knows if it is really a bug and maybe there is a
workaround or it is the expected behavior and eventually ... why ?

Thanks a lot !

Mike

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

2010-05-03 Thread Mark Murphy
mbaroukh wrote:
 So, does anybody knows if it is really a bug and maybe there is a
 workaround or it is the expected behavior and eventually ... why ?

If your goal is put a TextView at the top of the screen, either use
your existing LinearLayout, or:

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=wrap_content
TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Test
android:layout_alignParentTop=true
/
/RelativeLayout

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

Android Online Training: 10-14 May 2010: http://onlc.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: Retrieving the Json data into a list view...

2010-05-03 Thread Rahul
I could successfully get the Json values by using the method explained
by Jose...
Thanks to Jose once again. Now i m trying to display all the values of
the Json into a list view using the adapters. But i m getting a null
pointer exception while running the app... Can anyone tell me what the
problem is...
Here's the code...

public class AlertsPage extends Activity{
ListView lv;

@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.alerts);
lv=(ListView)findViewById(R.id.list);

   WebService webService = new WebService(http://
www.sumasoftware.com/alerts/GetAlerts.php);


MapString, String params = new HashMapString, 
String();
params.put(var, );
String response = webService.webGet(, params);

try
{
Type collectionType = new 
TypeTokenListAlerts(){}.getType();
ListAlerts alrt = new 
Gson().fromJson(response, collectionType);
Log.e(Alert,alrt.toString());
lv.setAdapter(new 
AlertsAdapter(getBaseContext(),alrt));
}
catch(Exception e)
{
Log.d(Error: , e.getMessage());
}
}
}




public class AlertsAdapter extends BaseAdapter {
private Context mContext;
private ListAlerts  alerts = new ArrayListAlerts();
public AlertsAdapter(Context context, ListAlerts alrt) {
 mContext = context;
 alerts = alrt;
}

@Override
public int getCount() {
// TODO Auto-generated method stub
return alerts.size();

}

@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return alerts.get(position);
}

@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}

@Override
public View getView(int position, View convertView, ViewGroup parent)
{
// TODO Auto-generated method stub
Activity activity = new Activity();
LayoutInflater inflater = activity.getLayoutInflater();
View rowView = inflater.inflate(R.layout.list_text, null);
JSONObject imageAndText = (JSONObject) getItem(position);
TextView textView = (TextView)
rowView.findViewById(R.id.last_build_stat);
try {
textView.setText((String)imageAndText.get(alerttext));
} catch (JSONException e) {
textView.setText(JSON Exception);
}

return rowView;
}

}


Plz tell me am i using the correct adapters and correct implementation
to display the values in list view???

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


[android-developers] how to lunch a activity from prefrence

2010-05-03 Thread Mohammad Siddiqui
Hi   everyone,

I want to lunch a actvitity when click on  a prefrence(inflated form
the xml ).
how we can do it


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: MapView does not work in HTC Hero

2010-05-03 Thread Reiny Song
thank you for your reply,

I am sure that I exported the signed application.

I have checked the application with the jarsigner in command line (Windows
XP),

and the result is jar verified

I have no idea about my problem so far...



2010/5/1 javame_android su...@softwebsolutions.com

 Hi,

 Did you signed your application?

 MapView won't even display in another simulator on other system if its
 not signed in the release mode.

 I am not sure but please make sure that it is signed and check whether
 it helps.



 Regards
 Sunil

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: Retrieving the Json data into a list view...

2010-05-03 Thread Rahul
Here's the log errors i m getting...

04-30 13:09:46.656: INFO/ActivityManager(584): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1000
cmp=com.WorldToyota/.Alerts }
04-30 13:09:50.417: ERROR/JSON(924): There was an error parsing the
JSON
04-30 13:09:50.417: ERROR/JSON(924): org.json.JSONException:
JSONArray[0] is not a JSONObject.
04-30 13:09:50.417: ERROR/JSON(924): at
org.json.JSONArray.getJSONObject(JSONArray.java:268)
04-30 13:09:50.417: ERROR/JSON(924): at
com.WorldToyota.AlertsAdd.retrieveJSONArray(AlertsAdd.java:30)
04-30 13:09:50.417: ERROR/JSON(924): at
com.WorldToyota.Alerts.onCreate(Alerts.java:20)
04-30 13:09:50.417: ERROR/JSON(924): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
04-30 13:09:50.417: ERROR/JSON(924): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
04-30 13:09:50.417: ERROR/JSON(924): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
04-30 13:09:50.417: ERROR/JSON(924): at
android.app.ActivityThread.access$2100(ActivityThread.java:116)
04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1794)
04-30 13:09:50.417: ERROR/JSON(924): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-30 13:09:50.417: ERROR/JSON(924): at
android.os.Looper.loop(Looper.java:123)
04-30 13:09:50.417: ERROR/JSON(924): at
android.app.ActivityThread.main(ActivityThread.java:4203)
04-30 13:09:50.417: ERROR/JSON(924): at
java.lang.reflect.Method.invokeNative(Native Method)
04-30 13:09:50.417: ERROR/JSON(924): at
java.lang.reflect.Method.invoke(Method.java:521)
04-30 13:09:50.417: ERROR/JSON(924): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
04-30 13:09:50.417: ERROR/JSON(924): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
04-30 13:09:50.417: ERROR/JSON(924): at
dalvik.system.NativeStart.main(Native Method)
04-30 13:09:50.688: ERROR/JSON(924): There was an error creating the
JSONObject
04-30 13:09:50.688: ERROR/JSON(924): org.json.JSONException:
JSONObject[suggestions] not found.
04-30 13:09:50.688: ERROR/JSON(924): at
org.json.JSONObject.get(JSONObject.java:287)
04-30 13:09:50.688: ERROR/JSON(924): at
org.json.JSONObject.getJSONArray(JSONObject.java:362)
04-30 13:09:50.688: ERROR/JSON(924): at
com.WorldToyota.AlertsAdd.retrieveJSONArray(AlertsAdd.java:41)
04-30 13:09:50.688: ERROR/JSON(924): at
com.WorldToyota.Alerts.onCreate(Alerts.java:20)
04-30 13:09:50.688: ERROR/JSON(924): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
04-30 13:09:50.688: ERROR/JSON(924): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
04-30 13:09:50.688: ERROR/JSON(924): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
04-30 13:09:50.688: ERROR/JSON(924): at
android.app.ActivityThread.access$2100(ActivityThread.java:116)
04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1794)
04-30 13:09:50.688: ERROR/JSON(924): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-30 13:09:50.688: ERROR/JSON(924): at
android.os.Looper.loop(Looper.java:123)
04-30 13:09:50.688: ERROR/JSON(924): at
android.app.ActivityThread.main(ActivityThread.java:4203)
04-30 13:09:50.688: ERROR/JSON(924): at
java.lang.reflect.Method.invokeNative(Native Method)
04-30 13:09:50.688: ERROR/JSON(924): at
java.lang.reflect.Method.invoke(Method.java:521)
04-30 13:09:50.688: ERROR/JSON(924): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
04-30 13:09:50.688: ERROR/JSON(924): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
04-30 13:09:50.688: ERROR/JSON(924): at
dalvik.system.NativeStart.main(Native Method)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: [Help] How to get thumbnail picture from HTC Hero?

2010-05-03 Thread Vincent Tsao
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

[android-developers] draw a 2d marker on a openGL scene

2010-05-03 Thread Paolo
Hi guys!

I've a problem and I'm not able to solve at the moment.

I have realized a grid with openGL on a GLSurfaceview. This grid
rotates at 360° on all the aces using the orientation sensors.

Now I'd like to put over it some markers at specified coordinates,
such as 2D objects, as if they were attached to the grid, because they
have to rotate together to the grid.

How how I can make it?

Thanks.

Paolo

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

2010-05-03 Thread Alain
I have a string-array with 2000 items, each item can be 60 characters
long, the program crashes when it tries to load the complete string-
array. Then I split the string-array in 4 sections, and the program
loads each section with no problem.

My question, what's the max number of items in a string array? Is that
device or sdk level dependent? Can it be changed?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: [Help] How to get thumbnail picture from HTC Hero?

2010-05-03 Thread Streets Of Boston
create a thumbnail by myself?
Yes.
I found that thumbnails are not always generated.

On May 3, 4:39 am, Vincent Tsao caojunvinc...@gmail.com wrote:
 i'm trying to fetch a  thumbnail with picture URI using these code below:

         long id = ContentUris.parseId(selectedImageURI);
         String[] projection = { MediaStore.Images.Thumbnails.DATA };
         Cursor c =
 Images.Thumbnails.queryMiniThumbnail(getContentResolver(),
                 id, Images.Thumbnails.MINI_KIND, projection);

 unfortunately, it's always return me the null cursor. finally, i found HTC
 hero never generate picture thumbnail under \sdcard\DCIM\.thumbnails,  but
 only create a picture under this folder: \sdcard\DCIM\100MEDIA, which
 means i can only get the full size picture. What's am i supposed to do?
 create a thumbnail by myself?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Can I use OpenGL to make Bitmap without GLSurfaceView

2010-05-03 Thread Streets Of Boston
Nope, it's not lightweight.. at all.
And the cred is not mine. I got the code snippet from somewhere else,
but i don't remember from where... I think from anddev.org.

On May 3, 2:44 am, Robert Green rbgrn@gmail.com wrote:
 Awesome that you worked that out - but man... that sure isn't
 lightweight!  I bet you could get substantial performance gains doing
 that conversion natively and passing the processed array up to java.

 On May 2, 4:34 pm, Streets Of Boston flyingdutc...@gmail.com wrote:





  Below is a snippet of code that turns a buffer from GL into a buffer
  that can be used by a Bitmap.
  I'm not sure if you can get a buffer from GL without been having
  showing it before or if this is what you're exactly looking for.
  But here goes anyway :-)

  

  public void savePixels(int x, int y, int w, int h, GL10 gl) {
          if (gl == null)
                  return;

          // synchronized (this) {
          // if (mSavedBM != null) {
          // mSavedBM.recycle();
          // mSavedBM = null;
          // }
          // }

          int b[] = new int[w * (y + h)];
          int bt[] = new int[w * h];
          IntBuffer ib = IntBuffer.wrap(b);
          ib.position(0);
          gl.glReadPixels(x, 0, w, y + h, GL10.GL_RGBA,GL10.GL_UNSIGNED_BYTE,
  ib);

          for (int i = 0, k = 0; i  h; i++, k++) {// remember, that OpenGL
  bitmap
                                          // is incompatible with
                                          // Android bitmap
                                             // and so, some correction need.
                  for (int j = 0; j  w; j++) {
                          int pix = b[i * w + j];
                          int pb = (pix  16)  0xff;
                          int pr = (pix  16)  0x00ff;
                          int pix1 = (pix  0xff00ff00) | pr | pb;
                          bt[(h - k - 1) * w + j] = pix1;
                  }
          }

          Bitmap sb = Bitmap.createBitmap(bt, w, h, Bitmap.Config.ARGB_);
          synchronized (this) {
                  mSavedBM = sb;
          }}

  

  On May 2, 2:45 pm, SChaser crotalistig...@gmail.com wrote:

   I would like to be able to use OpenGL in the Android to render into a
   bitmap (or any other sort of buffer I can turn into one), without
   actually displaying a GLSurfaceView.

   The purpose is to dynamically create very complex images using OpenGL,
   and then drawing those images on the canvas of a MapView.

   I have tried overlaying a translucent GLSurfaceView over a MapView, my
   preferred approach, but it has some problems:

   1) I have complex menus I need to display from either the MapView or
   the GLSurfaceView. I have been doing this using a ListView with its
   own activity. Unfortunately, that activity pushes the MapView down the
   stack. The result is a bit of flickering when the ListView activity
   finishes, popping the MapView back to the top. Even worse, if I use
   the ListView to overlay the GLSurfaceView (giving it the same complex
   menu capabilities), when it finishes, the GLSurfaceView reappears but
   the MapView doesn't display.

   2)As soon as the GLSurfaceView is created, the MapView stops fetching
   and rendering tiles. There seems to be no way to know when the MapView
   is complete, so I have to delay an arbitrary interval before creating
   the surfaceview.

   3) When the GLSurfaceView is present, the MapView's built-in user
   interface functions are obscured.

   Anyone know if there is a way around any of these problems?

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

Re: [android-developers] Re: Retrieving the Json data into a list view...

2010-05-03 Thread Jose Gomez
Rahul
As a followup go to my site again I have posted another tutorial to do this

http://www.josecgomez.com


Thanks!

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, May 3, 2010 at 9:20 AM, Rahul rahulvarma.kalidindi0...@gmail.comwrote:

 Here's the log errors i m getting...

 04-30 13:09:46.656: INFO/ActivityManager(584): Starting activity:
 Intent { act=android.intent.action.MAIN
 cat=[android.intent.category.LAUNCHER] flg=0x1000
 cmp=com.WorldToyota/.Alerts }
 04-30 13:09:50.417: ERROR/JSON(924): There was an error parsing the
 JSON
 04-30 13:09:50.417: ERROR/JSON(924): org.json.JSONException:
 JSONArray[0] is not a JSONObject.
 04-30 13:09:50.417: ERROR/JSON(924): at
 org.json.JSONArray.getJSONObject(JSONArray.java:268)
 04-30 13:09:50.417: ERROR/JSON(924): at
 com.WorldToyota.AlertsAdd.retrieveJSONArray(AlertsAdd.java:30)
 04-30 13:09:50.417: ERROR/JSON(924): at
 com.WorldToyota.Alerts.onCreate(Alerts.java:20)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1123)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2364)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2417)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.app.ActivityThread.access$2100(ActivityThread.java:116)
 04-30 13:09:50.417: ERROR/JSON(924): at android.app.ActivityThread
 $H.handleMessage(ActivityThread.java:1794)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.os.Looper.loop(Looper.java:123)
 04-30 13:09:50.417: ERROR/JSON(924): at
 android.app.ActivityThread.main(ActivityThread.java:4203)
 04-30 13:09:50.417: ERROR/JSON(924): at
 java.lang.reflect.Method.invokeNative(Native Method)
 04-30 13:09:50.417: ERROR/JSON(924): at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-30 13:09:50.417: ERROR/JSON(924): at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:791)
 04-30 13:09:50.417: ERROR/JSON(924): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
 04-30 13:09:50.417: ERROR/JSON(924): at
 dalvik.system.NativeStart.main(Native Method)
 04-30 13:09:50.688: ERROR/JSON(924): There was an error creating the
 JSONObject
 04-30 13:09:50.688: ERROR/JSON(924): org.json.JSONException:
 JSONObject[suggestions] not found.
 04-30 13:09:50.688: ERROR/JSON(924): at
 org.json.JSONObject.get(JSONObject.java:287)
 04-30 13:09:50.688: ERROR/JSON(924): at
 org.json.JSONObject.getJSONArray(JSONObject.java:362)
 04-30 13:09:50.688: ERROR/JSON(924): at
 com.WorldToyota.AlertsAdd.retrieveJSONArray(AlertsAdd.java:41)
 04-30 13:09:50.688: ERROR/JSON(924): at
 com.WorldToyota.Alerts.onCreate(Alerts.java:20)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1123)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2364)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2417)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.app.ActivityThread.access$2100(ActivityThread.java:116)
 04-30 13:09:50.688: ERROR/JSON(924): at android.app.ActivityThread
 $H.handleMessage(ActivityThread.java:1794)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.os.Looper.loop(Looper.java:123)
 04-30 13:09:50.688: ERROR/JSON(924): at
 android.app.ActivityThread.main(ActivityThread.java:4203)
 04-30 13:09:50.688: ERROR/JSON(924): at
 java.lang.reflect.Method.invokeNative(Native Method)
 04-30 13:09:50.688: ERROR/JSON(924): at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-30 13:09:50.688: ERROR/JSON(924): at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:791)
 04-30 13:09:50.688: ERROR/JSON(924): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
 04-30 13:09:50.688: ERROR/JSON(924): at
 dalvik.system.NativeStart.main(Native Method)

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Re: Network Problems when using AVP with Google API

2010-05-03 Thread Christopher
The answer was to turn off the Windows Firewall on my local computer
and then our Network Admin had to watch for some blocks getting sent
from my IP. He then had to open up a few things to allow the Maps to
get through.

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

2010-05-03 Thread Jose Gomez
Are you using String[] or ListString ? If using ListString it should
basically be unlimited.
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, May 3, 2010 at 9:47 AM, Alain aarn...@gmail.com wrote:

 I have a string-array with 2000 items, each item can be 60 characters
 long, the program crashes when it tries to load the complete string-
 array. Then I split the string-array in 4 sections, and the program
 loads each section with no problem.

 My question, what's the max number of items in a string array? Is that
 device or sdk level dependent? Can it be changed?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] VideoView transitions during playback

2010-05-03 Thread Abhi
Hello,

I am trying to insert some transition effects during video playback on
a VideoView. Is there a way to reduce the brightness of the playing
video or create a fade in/out effect? I am wondering what I can do on
the VideoView from the available APIs to achieve the above.

Please help

Thanks

Abhi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed

2010-05-03 Thread Mark Murphy
Adrian Vintu wrote:
 Hi Mark,
 
 Thank you for your answer. Please let me (us) know if you have a
 solution for this.

The solution appears to be: ignore the message. Other apps, such as the
built-in Launcher (home screen), Calculator, Contacts, and Music apps
exhibit the same behavior.

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

_Beginning Android 2_ from Apress Now Available!

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


[android-developers] Re: Disable hardware codecs

2010-05-03 Thread Deva R
[+porting list]
you can delete  ./system/etc/01_Vendor_ti_omx.cfg in your file system,
so as to use SW codecs from PVOMX components (picked up by
./system/etc/pvplayer.cfg).

On Mon, May 3, 2010 at 6:23 PM, Uander uandro...@gmail.com wrote:
 Hello   ,

 I have a file a audio/3gp file that I can play in eclair-2.1 emulator but
 its throwing error on my Zoom2
 device  says Sorry , this player doesn't support this  type of audio file 
 .

 emulator will be using s/w codecs . while zoom2 has h/w codecs . The logic
 of  MMM framework is like if h/w codecs are not present it should look for
 s/w codec . if zoom2 is not finding h/w codec for my audio/3gp file , it
 should search for s/w codec and play file , why does it fails with error ?

 How to disable hardware acceleration of codecs ?

 Please correct me If I am wrong .




 Thanks :
 Uander

 --
 You received this message because you are subscribed to the Google Groups
 android-platform group.
 To post to this group, send email to android-platf...@googlegroups.com.
 To unsubscribe from this group, send email to
 android-platform+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/android-platform?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: MapView does not work in HTC Hero

2010-05-03 Thread Nicholas Albion
Do you have a Google maps API key that coresponds to MD5 certificate
fingerprint used to sign the app?

http://code.google.com/android/add-ons/google-apis/mapkey.html
http://code.google. com/android/maps-api-signup.html

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

2010-05-03 Thread adag
Hello Mohammad,

If you are talking about the preference activated from the xml using
activity please refer the api demos that is provided.
developer.android.com/resources/samples/ApiDemos/res/xml/
advanced_preferences.html
The example are quite self explanatory and covers all the possible
usage of preference even how to launch a new activity from it.

You can then use it as you require.

Hope this would help.

Please let me know if you need any more clarification.
ag

On May 3, 6:15 pm, Mohammad Siddiqui siddiqui.m...@gmail.com wrote:
 Hi   everyone,

 I want to lunch a actvitity when click on  a prefrence(inflated form
 the xml ).
 how we can do it

 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 
 athttp://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: Retrieving the Json data into a list view...

2010-05-03 Thread Brion Emde
Your problems are right up on top of your log. It is not correctly
parsing your JSONObject. As I said earlier, you need to figure out
your parsing.

I took a different approach to writing my own adapter, although I
think I did that too, in some iteration or other. I create a generic
JSONArrayList which I can plug right into an ArrayAdapter. Also, it
looks like you might be doing a lot of copying. My JSONArrayList uses
an embedded JSONArray and does not do any copying. Maybe you'll spot a
tip or something. So, for what it's worth:

 JSONArrayList.java 

package com.eyebrowsoftware.gobeering;

import java.util.AbstractSequentialList;
import java.util.Collection;
import java.util.Iterator;
import java.util.ListIterator;
import java.util.NoSuchElementException;

import org.json.JSONArray;
import org.json.JSONException;

public class JSONArrayListT extends AbstractSequentialListT {

JSONArray mArray;

public JSONArrayList() {
super();
mArray = new JSONArray();
}

public JSONArrayList(String jss) {
super();
try {
mArray = new JSONArray(jss);
} catch (JSONException e) {
e.printStackTrace();
mArray = new JSONArray();
}
}

public JSONArrayList(JSONArray a) {
super();
mArray = (a == null) ? new JSONArray() : a;
}


public JSONArray getArray() {
return mArray;
}

public String toString() {
return mArray.toString();
}

/**
 * Return a separator-separated string containing all the members in
the array
 * @param separator - the separator to appear btw the parts of the
output string
 * @return a new string with the array components separated by
separator
 */
public String join(String separator) {
try {
return mArray.join(separator);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}

@Override
public void add(int location, T object) {
int len = mArray.length();
if(location  0 || location  len)
throw new IndexOutOfBoundsException();
try {
for(int i = len; i  location; --i) {
mArray.put(i, mArray.getString(i-1));
}
mArray.put(location, object);
} catch (JSONException e) {
e.printStackTrace();
}
}

@Override
public boolean addAll(int arg0, Collection? extends T arg1) {
if(arg0  0)
throw new IndexOutOfBoundsException();
for(T o : arg1) {
try {
mArray.put(arg0++, o);
} catch (JSONException e) {
e.printStackTrace();
throw new IllegalArgumentException();
}
}
return true;
}

@SuppressWarnings(unchecked)
@Override
public T get(int location) {
if(location = mArray.length())
throw new IndexOutOfBoundsException();
return (T) mArray.opt(location);
}

private class MyIteratorE implements IteratorE {

int pos = -1;

@Override
public boolean hasNext() {
return pos + 1  mArray.length();
}

@SuppressWarnings(unchecked)
@Override
public E next() {
if(pos + 1 = mArray.length())
throw new NoSuchElementException();
return (E) mArray.opt(++pos);
}

@Override
public void remove() {
throw new UnsupportedOperationException();
}

}
@Override
public IteratorT iterator() {
return new MyIteratorT();
}

@Override
public int lastIndexOf(Object object) {
for(int i = mArray.length()-1; i = 0; --i) {
if(mArray.optString(i).equals(object))
return i;
}
return -1;
}

@Override
public ListIteratorT listIterator(int location) {
return new MyListIteratorT(location);
}

@Override
public T remove(int location) {
throw new 

[android-developers] Re: accessing and changing Sync setting for android 1.5, 1.6 and more

2010-05-03 Thread zehunter


On 1 mai, 14:27, Mark Murphy mmur...@commonsware.com wrote:
 remy berrebi wrote:
  it's very sad.
  i still not understand the fact that android is so close about system
  setting. if we can not interact with system by ourself, the possibility
  to make very interesting apk is very low :-(

  let's all make RSS reader and clock widget and nothing more :-(

 There are RSS reader and clock widget applications on the market for
 Android, but it is a very low percentage. Other developers seem to be
 able to think of applications, beyond those, that can be written.


sorry, i was a little upset and furious about not having the
possibility to make what i want to do :-(

i know many interesting apps are available, but when you touch on some
part of the system, like sync setting you can't do nothing :-(

the permission signatureOrSystem should also let user able to sign
their apps with android root certificate for example, or something, to
let dev guy able to do think about setting... and once again,
disclaimer are there to warm user about what application try to do...

  i think i will make my application for Root device only, as i read on
  root you have no restriction anymore.

 No, the restriction will still be there. However, you can write your
 own firmware to change whatever you want.


really?

  but if google want to be so open mind they really need to improve
  access and permission on android (even old version like 1.6), and not
  remove them one after another :-(

 I do not recall content://sync/settings ever being part of the SDK.
 Would you care to demonstrate that this *was* part of the SDK and
 therefore something developers should be using?

 If developers were not supposed to be using it in the first place,
 please do not complain about it being removed.

 http://www.androidguys.com/2009/12/14/code-pollution-reaching-past-th...


sorry, i'm not able to show you, but i found some explanation about
accessing and changing setting available on sdk 1.1

but didn't find the page any more :-(

but my main gaol is that : even if it's not implemented, we should be
able to improve the system with dev request.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Device Seeding Program for Top Android Market Developers

2010-05-03 Thread heedrox

TreKing: for those of us (including me) that have not received the N1,
I think we still would like to hear ocasionally the sentence N1
received in... so as we can see that N1s are still being sent, and
ours will arrive (soon?).

I don't know if I'll have to wait one week or three or six more, but I
will get very nervous if I don't see movement in this list, and I
would feel very alone in this whole universe...

Hope you understand. 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: Max size of string array

2010-05-03 Thread Alain
I am using String[]

String[] items = getResources().getStringArray(R.array.arrayname);

I will try ListString

Why would String[] be limited in the number of items?

Thanks

On May 3, 10:34 am, Jose Gomez j...@josecgomez.com wrote:
 Are you using String[] or ListString ? If using ListString it should
 basically be unlimited.
 Sincerely
 Jose C Gomez

 http://www.josecgomez.com



 On Mon, May 3, 2010 at 9:47 AM, Alain aarn...@gmail.com wrote:
  I have a string-array with 2000 items, each item can be 60 characters
  long, the program crashes when it tries to load the complete string-
  array. Then I split the string-array in 4 sections, and the program
  loads each section with no problem.

  My question, what's the max number of items in a string array? Is that
  device or sdk level dependent? Can it be changed?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 
 athttp://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Max size of string array

2010-05-03 Thread Jose Gomez
Not quite sure how they handle regular old arrays in the implementation of
android. But List has never given me any problems.

Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, May 3, 2010 at 11:49 AM, Alain aarn...@gmail.com wrote:

 I am using String[]

 String[] items = getResources().getStringArray(R.array.arrayname);

 I will try ListString

 Why would String[] be limited in the number of items?

 Thanks

 On May 3, 10:34 am, Jose Gomez j...@josecgomez.com wrote:
  Are you using String[] or ListString ? If using ListString it should
  basically be unlimited.
  Sincerely
  Jose C Gomez
 
  http://www.josecgomez.com
 
 
 
  On Mon, May 3, 2010 at 9:47 AM, Alain aarn...@gmail.com wrote:
   I have a string-array with 2000 items, each item can be 60 characters
   long, the program crashes when it tries to load the complete string-
   array. Then I split the string-array in 4 sections, and the program
   loads each section with no problem.
 
   My question, what's the max number of items in a string array? Is that
   device or sdk level dependent? Can it be changed?
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 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.comandroid-developers%2bunsubscr...@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] Listen to the CheckBox event in a ListActivity

2010-05-03 Thread dillipk
Hello,
  I have list of Check boxes in a ListActivity.

1) How do I select/unselect the check box in the ListActivity?
2) How do I get the state of a particular checkbox in a list of
checkboxes?
3) How do I listen to the event when a checkbox is selcted/unselected?


I use the below code:

 setListAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_multiple_choice,
GENRES));

   final ListView listView = getListView();
   listView.setItemsCanFocus(false);
   listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);


Thanks in advance..

Regards,
DK

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

2010-05-03 Thread Mark Murphy
dillipk wrote:
   I have list of Check boxes in a ListActivity.
 
 1) How do I select/unselect the check box in the ListActivity?

getListView().setItemChecked(), as described in the Android developer
documentation:

http://developer.android.com/reference/android/widget/ListView.html#setItemChecked(int,%20boolean)

 2) How do I get the state of a particular checkbox in a list of
 checkboxes?

getListView().isItemChecked(), as described in the Android developer
documentation:

http://developer.android.com/reference/android/widget/ListView.html#isItemChecked(int)

 3) How do I listen to the event when a checkbox is selcted/unselected?

You don't, as far as I know.

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

Android Consulting: http://commonsware.com/consulting

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


[android-developers] Re: Problem in renaming file in Sdcard

2010-05-03 Thread Thilo-Alexander Ginkel
On May 3, 9:23 am, brijesh masrani masrani.brij...@gmail.com wrote:
 I want to rename a file in sdcard using program, i am not able to do that
 using

 String[] prog ={mv HArdcore.chm h_ardcore.chm};

 Process p = Runtime.getRuntime().exec(prog);

 so if anyone knows how to do that than please reply.

http://d.android.com/reference/java/io/File.html#renameTo(java.io.File)

Regards,
Thilo

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

2010-05-03 Thread Romain Guy
It's unfortunately a working as expected, although I'd agree that
the expected is surprising. If you read your layout you will realize
it does not make much sense:

- The container is as tall as its child
- The child is as tall as its content
- You tell the child to center its content (which is meaningless since
both are the same height)
- In the case of RelativeLayout you tell the child to be aligned with
the parent's bottom, which is meaningless since the container and the
child have the same height already

What happens is when RL sees align child to bottom, it tries to do
exactly that and grows to take as much space as available, and then
aligns your child to the bottom.

Your two layouts are definitely NOT supposed to be equivalent.

On Mon, May 3, 2010 at 5:57 AM, mbaroukh mike.baro...@gmail.com wrote:
 Hi all.

 I suppose it's not a bug but a works as designed but I found this to
 be really frustrating.
 The use case is simplified just to the point that is a problem for me.

 Here is the first layout that works :
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
    android:layout_width=fill_parent
    android:layout_height=wrap_content
    android:orientation=vertical

                TextView
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:text=Test
                        android:gravity=center_vertical
                /
 /LinearLayout


 and the layout that doesn't works :
 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
 android
    android:layout_width=fill_parent
    android:layout_height=wrap_content

                TextView
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:text=Test
                        android:gravity=center_vertical
                        android:layout_alignParentBottom=true
                /
 /RelativeLayout

 In the first case, Test is written to the top of the screen.
 In the second case, Test is written in the miiddle of the screen.

 It seems, for me, that LinearLayout perfoems correctly.
 That's not the case for RelativeLayout.
 From my understanding, the two layout should rendre the samething.

 Yes, if we remove alignParentBottom to the RelativeLayout case, it
 works, but for what I wan't to do, I really need it.

 So, does anybody knows if it is really a bug and maybe there is a
 workaround or it is the expected behavior and eventually ... why ?

 Thanks a lot !

 Mike

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


[android-developers] Re: Prescale Background Example / Speeding up WebViews

2010-05-03 Thread Rich
Anybody using this approach?

R

On Apr 29, 1:35 pm, Rich miser...@gmail.com wrote:
 The groups site buried this before it was visible yesterday, I'm gonna
 bump it again and hope Romain sees it..

 If it's worth mentioning during a Google I/O talk, probably worth
 having some confirmed example code on the web then, right? :)

 Rich

 On Apr 28, 5:20 pm, Rich miser...@gmail.com wrote:





  I've created a custom ViewGroup (based off of the Launcher) that
  allows paging scrolls between some WebViews. Problem is that it
  doesn't scroll as smoothly as I want it to. I've been following Romain
  Guy's 2008 advice, but I don't see any massive improvements. Is it
  because I am using WebViews, or am I just doing the prescaling wrong?
  This is my code:

                   Bitmap originalImage =
  BitmapFactory.decodeResource(getResources(), R.drawable.redbg);

                   originalImage = Bitmap.createScaledBitmap(
                               originalImage,          // bitmap to resize
                               ((WindowManager)
  getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getWidth(),   
       //
  new width
                               ((WindowManager)
  getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getHeight(),  
       //
  new height
                               true);                  // bilinear filtering

                   getWindow().setBackgroundDrawable(new
  BitmapDrawable(originalImage));

  called from onCreate. Is the right?

  If not, what can I do to fix it? If not, what else can I do to speed
  up the scrolling?

  Thanks so much!
  Rich

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

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


[android-developers] ADB Device offline - HTC Desire, Win 7 64bit

2010-05-03 Thread Sebastian Kleinau
Hello,
I use a HTC Desire on Windows 7 64bit with latest Android SDK and
Eclipse.
When I enabled USB Debugging, Windows couldn't find a driver für ADB.
Hinting it manually to C:\...\SDK\usb_driver\ didn't work - no drivers
found there by Windows.
Installing HTC Sync also installed a driver for ADB.
I can now use adb devices and see a device HT offline whenever
my phone is plugged in.
I rebooted pc  phone, enabled/disabled/enabled/... debug mode on
phone, restarted adb via kill-/start-server.
It's not working.
I don't even manage to get HTC Sync to recognize the phone.
Please help me.

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


[android-developers] Re: Max size of string array

2010-05-03 Thread niko20
Check your logcat to see if you have out of memory errors. Java Dalvik
programs are hard limited to 16Megs.

-niko

On May 3, 10:53 am, Jose Gomez j...@josecgomez.com wrote:
 Not quite sure how they handle regular old arrays in the implementation of
 android. But List has never given me any problems.

 Sincerely
 Jose C Gomez

 http://www.josecgomez.com





 On Mon, May 3, 2010 at 11:49 AM, Alain aarn...@gmail.com wrote:
  I am using String[]

  String[] items = getResources().getStringArray(R.array.arrayname);

  I will try ListString

  Why would String[] be limited in the number of items?

  Thanks

  On May 3, 10:34 am, Jose Gomez j...@josecgomez.com wrote:
   Are you using String[] or ListString ? If using ListString it should
   basically be unlimited.
   Sincerely
   Jose C Gomez

  http://www.josecgomez.com

   On Mon, May 3, 2010 at 9:47 AM, Alain aarn...@gmail.com wrote:
I have a string-array with 2000 items, each item can be 60 characters
long, the program crashes when it tries to load the complete string-
array. Then I split the string-array in 4 sections, and the program
loads each section with no problem.

My question, what's the max number of items in a string array? Is that
device or sdk level dependent? Can it be changed?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252Bu 
  nsubscr...@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.comandroid-developers%2Bunsubs
cr...@googlegroups.com
   For more options, visit this group athttp://
  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.comandroid-developers%2Bunsubs 
  cr...@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 
 athttp://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: Development and debugging tools

2010-05-03 Thread Sandy
Can someone please help answer these questions?

On Apr 29, 2:41 pm, Sandy snarr...@gmail.com wrote:
 I'm trying to figure out a way to do the following in android,
 appreciate any help on this.

 1. How to generate a Full Java stack trace (basically thread stack) in
 Android. In J2SE, we use to use something like this -  send a signal
 to the JVM; the JVM generates a stack trace for you; or we can also
 usedebuggingtools or Java API calls like Thread.dumpStack. What are
 the android equivalents to get the same output?
 .
 2. How to generate a java heap dump? And are there any tools to
 analyze the heap dumps ?

 3. Does thread and heap dump be generated if the Application crashes
 due to a segment violation ? Where does the core files be generated?

 4. Are there any profiling APIs in android APIs that will allow to
 measure the UI performance and responsiveness (basically times taken
 to launch an activity/application and also times taken to scroll a
 list)?

 5. Is there a tool similar to hprof that is available in J2SE for CPU
 usage, heap allocation statistics etc?

 6. Tool on GC activities..

 Thanks in advance,
 Sandy

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Which Intent Flags when setting PendingIntents in multiple app widget scenario?

2010-05-03 Thread westmeadboy
FLAG_ACTIVITY_CLEAR_TOP also seems to work. In this case, onCreate is
called instead of onNewIntent.

Unlike FLAG_ACTIVITY_SINGLE_TOP, this helps in the situation where a
secondary activity is currently on top of the stack of that task. I
really need to make sure the main activity is displayed.

I suppose the drawback is that the activity will be reinitialised each
time.

On Apr 30, 4:20 pm, westmeadboy westmead...@yahoo.co.uk wrote:
 Excellent, that works. Thanks Mark.

 On Apr 30, 4:09 pm, Mark Murphy mmur...@commonsware.com wrote:





  westmeadboy wrote:
   I have one WidgetProvider but expect the user to have multiple
   instances of the widget on the home screen.

   When the user clicks on the widget, an intent is fired to start an
   activity A passing a String extra (which is specific to that instance
   of the app widget).

   Everything works fine unless the activity is already running, in which
   case the activity is shown in its previous state (and so the intent
   extra data is ignored).

   I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK)
   but they don't seem to help.

  Try FLAG_ACTIVITY_SINGLE_TOP and then override onNewIntent() in your
  activity -- you should get the extra that way.

 http://developer.android.com/reference/android/app/Activity.html#onNe...)

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

  Android Training in US: 14-18 June 2010:http://bignerdranch.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 
  athttp://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 
 athttp://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: MapView does not work in HTC Hero

2010-05-03 Thread Paul Turchenko
Make sure you use different mapApi keys for emulator and real device
because it seems that you've obtained certificatie for debug keystore
only.

On May 1, 7:17 am, Reiny Song reiny.s...@gmail.com wrote:
 Hello,

 I have a MapView (in MapActivity), and it works in my simulator.

 The google map and the overlay I made are showed in simulator screen

 After installing in HTC Hero,

 the overlay is showed in phone screen, but google map is not showed in phone
 screen.

 I have no idea about the reason.

 could anyone answer me?

 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 
 athttp://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: Listen to the CheckBox event in a ListActivity

2010-05-03 Thread dillipk
Hi Mark,
  Thank you so much for your info.. great to know this.. much easier
than I thought..

Regards,
DK

On May 3, 12:01 pm, Mark Murphy mmur...@commonsware.com wrote:
 dillipk wrote:
    I have list of Check boxes in a ListActivity.

  1) How do I select/unselect the check box in the ListActivity?

 getListView().setItemChecked(), as described in the Android developer
 documentation:

 http://developer.android.com/reference/android/widget/ListView.html#s...)

  2) How do I get the state of a particular checkbox in a list of
  checkboxes?

 getListView().isItemChecked(), as described in the Android developer
 documentation:

 http://developer.android.com/reference/android/widget/ListView.html#i...)

  3) How do I listen to the event when a checkbox is selcted/unselected?

 You don't, as far as I know.

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

 Android Consulting:http://commonsware.com/consulting

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Is Google working on the Bluetooth bug? Any estimated date of completion?

2010-05-03 Thread frankentux
http://stackoverflow.com/questions/2661932
http://pastebin.org/199621

could also be interesting

On May 2, 2:32 am, DonFrench dcfre...@gmail.com wrote:
 Nexus One.  No experience with spica.

 On May 1, 6:35 am, frankentux cfarrell1...@googlemail.com wrote:

  My device is a i5700 Samsung spica. The stackoverflow links and the
  logcats i pasted to pastebin.com (again, see my last post above) all
  relate to the issue on the spica. Do you have a similar issue with a
  spica?

  On 1 Mai, 00:13, dan raaka danra...@gmail.com wrote:

   is the device being referred here Spica (i5700)?

   -Dan

   On Fri, Apr 30, 2010 at 12:10 PM, DonFrench dcfre...@gmail.com wrote:
I am not sure if it is the same issue but it sounds related.  My app
was eventually able to connect to the device I was having trouble with
but only after I manually unpaired it.  I never deliberately paired it
in the first place and I was never asked for a pin during the time it
was failing to connect.  The device had apparently been automatically
paired by Android when it was first detected, as are other nearby
laptops and phones and PDAs.   After unpairing it, I did not re-pair
through the Android utility but ran my app again and attempted to
connect to it, at which time I was prompted to enter the pin and to
pair.  This request to pair did not come directly from my code but
resulted from a call to BluetoothSocket.connect( ).  At this point it
successfully connected and continues to connect.  So it seems like the
automatic pairing does something that prevents later connection.  I
wonder if once it is automatically paired without a pin, future
attempts to connect recognize that it has been paired but doesn't
recognize that no pin was ever requested and so fails for lack of a
valid pin.  Just a guess.

On Apr 29, 9:21 am, frankentux cfarrell1...@googlemail.com wrote:
 Is this related to:

http://stackoverflow.com/questions/2661932/problem-with-bluetooth-on-...

   http://pastebin.org/191806http://pastebin.org/191824http://pastebin.o...

 It sounds like the same issue...

 On Apr 29, 2:09 am, DonFrench dcfre...@gmail.com wrote:

  (sorry, premature Send of previous message)

  As I was saying, the two devices have the same name but different 
  MAC
  addresses.  Whether this was related to the problem I am not sure.
  But simply unpairing the device that would not connect solved the
  problem.  It re-paired the next time my code tried to connect and 
  from
  then on I could connect to either device without doing any more
  unpairing.

  On Apr 28, 5:03 pm, DonFrench dcfre...@gmail.com wrote:

   Update to this problem:  I discovered that the device that could 
   not
   be connected to had been paired at some time in the past.  Both
   devices have the same name but different MAC

   On Apr 24, 4:30 pm, DonFrench dcfre...@gmail.com wrote:

There is an apparentbugin theBluetoothservice discovery code, as
has been mentioned by several people on several forums.  The 
upshot
is
that the BluetoothSocket.connect( ) method consistently fails to
discover a valid SPP service on some devices that are 
discoverable
with non-Android devices while it consistently succeeds to 
discover
the SPP service on seemingly identical devices.  Obviously, the 
two
devices are not identical but the fact is that I manufacture two
such
devices and there is nothing obviously different about them.  I 
can
consistently connect to both devices from a Windows Mobile app. 
  I
hope thatGooglewill address thisbugin the very near future.  I
will be willing to test any trialbug-fixes on my devices.

Here is the relevant log output from the failed attempt:

04-24 15:23:33.268: INFO/ActivityManager(82): Starting activity:
Intent { cmp=com.thegadgetworks/.DeviceListActivity }
04-24 15:23:33.308: DEBUG/DeviceListActivity(8055): 
doDiscovery()
04-24 15:23:33.318: ERROR/BluetoothEventLoop.cpp(82): 
event_filter:
Received signal org.bluez.Adapter:PropertyChanged from
/org/bluez/7766/
hci0
04-24 15:23:33.318: VERBOSE/BluetoothEventRedirector(4213):
Received
android.bluetooth.adapter.action.DISCOVERY_STARTED
04-24 15:23:36.608: ERROR/BluetoothEventLoop.cpp(82): 
event_filter:
Received signal org.bluez.Adapter:DeviceFound from 
/org/bluez/7766/
hci0
04-24 15:23:36.638: VERBOSE/BluetoothEventRedirector(4213):
Received
android.bluetooth.device.action.FOUND
04-24 15:23:40.368: ERROR/BluetoothEventLoop.cpp(82): 
event_filter:
Received signal org.bluez.Adapter:PropertyChanged from
/org/bluez/7766/
hci0
04-24 

[android-developers] Re: Listening for Bluetooth events and AVRCP profile

2010-05-03 Thread Moto
Before I invest my time developing the AVRCP profile... Can I actually
achieve this without hacking the Android platform using the given
Bluetooth APIs?

Thanks!

On May 2, 11:32 pm, Moto medicalsou...@gmail.com wrote:
 I need to find out the following information or guidance to achieve a
 solution:

 1. I want to be able to capture bluetooth state changes, particularly
 when it's paired and when it's not.  I do see I can possibly catch the
 intent android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED but
 how reliable is this throughout devices since I can't find it on the
 APIs?

 2. I want to be able to send now playing information to the paired
 device.  I assume this is done via the AVRCP profile.  Does Android
 support this profile?  I could not find it in the APIs but did find
 some info that is supported by android on this 
 site.http://sites.google.com/a/android.com/opensource/projects/bluetooth-faq

 Thanks for all the help in advance!
 -Moto

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Activity and view inflation

2010-05-03 Thread Michael Scott
Well, I could I guess, but what I was looking for was a way to iterate
through the views in a layout to do some common stuff to them. Say for
instance that I would like to set the background for all buttons
dynamically, then it would be neat to do it just after creation.
Anyway, the question still is: why doesn't onCreateView() get called?
/Michael


On 3 Maj, 01:34, TreKing treking...@gmail.com wrote:
 On Sun, May 2, 2010 at 2:39 PM, Michael Scott gebat.s...@gmail.com wrote:
  I have an Acitivity and I would like to fiddle with the views upon creation

 Can't you just findViewById(int) for whichever view you want to fiddle with
 and set whatever properties you want on if after you get it? After calling
 setContentView() of course.

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

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Device Seeding Program for Top Android Market Developers

2010-05-03 Thread Mario Zechner
Got my N1 on friday but missed the fed ex guy. Just received it 2
hours ago, Graz, Austria from Netherlands. Thanks a bunch Google!

On 3 Mai, 17:43, heedrox heed...@gmail.com wrote:
 TreKing: for those of us (including me) that have not received the N1,
 I think we still would like to hear ocasionally the sentence N1
 received in... so as we can see that N1s are still being sent, and
 ours will arrive (soon?).

 I don't know if I'll have to wait one week or three or six more, but I
 will get very nervous if I don't see movement in this list, and I
 would feel very alone in this whole universe...

 Hope you understand. 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 
 athttp://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] Question concerning View creation

2010-05-03 Thread Patrick
Hallo!

I'm currently implementing ExtanableListAdapter extending the ... .
The method getChildView(int groupPosition, int childPosition, boolean
isLastChild, View convertView, ViewGroup parent) of the interface
returns a View. Is there a way to create such a view out of a
layout.xml file? Or is the only way adding stuff like buttons and
Textfield programmatically?

Thanks for you help
Patrick

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

2010-05-03 Thread TreKing
On Mon, May 3, 2010 at 1:14 PM, Patrick patrick.manges...@gmail.com wrote:

 Is there a way to create such a view out of a layout.xml file?


Yes, use LayoutInflater.

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

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

[android-developers] using global variables in android

2010-05-03 Thread Jim
I want to share global variables between a parser fileformat interface
source fiile(/opencore/fileformats/asf/parser/src/iasff.cpp) to the
omx_wma_component.cpp.
Any quick replies please

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

2010-05-03 Thread Bali M.
Great post! thanks!

I spent hours trying to figure out why getLastKnownLocation() was
returning null. I agree with Sven, system should be able to cache the
last known location (pun intended) and return it when requested. It
shouldn't depend on location providers to be active. a single point of
failure i guess would be if none of the location providers were
activated since last power cycle. which is very unlikely since the
cell tower triangulation will almost always work.

On Mar 20, 7:05 am, Mark Murphy mmur...@commonsware.com wrote:
 Please do not simultaneously post to multiple lists.



 Sven Jacobs wrote:
  I'm trying to access location data in the emulator but always receive
  null values :( This is the code:

  final LocationManager locationManager = (LocationManager)
  getSystemService( Context.LOCATION_SERVICE );

  if ( locationManager == null ) {
  return;
  }

  final Criteria criteria = new Criteria();

  criteria.setAccuracy( Criteria.ACCURACY_FINE );
  criteria.setBearingRequired( false );
  criteria.setSpeedRequired( false );
  criteria.setAltitudeRequired( false );
  criteria.setPowerRequirement( Criteria.NO_REQUIREMENT );

  final String provider = locationManager.getBestProvider( criteria, false );
  final Location loc = locationManager.getLastKnownLocation( provider );

  As described here
  http://developer.android.com/guide/topics/location/index.html I've set
  a fixed position using the geo command on the telnet console but
  getLastKnownLocation() always returns null. My app has the following
  permissions set

  ACCESS_MOCK_LOCATION
  ACCESS_COARSE_LOCATION
  ACCESS_FINE_LOCATION

  Is there anything else that I'm missing?

 DDMS/geo only sets a simulated GPS fix (AFAIK -- that's certainly DDMS'
 behavior), and you have not turned on the GPS radio. You need to
 requestLocationUpdates() to turn on GPS, then set the fix. Then, your
 LocationListener will be notified of the fix, and after that point
 getLastKnownLocation() can return it as well.

 Here are two sample projects from a book demonstrating using
 requestLocationUpdates(), the first using only an activity, the second
 delegating the work to a service:

 http://github.com/commonsguy/cw-android/tree/master/Internet/Weather/http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/

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

 Android 2.0 Programming Books:http://commonsware.com/books

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


Re: [android-developers] Re: One clicklistener for many buttons.

2010-05-03 Thread Sajarwo Anggai
use array Button btn[]...then u can use looping for it...



On 30 April 2010 23:37, Brion Emde brione2...@gmail.com wrote:
 you could do something like putting your ids in an array and putting
 your discovered buttons in another array and then process them in a
 loop.

 Think about how SimpleCursorAdapter is doing what it does.

 http://developer.android.com/reference/android/widget/SimpleCursorAdapter.html

 Take a look at the constructor.

 On Apr 30, 9:46 am, angushir...@googlemail.com
 angushir...@yahoo.co.uk wrote:
 Dear all,
             I'm implementing an app that has 12 buttons placed in a
 grid. When one is pressed, the number that the button displays
 (through button.getText()) has to be retrieved and passed to a common
 method. I've gone down the route of implementing OnClickListener e.g.
 public class WordRecall extends Activity implements OnClickListener

 and then overriding public void onClick(View v) to handle events.
 However, what I want to avoid is having to repeat the following lines
 12 times :

 Button btn4Button = (Button)findViewById(R.id.fourWords);
                 btn4Button.setOnClickListener(this);

 Is there a way in Android 1.5 of avoiding this as there is in 1.6?

 Am I better off using 1.6 for development instead of 1.5?

 Regards

 Angus

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



-- 
Best Regard
Sajarwo Anggai
Research  Development Staff
SEAMEO-SEAMOLEC
Kompleks Universitas Terbuka
Jl. Cabe Raya, Pondok Cabe, Pamulang 15418
PO BOX 59/CPA Ciputat 15401, Tangerang, Indonesia
Phone: (62-21) 7422184, 7423725
Fax: (62-21) 7422276
Website : http://seamolec.org
HP: +62852 33 46 46 48

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

2010-05-03 Thread ycwang
hi all,
I'm using android 1.6, I always get below messages when I try to take
a picture or stop to video recording.

binder: BC_ATTEMPT_ACQUIRE not supported
binder: 215: 218 ioctl c0186201 40308cc8 returned -22

the camera application is git clone from 
git://android.git.kernel.org/platform...
any body has any idea ??

best 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] Google should prohibit task killers on Android Market

2010-05-03 Thread Tomáš Hubálek
Hello,

I'm on developer of Digital World Clock Widget (http://
www.appbrain.com/app/net.hubalek.android.worldclock).

I'm receiving a few emails per week with complain that my widget
stopped working. In all cases when we do investigation the cause is
some kind of task killer. What is worse that not everybody contacts me
by email bug gives bad rating even if my application is not working
incorrectly.

I made remedy: wrote it to documentation (http://android.hubalek.net),
wrote it to application main screen and wrote it do application
description but people either don't know what exactly task killers do
and how they work or just don't read doc.

I think that Google should prohibit all task killers as they are
malicious and are breaking other apps.

What do you think?

Tom

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

2010-05-03 Thread sandma...@libero.it
Hi,

I have an application that allows the user to enable GPS.

In order to do it, first in the main activity I do:

lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);   
   
if (!lm.isProviderEnabled(LocationManager.GPS_PROVIDER)){
showGpsOptions();
}

showGpsOptions() is:

   private void showGpsOptions()
   {
  Intent gpsOptionsIntent = new Intent(android.provider.Settings.
ACTION_LOCATION_SOURCE_SETTINGS);
  startActivityForResult(gpsOptionsIntent, BACK_FROM_GPS_ACT);
   }

and finally I override main activity onActivityResult in this way:

   protected void onActivityResult(int requestCode, int resultCode, Intent 
data) {
  if (requestCode == BACK_FROM_GPS_ACT){
 ;
  }
  super.onActivityResult(requestCode, resultCode, data);
   }

Problem: the page show up and works, but when I press back I get back to home 
screen.

Question: how can I get back to my application?

Thanks a lot

Ciao

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


[android-developers] How to create the same activity in a new process?

2010-05-03 Thread davidrobin
Hi,

I want to create a new process to run a new instance of the current
activity.
How can I do that?
I tried to modify the manifest.xml and the intent flag. But only to
get new instance in the same process of the current one.

Any advice is very appreciated.


br, Robin.

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

2010-05-03 Thread James W
I have an AppWidget which provides a summary of some data stored and
controlled by my main Application.

(In a similar way to a Calendar AppWidget showing the next event from
the main Calendar application).

I want to know the best practice for retrieving the data to update my
widget.

I have followed the example, and I have extended AppWidgetProvider and
have a working widget, onto which I can update.

I would expect to read the data from my main application and then
update it via my AppWidgetProvider's onUpdate() routine.

Now, is the best practice here for my separate main application to
provide the data via a ContentProvider? I assume so, as my Appwidget
is not part of the same application.

Is it possible to access a ContentProvider inside my onUpdate()
routine?

Before writing my main application content provider I started to test
out retrieving some available data like Contacts information, and
showing say a contact name in my widget, to show I can extract data
from an existing ContentProvider.

When accessing the Contacts contentprovider, the examples talk
about:

1) Activity.managedQuery(), but my AppWidget is not an activity.
2) ContentResolver.query(), but I can't work out how to get a valid
ContentResolver so I can access the Contacts.

getContentResolver() does not appear to be defined for
AppWidgetProviders.

Am I approaching this the correct way?

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


[android-developers] Re: Android camera problem on HTC Desire

2010-05-03 Thread Sebastian Weier
I have the same problem with my HTC Desire. Even the code-sample of
google (Camera
Preview) does cause an error.
Next week i'm going to test it on Xperia X10.

By the way: the App ZXing works fine. But i don't know, where the
difference
is...Anyone have an idea?


On 22 Apr., 19:26, Streets Of Boston flyingdutc...@gmail.com wrote:
 Ah good, i'm not the only one that sees these occasional crashes in
 their customers' crash logs :)

 On Apr 22, 5:28 am, blindfold seeingwithso...@gmail.com wrote:

  Interesting. I checked my user crash logs, and I find occasional
  startPreview related crashes with Android 1.6, 2.0 and 2.01, and four
  for 2.1-update1, but not a single one for 2.1, making me wonder if the
  update1 for 2.1 introduces a new problem.

  Regards

  The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

  On Apr 21, 10:32 pm, Bob Kerns r...@acm.org wrote:

   Thecamerapreview API demo crashes on my N1 (2.1-Update 1) as well.
   I've been meaning to investigate (debugger, bugs database) but haven't
   gotten around to it yet.

   On Apr 21, 2:18 am, Jo Vermeulen jo.vermeu...@gmail.com wrote:

Yeah, I also noticed that. No idea what the lines about a 'camera
switch' are about ...

I also tried the API demos (one of the samples that came with the
Android SDK), and found to my surprise that Google's owncamera
preview example also crashed on the HTC Desire. Hope it's not a bug in
the Desire's firmware ... Thecameraand camcorder apps that came with
the device work perfectly though.

It would be great if other people with a HTC Desire could try the
   CameraPreview API demo to verify that they experience the same
problem.

Cheers,

-- Jo

On 20 apr, 23:45, Streets Of Boston flyingdutc...@gmail.com wrote:

 mm that looks strange.

 From the stack-trace it (almost) looks like you're trying to access a
 2ndcameraon the device. I have no idea of how that could happen or
 why it would even try to do so.
 But, then again, i could be completely wrong and of no help to you at
 all.. :)

 
 W/CameraSwitch( 3801): open maincamera
 W/CameraSwitch( 3801): no file - can't switchcamera
 E/CameraSwitch( 3801): setSwitchFile failed: /sys/android_camera2/
 htcwc
 E/CameraSwitch( 3801): java.io.FileNotFoundException: /sys/
 android_camera2/htcwc
 

 On Apr 20, 10:32 am, Jo Vermeulen jo.vermeu...@gmail.com wrote:

  Hi,

  I have a problem with a simple application that captures images from
  thecamera. It works on the emulator, but throws an exception when I
  run it on the HTC Desire.

  Here are the relevant log messages:

  W/CameraSwitch( 3801): open maincamera
  W/CameraSwitch( 3801): no file - can't switchcamera
  E/CameraSwitch( 3801): setSwitchFile failed: /sys/android_camera2/
  htcwc
  E/CameraSwitch( 3801): java.io.FileNotFoundException: /sys/
  android_camera2/htcwc

  E/CameraSwitch( 3801):  at
  org.apache.harmony.luni.platform.OSFileSystem.open(OS
  FileSystem.java:244)
  E/CameraSwitch( 3801):  at
  java.io.FileOutputStream.init(FileOutputStream.java
  :97)
  E/CameraSwitch( 3801):  at 
  java.io.FileWriter.init(FileWriter.java:
  58)
  E/CameraSwitch( 3801):  at
  android.hardware.CameraSwitch.setSwitchFile(CameraSwi
  tch.java:44)
  E/CameraSwitch( 3801):  at
  android.hardware.CameraSwitch.openMainCamera(CameraSw
  itch.java:22)
  E/CameraSwitch( 3801):  at android.hardware.Camera.open(Camera.java:
  90)
  E/CameraSwitch( 3801):  at
  be.uhasselt.edm.research.sherlock.CameraPreview.surfa
  ceCreated(SherlockActivity.java:51)
  E/CameraSwitch( 3801):  at
  android.view.SurfaceView.updateWindow(SurfaceView.jav
  a:454)
  E/CameraSwitch( 3801):  at
  android.view.SurfaceView.dispatchDraw(SurfaceView.jav
  a:287)
  E/CameraSwitch( 3801):  at
  android.view.ViewGroup.drawChild(ViewGroup.java:1583)

  E/CameraSwitch( 3801):  at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:13
  12)
  E/CameraSwitch( 3801):  at android.view.View.draw(View.java:6538)
  E/CameraSwitch( 3801):  at
  android.widget.FrameLayout.draw(FrameLayout.java:352)

  E/CameraSwitch( 3801):  at
  android.view.ViewGroup.drawChild(ViewGroup.java:1585)

  E/CameraSwitch( 3801):  at
  android.view.ViewGroup.dispatchDraw(ViewGroup.java:13
  12)
  E/CameraSwitch( 3801):  at android.view.View.draw(View.java:6538)
  E/CameraSwitch( 3801):  at
  android.widget.FrameLayout.draw(FrameLayout.java:352)

  E/CameraSwitch( 3801):  at 
  com.android.internal.policy.impl.PhoneWindow
  $DecorVie
  w.draw(PhoneWindow.java:1866)
  E/CameraSwitch( 3801):  at android.view.ViewRoot.draw(ViewRoot.java:
  1364)
  E/CameraSwitch( 3801):  at
  

[android-developers] Unwanted state changes of CheckBoxes in ListView

2010-05-03 Thread David
Hey,

I am facing a very mysterious Problem. I am using a ListView with
CheckBoxes that can be clicked to select people.
The row layout is the following:

?xml version=1.0 encoding=utf-8?
LinearLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:orientation=horizontal
  android:layout_width=fill_parent
  android:layout_height=wrap_content
CheckBox
android:focusable=false
android:onClick=onSelectPerson
android:layout_width=wrap_content
android:layout_height=wrap_content
android:gravity=center_vertical
android:layout_marginRight=5dip
android:layout_marginLeft=5dip/
TextView
android:id=@+id/person_name
android:text=test
android:layout_width=wrap_content
android:layout_height=wrap_content
android:gravity=center_vertical
android:textSize=18dip android:layout_marginLeft=5dip/
/LinearLayout

As long as the amount of rows doesen't exceed the screen size (- no
scrolling) everything works just fine.
But as soon as I have more rows then the screen size (- some rows are
hidden and have to be scrolled to).
I have a very mysterious phenomenon:

If I check the top row and scroll down some of the previously hidden
rows are randomly checked too. If I scroll up again, again some of the
before hidden rows are randomly vhecked (the CheckBox I clicked in
first place may or may not still be checked).
Also the registered onSelectPerson callback is only called for the
CheckBoxes I really click. The other CheckBoxes just change their
state to checked without calling the callback method.
I have the same phenomenom on the Archos IT 5 and the Nexus One.

This must have something to do with the ListView implementation but I
can't quite figure out what the problem is.
Can anyone help?

Best Regards

David

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


[android-developers] troubles reading other apps config files

2010-05-03 Thread Aivlis
Hi guys, I have a problem. I have to access to the data folder of
other applications from my application
to read configuration's file and so on but it seems it's possible only
to read data from the sdcard and my application's data folder.
Can you suggest me how to solve this problem?

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


[android-developers] Camera pictures are displayed or captured with pinkish color

2010-05-03 Thread surendra
Hi,

I am using the I2C core driver with bit banging algorithm from the
android kernel for configuring the Camera registers. The camera
preview has a pinkish shade in the image. The same is observed when
the image is captures and saved in SD card. I have compared the
register setting values from source code and register values written
when camera starts through logs, Im not able to find any difference

Please give suggestions on how to proceed with this issue.

Regards, Surendra

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] possible to get the scale ratio or number of pixels being displayed in the webkit viewport?

2010-05-03 Thread djkraz
First, I apologize if this is the wrong place to post this but I
didn't see a forum for this kind of question...

I have tried every hack that I can find and think of and nothing seems
to work.  Webkit on the iPhone works perfectly by using
window.innerWidth from javascript but I can't seem to find any way
possible to get this value in androids implementation of webkit...
This is really unfortunate as I am working on a bookmarklet that
scales it's buttons/toolbar to always show the same physical size no
matter what zoom level the page is at.  This works flawlessly on the
iphone but not at all on android due to window.innerWidth always
giving the documents clientWidth...  Is there maybe some hidden object
exposed to us that we can use to calculate the required info?

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


[android-developers] How to connect with MS SQL to android

2010-05-03 Thread remish
Hello guys,
 I want to do one application in which i need to do connection with MS
SQL.How can i do it?
Please anyone guide me.I have to send and recieve data from
database(MS SQL).

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

2010-05-03 Thread Aivlis
Hi guys, I have a problem. I have to access to the data folder of
other applications from my application
to read configuration's file and so on but it seems it's possible only
to read data from the sdcard and my application's data folder.
Can you suggest me how to solve this problem?

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


[android-developers] No Phone Signal in Emulator (2.1)

2010-05-03 Thread Bruno Melo
Hi there, i'm having problems with the emulator.

I only get a phone signal about a third of the times i start the
emulator.

I've read on these groups that you have to have an internet connection
before starting the emulator.
Since i'm connected to the internet 24/7 :) this is not the problem

I've also read somewhere that you should try do disable all other
network connections (which i've done) and the problem persists.

I'm using Windows 7 and Android 2.1 + API's emulator.

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] virtual host set up

2010-05-03 Thread Rahul Mishra
I am using mac 10.6 working  in proxy environment.  i have set up
virtual host e.g  i.mailer and others. it works fine for desktop
browsers. but i am not able to connect to those host from android
browser. i have set up proxy for android  so able to access other
sites.

After going through android doc i come to know that it ignores system
host file and reads resolve.conf file on mac. so i added those host
into resolve.conf file also but still iam not able to access virtual
host.

please give me step by step solution so that i can proceed. 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] Re: Device Seeding Program for Top Android Market Developers

2010-05-03 Thread Will Shackleton
Received here in Lancaster, UK.
Awesome phone, many thanks to Google

Don't forget to update the map: (not created by me)
http://maps.google.com/maps/ms?ie=UTFmsa=0msid=109593402120975111968.0004855b7d8eefa5f649b

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