Re: [android-developers] GridView shows only one row with layout_height=WRAP_CONTENT

2011-09-04 Thread Shri Borde
TableLayout is for cases where you want a specific number of columns.
However, I would like the number of columns to adjust based on the width of
the screen/parent ViewGroup as done by GridLayout. And I do not actually
want the grid to scroll - I want its height to expand as much as needed to
display all the rows. So overriding GridView and modifying its behavior
seems like the best option.

Thanks for the pointers and the discussion.

On Fri, Sep 2, 2011 at 5:28 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Fri, Sep 2, 2011 at 8:12 PM, Shri Borde shri.bo...@gmail.com wrote:
  Actually, I am using a GridView in a ListView, not a LinearLayout.

 You cannot reliably put scrollable things in other scrollable things.

  I am using the GridView as a table, and it seems
  reasonable to want to display the table in a ListView. There needs to be
  some way to accomplish this.

 Use a TableLayout.

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

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

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


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

Re: [android-developers] GridView shows only one row with layout_height=WRAP_CONTENT

2011-09-04 Thread Romain Guy
No, your best option is to create a custom layout. It's pretty easy to do,
and it will be easier than trying to change GridView's behavior.

On Sat, Sep 3, 2011 at 11:38 PM, Shri Borde shri.bo...@gmail.com wrote:

 TableLayout is for cases where you want a specific number of columns.
 However, I would like the number of columns to adjust based on the width of
 the screen/parent ViewGroup as done by GridLayout. And I do not actually
 want the grid to scroll - I want its height to expand as much as needed to
 display all the rows. So overriding GridView and modifying its behavior
 seems like the best option.

 Thanks for the pointers and the discussion.

 On Fri, Sep 2, 2011 at 5:28 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Fri, Sep 2, 2011 at 8:12 PM, Shri Borde shri.bo...@gmail.com wrote:
  Actually, I am using a GridView in a ListView, not a LinearLayout.

 You cannot reliably put scrollable things in other scrollable things.

  I am using the GridView as a table, and it seems
  reasonable to want to display the table in a ListView. There needs to be
  some way to accomplish this.

 Use a TableLayout.

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

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

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


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




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

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

Re: [android-developers] Service callback references ghost instance of my activity

2011-09-04 Thread Dianne Hackborn
When you say you receive callbacks from the service, there must be some call
you are making on to it to register to receive the callback.  You need to
unregister this callback in onDestroy, through whatever mechanism the
service provides.

On Sat, Aug 27, 2011 at 9:56 AM, Jason dummytes...@gmail.com wrote:

 Hello all,

 I'm running into an issue in my app and am trying to determine the
 root cause.

 Here's some background info:
 I have an activity that can be triggered from various places
 throughout my application.  I am also using a service developed by a
 third party ( it is a library that i make calls to).

 The issue:

Instance A of my activity starts up.  in onCreate i bind to the
 service and make a function call to it.  I then correctly receive
 callbacks from the service based on what i send to it.  As my activity
 executes, it is setting various local variables.  Once my activity is
 complete onDestroy() gets called and i unbind from the Service.
 Everything works correctly.
Later I start Instance B of my activity.  I correctly set my local
 variables, call onCreate, and issue my function call to the service.
 the issue arises when i receive a callback.  The callback returns to
 the already destroyed ghost instance A instead of instance B that
 started the service.  I then find that all my local variables are
 screwed up b/c now my activity is using all of instance A's variables
 (which screws up my execution in instance B).  The activity still
 continues to execute, but the mismatch in variables cause it to hang/
 fail/have weird behavior.
My activity is single_top and there are not two instances of my
 activity running concurrently.

 Further, i notice when I kill the service process and re-execute my
 activity everything works fine.  I do run into the issue again once i
 run it the second time.

 So 3 questions:
 1) Is it possible for instance A to be referenced even after
 onDestroy() is called on it?
 2) Is there a way to immediately invoke the garbage collector to clear
 out the memory space instance A is occupying?
 3) Is this a problem with the third party service?  In my code i
 perform bind in onCreate and unbind in onDestroy... I am stumped as to
 why my destroyed instance A is still being referenced when the service
 was bound to and started by B.

 Thanks,
 Jason

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




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

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

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

Re: [android-developers] Dianne, when is the SoundPool going to get fixed?

2011-09-04 Thread Dianne Hackborn
Um, why are you asking me?  I don't work on media.

On Sat, Sep 3, 2011 at 3:42 PM, Christopher Van Kirk 
christopher.vank...@gmail.com wrote:

 We're seeing a lot more devices coming onto the scene with two or more
 CPUs, and the SoundPool is broken on those devices. There is some kind of
 race condition that's causing a busy hang from time to time when playing
 sounds. The only workaround is to turn off the sound on such devices or
 avoid using the SoundPool.

 I'd say only 3 in 5 of the games in the market work on the SGS2, and maybe
 1 in 5 works on the SGT10.1...with the sound turned on.

 Not having a reliable API for these popular devices makes developing for
 them a nightmare.

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




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

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

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

Re: [android-developers] Dianne, when is the SoundPool going to get fixed?

2011-09-04 Thread Christopher Van Kirk
Sorry Dianne. I thought you were a general contact person for us peons 
since I see you replying frequently. Could you do me a favor and pass 
this question on to whoever is appropriate to handle it?


Thanks!

On 9/4/2011 3:26 PM, Dianne Hackborn wrote:

Um, why are you asking me?  I don't work on media.

On Sat, Sep 3, 2011 at 3:42 PM, Christopher Van Kirk 
christopher.vank...@gmail.com mailto:christopher.vank...@gmail.com 
wrote:


We're seeing a lot more devices coming onto the scene with two or
more CPUs, and the SoundPool is broken on those devices. There is
some kind of race condition that's causing a busy hang from time
to time when playing sounds. The only workaround is to turn off
the sound on such devices or avoid using the SoundPool.

I'd say only 3 in 5 of the games in the market work on the SGS2,
and maybe 1 in 5 works on the SGT10.1...with the sound turned on.

Not having a reliable API for these popular devices makes
developing for them a nightmare.

-- 
You received this message because you are subscribed to the Google

Groups Android Developers group.
To post to this group, send email to
android-developers@googlegroups.com
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




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

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


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


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

[android-developers] how to draw a TextView into a Bitmap (without ever beeing drawn on the display)

2011-09-04 Thread Marco Alexander Schmitz
hi,

many posts are found according to the topic screenshot a TextView
into a Bitmap.

Well, the difference to my problem is, that first the view is drawn on
the display (with all layouting and measuring work already done) and
then drawn into a Canvas connected to a Bitmap.

I just want to create a TextView from scratch without ever beeing
shown on the display which is rendered into a Bitmap.

--- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut ---
cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut
---

This one is the basis configuration which is already workin. A click
on the TextView draws itself into a Bitmap and sets it to an
ImageView.

?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=fill_parent
android:orientation=vertical android:background=#fff

TextView android:id=@+id/tv android:layout_width=wrap_content
android:layout_height=wrap_content android:text=The Quick 
Brown
Fox Jumps Over The Lazy Dog.
android:textSize=20dip android:background=#abcdef
android:textColor=#000 android:padding=10dip
android:layout_margin=10dip /

ImageView android:id=@+id/iv android:layout_width=449px
android:layout_height=47px android:background=#56789a
android:layout_margin=10dip /
/LinearLayout

public class WorkingActivity extends Activity {

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

findViewById(R.id.tv).setOnClickListener(new OnClickListener()
{

@Override
public void onClick(View v) {
Bitmap bmp = Bitmap.createBitmap(449, 47,
Bitmap.Config.ARGB_);
Canvas canvas = new Canvas(bmp);

v.draw(canvas);

ImageView iv = (ImageView) findViewById(R.id.iv);
iv.setImageBitmap(bmp);
}
});
}
}

--- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut ---
cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut
---

Now comes the problematic part. I will create a TextView in Java and I
want this one to be drawn straight into a Bitmap. After this I will
set this to an ImageView. I never got this running :(

Bitmap bmp = Bitmap.createBitmap(449, 47,
Bitmap.Config.ARGB_);
Canvas canvas = new Canvas(bmp);

TextView tv = new TextView(this);
tv.setText(THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG);
tv.setTextSize(55f);
 
tv.setTextColor(this.getResources().getColor(android.R.color.black));
tv.draw(canvas);

ImageView iv = (ImageView) findViewById(R.id.iv);
iv.setImageBitmap(bmp);

This doesn't work neither in onCreate nor in a OnClickListener.
Experimenting with setDrawingCacheEnabled(), measure() and
requestLayout() didn't work, too...

Can you help me please on this?

Greetings,
Marco

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


Re: [android-developers] download declined for app on market

2011-09-04 Thread Christopher Van Kirk

Hard to say since the link you've provided doesn't work.

On 9/4/2011 1:05 PM, TreKing wrote:
On Sat, Sep 3, 2011 at 1:54 PM, siliconeagle rrmu...@gmail.com 
mailto:rrmu...@gmail.com wrote:


Any input / guidance / suggestions would be highly appreciated, as
I am losing money because of this.


http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=136601hl=en
http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=136601hl=en
-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
transit tracking app for Android-powered devices


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


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

Re: [android-developers] how to draw a TextView into a Bitmap (without ever beeing drawn on the display)

2011-09-04 Thread Romain Guy
You didn't give your TextView a size. You must first call measure(), then
layout(), then you can draw the view.

On Sun, Sep 4, 2011 at 2:43 AM, Marco Alexander Schmitz 
marco.alexander.schm...@googlemail.com wrote:

 hi,

 many posts are found according to the topic screenshot a TextView
 into a Bitmap.

 Well, the difference to my problem is, that first the view is drawn on
 the display (with all layouting and measuring work already done) and
 then drawn into a Canvas connected to a Bitmap.

 I just want to create a TextView from scratch without ever beeing
 shown on the display which is rendered into a Bitmap.

 --- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut ---
 cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut
 ---

 This one is the basis configuration which is already workin. A click
 on the TextView draws itself into a Bitmap and sets it to an
 ImageView.

 ?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=fill_parent
android:orientation=vertical android:background=#fff

TextView android:id=@+id/tv android:layout_width=wrap_content
android:layout_height=wrap_content android:text=The Quick
 Brown
 Fox Jumps Over The Lazy Dog.
android:textSize=20dip android:background=#abcdef
android:textColor=#000 android:padding=10dip
android:layout_margin=10dip /

ImageView android:id=@+id/iv android:layout_width=449px
android:layout_height=47px android:background=#56789a
android:layout_margin=10dip /
 /LinearLayout

 public class WorkingActivity extends Activity {

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

findViewById(R.id.tv).setOnClickListener(new OnClickListener()
 {

@Override
public void onClick(View v) {
Bitmap bmp = Bitmap.createBitmap(449, 47,
 Bitmap.Config.ARGB_);
Canvas canvas = new Canvas(bmp);

v.draw(canvas);

ImageView iv = (ImageView) findViewById(R.id.iv);
iv.setImageBitmap(bmp);
}
});
}
 }

 --- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut ---
 cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut --- cut
 ---

 Now comes the problematic part. I will create a TextView in Java and I
 want this one to be drawn straight into a Bitmap. After this I will
 set this to an ImageView. I never got this running :(

Bitmap bmp = Bitmap.createBitmap(449, 47,
 Bitmap.Config.ARGB_);
Canvas canvas = new Canvas(bmp);

TextView tv = new TextView(this);
tv.setText(THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG);
tv.setTextSize(55f);

 tv.setTextColor(this.getResources().getColor(android.R.color.black));
tv.draw(canvas);

ImageView iv = (ImageView) findViewById(R.id.iv);
iv.setImageBitmap(bmp);

 This doesn't work neither in onCreate nor in a OnClickListener.
 Experimenting with setDrawingCacheEnabled(), measure() and
 requestLayout() didn't work, too...

 Can you help me please on this?

 Greetings,
 Marco

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




-- 
Romain Guy
Android framework engineer
romain...@android.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] Making (proper) use of gyroscope?

2011-09-04 Thread Johannes Mario Ringheim
I am trying to make one of my apps, Tilt Theremin, more interesting by
making use of the gyroscope sensor. As far as I have understood, one
has to use it in combination with accelerometer and compass to get
accurate reading of pitch, roll and yaw.

I have watched this talk:
http://www.youtube.com/watch?v=C7JQ7Rpwn2k

According to that, the only thing needed is to use the virtual sensor
of TYPE_ROTATION_VECTOR. I tried that on my Nexus S, and it is very
sloppy and seems heavily lowpass filtered. I read on some other post
that TYPE_ROTATION_VECTOR does not currently use the gyroscope, at
least not on the Nexus S and Motorola Xoom.

So here are the questions:

a) Will the virtual sensor TYPE_ROTATION_VECTOR be updated to use data
from gyroscope, and will I be able to use that update on my Nexus S?
Or is it some limitation in hardware? David Sachs in the video talks
about the fusion algorithms being done in hardware, so maybe mine has
no support for that?

b) Is there som pseudo- or real code out there, which can show me how
to do it in software here and now? I have (appearently) managed to
implement a Complementary Filter, but that does not take the compass
into account (only acc and gyro), and I seem to get much of the same
data as I did using just the accelerometer. I can't find any code on
the net which takes gyro, accelerometer and compass into account to
get similar results as in the video.

I see there has been opened an issue on this, but there is not much
activity:
http://code.google.com/p/android/issues/detail?id=17780

Please help me with this! It would be nice to make developing apps
using the gyroscope (more) feasible on the Android platform!

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: Honeycomb (Android 3.2) emulator slow

2011-09-04 Thread Mark Murphy
On Sat, Sep 3, 2011 at 8:54 PM, Jan Burse janbu...@fastmail.fm wrote:
 It also works ok here for android 2.3. The issue
 is mainly it does not scale to android 3.2.

No, mainly it does not scale to tablet screen sizes. Please watch:

http://www.youtube.com/watch?v=Oq05KqjXTvs

-- 
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 Android Development_ Version 3.6 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] Mraket not Good!

2011-09-04 Thread Hadas
Bcd
Hi,
I upload 3 application to the Market.
Three application are same.
with diffrent name.
In one application the market wrote: This application is available to
over 2 devices
In the Second: This application is available to over 403 devices
in the Third: .This application is available to over 384 devices.

How it can be???

Thanks
Hadas Mobile

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


[android-developers] Scrollview inside ViewFlipper?

2011-09-04 Thread Nando
Hi there,

I was trying to get a scrollview to work inside a view flipper.
It works fine the vertical scroll of the scrollview but the horizontal
scroll of the viewflipper doesn't work.

I'm trying to detect the type of movement based on the finger down - up
locations and passing back the the action
but I can't get the horizontal action to work.

Any ideas on how to properly pass the event?

-Nando

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

2011-09-04 Thread rich friedel
 worked for 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


Re: [android-developers] download declined for app on market

2011-09-04 Thread Appaholics
Rich, I think Christopher meant that the Android support is not very good
and that therefore the link doesn't work.

On Sun, Sep 4, 2011 at 4:57 PM, rich friedel rich.frie...@gmail.com wrote:

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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

2011-09-04 Thread Michael Banzon
OT: Wooaaw! Cross list/support hack! :o)

On Sun, Sep 4, 2011 at 10:14 AM, Christopher Van Kirk
christopher.vank...@gmail.com wrote:
 Sorry Dianne. I thought you were a general contact person for us peons since
 I see you replying frequently. Could you do me a favor and pass this
 question on to whoever is appropriate to handle it?

 Thanks!

 On 9/4/2011 3:26 PM, Dianne Hackborn wrote:

 Um, why are you asking me?  I don't work on media.

 On Sat, Sep 3, 2011 at 3:42 PM, Christopher Van Kirk
 christopher.vank...@gmail.com wrote:

 We're seeing a lot more devices coming onto the scene with two or more
 CPUs, and the SoundPool is broken on those devices. There is some kind of
 race condition that's causing a busy hang from time to time when playing
 sounds. The only workaround is to turn off the sound on such devices or
 avoid using the SoundPool.

 I'd say only 3 in 5 of the games in the market work on the SGS2, and maybe
 1 in 5 works on the SGT10.1...with the sound turned on.

 Not having a reliable API for these popular devices makes developing for
 them a nightmare.

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



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

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

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

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



-- 
Michael Banzon
http://michaelbanzon.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] Significant Problem with Eclipse Plug-In and Android Resources

2011-09-04 Thread SteveHM
I just lost another day's effort due to (apparent) problems with the
Eclipse plug-in.

It was another R-issue.

This time I was struggling with the following error message: Your
content must have a listview whose id attribute is
'android.R.id.list'.  After much googling around I tried all possible
permutations of @+id, @android:, and different ways of referencing the
item in the code.  I cleaned the entire project and libraries several
times.  Eventually, remembering other resource-related issues I've had
with Eclipse I simply restarted Eclipse.  Voilá - it works.  No code
or XML changes whatsoever...

(I have the latest plug-in and current Eclipse version running on
Ubuntu 11.04.)

I'm wondering what reasonable alternatives there are to Eclipse now?

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


[android-developers] Send Sms Bug in 2.3 OS

2011-09-04 Thread Varun Tewari
Guys,

While working on a AutoReply app i found a bug which is bit strange.

I have a receiver for SMS RECEIVED. It start a service to send message using
below api

smsManager.sendTextMessage(number, null,
message, PendingIntent.getBroadcast(
this, 0, new Intent(ACTION_SMS_SENT), 0), null);


I handle following cases in ACTION SMS SENT receiver:

case Activity.RESULT_OK:
message = Message sent;
break;
case SmsManager.RESULT_ERROR_GENERIC_FAILURE:
break;
case SmsManager.RESULT_ERROR_NO_SERVICE:
break;
case SmsManager.RESULT_ERROR_NULL_PDU:
break;
case SmsManager.RESULT_ERROR_RADIO_OFF:
break;

I always see above error in red, dont know whats the problem as number is
correct. I do not know how to debug further.
If i call the same api to send message from activity it works
and recipient is able to receive my message.
This is getting very strange.

Please let me know your thoughts.

Thanks  Reg,
Varun

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

2011-09-04 Thread Nikolay Elenkov
On Sun, Sep 4, 2011 at 9:13 PM, SteveHM merr...@googlemail.com wrote:


 I'm wondering what reasonable alternatives there are to Eclipse now?


Vim+Ant or IntelliJ.

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

2011-09-04 Thread sblantipodi
As title.

I have a 24 display with 0.270mm pixel pitch (1920x1200)

Suppose that I would like to simulate a 3.7 (480x800) display like
the nexus on on the sdk,
how can I do that?
I want to simulate the dimension, is this possible?

Thanks.

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


Re: [android-developers] How to create a simulator with real phone dimension?

2011-09-04 Thread Appaholics
Check scale display to real size and set the density.

On Sun, Sep 4, 2011 at 7:00 PM, sblantipodi perini.dav...@dpsoftware.orgwrote:

 As title.

 I have a 24 display with 0.270mm pixel pitch (1920x1200)

 Suppose that I would like to simulate a 3.7 (480x800) display like
 the nexus on on the sdk,
 how can I do that?
 I want to simulate the dimension, is this possible?

 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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

2011-09-04 Thread sblantipodi
ok, I know I can do it with that scale to real size but what
parameters should
I put in?

Thanks.

On Sep 4, 3:33 pm, Appaholics raghavs...@appaholics.in wrote:
 Check scale display to real size and set the density.

 On Sun, Sep 4, 2011 at 7:00 PM, sblantipodi 
 perini.dav...@dpsoftware.orgwrote:









  As title.

  I have a 24 display with 0.270mm pixel pitch (1920x1200)

  Suppose that I would like to simulate a 3.7 (480x800) display like
  the nexus on on the sdk,
  how can I do that?
  I want to simulate the dimension, is this possible?

  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

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete 
 control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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

2011-09-04 Thread Johannes Mario Ringheim
Update: Indeed, it looks like TYPE_ROTATION_VECTOR is calculated on
basis of accelerometer and compass:
http://www.google.com/codesearch#uX1GffpyOZk/services/sensorservice/RotationVectorSensor.cpp

So the questions are now:

* When will these be implemented to include gyroscope?
* Is it possible for an impatient soul like myself to do this in the
Android code here and now? And if yes, are there some good guides/
guidelines on how to do it?

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


Re: [android-developers] Re: How to create a simulator with real phone dimension?

2011-09-04 Thread Appaholics
The density and the size of the display you are emulating. You may also need
to set the AVD Ram etc to that of the device you are emulating. Look into
the emulator docs if you need to.

On Sun, Sep 4, 2011 at 7:09 PM, sblantipodi perini.dav...@dpsoftware.orgwrote:

 ok, I know I can do it with that scale to real size but what
 parameters should
 I put in?

 Thanks.

 On Sep 4, 3:33 pm, Appaholics raghavs...@appaholics.in wrote:
  Check scale display to real size and set the density.
 
  On Sun, Sep 4, 2011 at 7:00 PM, sblantipodi 
 perini.dav...@dpsoftware.orgwrote:
 
 
 
 
 
 
 
 
 
   As title.
 
   I have a 24 display with 0.270mm pixel pitch (1920x1200)
 
   Suppose that I would like to simulate a 3.7 (480x800) display like
   the nexus on on the sdk,
   how can I do that?
   I want to simulate the dimension, is this possible?
 
   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
 
  --
  --
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
 http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

2011-09-04 Thread sblantipodi
Ok I founded it, the appaholics answer is not correct.

To simulate the physical dimension of a device you need to specify the
screen dimension in inches of the simulated device
and the DPI of the PC monitor.



On Sep 4, 4:32 pm, Appaholics raghavs...@appaholics.in wrote:
 The density and the size of the display you are emulating. You may also need
 to set the AVD Ram etc to that of the device you are emulating. Look into
 the emulator docs if you need to.

 On Sun, Sep 4, 2011 at 7:09 PM, sblantipodi 
 perini.dav...@dpsoftware.orgwrote:









  ok, I know I can do it with that scale to real size but what
  parameters should
  I put in?

  Thanks.

  On Sep 4, 3:33 pm, Appaholics raghavs...@appaholics.in wrote:
   Check scale display to real size and set the density.

   On Sun, Sep 4, 2011 at 7:00 PM, sblantipodi 
  perini.dav...@dpsoftware.orgwrote:

As title.

I have a 24 display with 0.270mm pixel pitch (1920x1200)

Suppose that I would like to simulate a 3.7 (480x800) display like
the nexus on on the sdk,
how can I do that?
I want to simulate the dimension, is this possible?

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

   --
   --
   Raghav Sood
   CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
   required to have complete control)
 http://www.raghavsood.com/https://market.android.com/developer?pub=Ap...

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

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete 
 control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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

2011-09-04 Thread Appaholics
That is exactly what I meant. I apologize if I couldn't get it across
clearly.


On Sun, Sep 4, 2011 at 8:18 PM, sblantipodi perini.dav...@dpsoftware.orgwrote:

 Ok I founded it, the appaholics answer is not correct.

 To simulate the physical dimension of a device you need to specify the
 screen dimension in inches of the simulated device
 and the DPI of the PC monitor.



 On Sep 4, 4:32 pm, Appaholics raghavs...@appaholics.in wrote:
  The density and the size of the display you are emulating. You may also
 need
  to set the AVD Ram etc to that of the device you are emulating. Look into
  the emulator docs if you need to.
 
  On Sun, Sep 4, 2011 at 7:09 PM, sblantipodi 
 perini.dav...@dpsoftware.orgwrote:
 
 
 
 
 
 
 
 
 
   ok, I know I can do it with that scale to real size but what
   parameters should
   I put in?
 
   Thanks.
 
   On Sep 4, 3:33 pm, Appaholics raghavs...@appaholics.in wrote:
Check scale display to real size and set the density.
 
On Sun, Sep 4, 2011 at 7:00 PM, sblantipodi 
   perini.dav...@dpsoftware.orgwrote:
 
 As title.
 
 I have a 24 display with 0.270mm pixel pitch (1920x1200)
 
 Suppose that I would like to simulate a 3.7 (480x800) display like
 the nexus on on the sdk,
 how can I do that?
 I want to simulate the dimension, is this possible?
 
 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
 
--
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
  http://www.raghavsood.com/https://market.android.com/developer?pub=Ap.
 ..
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  --
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
 http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

[android-developers] [SOLVED] Re: Sticky GPS icon after setting proximity alerts...

2011-09-04 Thread Robert Thau
On Thu, Sep 1, 2011 at 10:21 PM, Robert Thau rst...@gmail.com wrote:

 ... once a proximity alert is first set, the GPS icon in the
 status bar seems to stay on continually, blinking if it hasn't got a
 fix.  Which is what you expect when the proximity alerts are active,
 but I still see the icon in the status bar even after the proximity
 alerts are removed (so far as I can tell), and even after
 uninstalling the app (which, I think, should certainly clear them
 --- though if there's a way to get the LocationManager to list active
 proximity alerts, that would be useful to know).


For the sake of people Googling around for solutions to a similar issue,
switching the FLAG_CANCEL_CURRENT in the following to read
FLAG_UPDATE_CURRENT appears to solve the problem.  (This is
the method that builds the PendingIntents which I feed to
addProximityAlert and removeProximityAlert.)


   def buildPendingIntent( list: ShoppingList, shop: Shop ) = {
 val intent = new Intent( ctx, classOf[ ProxAlertManagement ] )
 intent.putExtra( shopIdKey, shop.id )
 intent.putExtra( listIdKey, shop.shoppingListId )
 PendingIntent.getBroadcast( ctx, 0, intent,
 PendingIntent.FLAG_CANCEL_CURRENT )
   }


Robert Thau

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

2011-09-04 Thread blake
Yeah, it is easy enough to check to see whether you can run 100
threads.  I imagine the question is whether it is advisable to do so,
or not.  ... and since you are asking this, I'll bet you already have
a fairly good guess about the answer...

I am not completely certain about how Dalvik does memory management,
but on the Sun JVM, not only does each thread take a noticeable amount
of space, itself, it can also affect the way the heap is organized,
and the garbage collector runs.  The overhead due to 100 threads is
going to be significant.

It seems surprising that you would have 100 things actually happening
simultaneously.  From a resource management perspective, it would be
better if you could abstract the tasks that you need run as smallish
objects that store just the task state.  Then use a pool of threads
(maybe and ExecutorService?) to animate the ones that can actually
move forward.

It's true!  You are being asked to replicate the system that allocates
CPUs to threads!  Unfortunately, it is probably worth the work.

-blake
Programming Android, FTW!
http://oreilly.com/catalog/0636920010364


On Sep 3, 3:03 pm, Christopher Van Kirk
christopher.vank...@gmail.com wrote:
 No idea if it's possible, but is it wise? Considering there are a
 maximum of two cpus to work with, what are you gaining with so many threads?

 On 9/4/2011 5:52 AM, Goutom wrote:







  Hello

  I want to run 100 thread concurrently.Is it possible for android?

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

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


[android-developers] Re: Animating a graphics shape.

2011-09-04 Thread blake
The Android animation tools are mostly pointed at animations that can
be performed by making graphical transformations on a single scene:
making a page turn, wipes, fades, etc.  This is what Android calls
tweened animation.  I think you are thinking of something they call
frame-by-frame animation.  The Android tool for managing this is a
Drawable: 
http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html.
It is pretty limited...  I don't think you'll want to base a game on
it.

Erasing the old shape and drawing the new one is pretty much how you
do a 2d animation.  2-d drawing happens on a Canvas. There are a lot
of ways to optimize the process.  Be careful, though, because the way
Android does basic graphics changes a lot, for Honeycomb.  Things that
used to be optimizations (in particular, composing backgrounds and
saving them as bitmaps), may actually slow things down.

Probably the fastest way to draw uses OpenGL and the SurfaceView.
It's like learning an entirely new, fairly complex, machine language.
It might be overkill for a simple 2-d game.

-blake
Programming Android, FTW!
http://oreilly.com/catalog/0636920010364



On Sep 3, 9:42 am, Tobiah t...@tobiah.org wrote:
 I want to make a vector style 2d video game.  I started
 with a subclass of View.  I can draw shapes on it.  Now
 I want them to move.  I could erase and draw new shapes,
 but I know if I do that, I won't get a chance to see the
 movement on the screen until my routine is done.

 I guess I need another thread to do the drawing.  Can
 someone point me in the right direction?  Are there
 sprite style facilities that I should look at?  Do I
 need android.Animation, or android.view.Animation?
 Should I be looking at Canvas, or SurfaceView?

 Thanks,

 Tobiah

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

2011-09-04 Thread Appaholics
Hi,

I have been going through Google searches and the Android docs but I am
still not clear on this. I would like to know if it is possible to get the
raw image data from the camera using the Android SDK. Some of the examples I
looked through said that it was possible but the image returned was always a
jpg or png.

So can I get the raw image from the camera?

Thanks

-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

2011-09-04 Thread sblantipodi
No problem, thanks anyway for the answer.

On Sep 4, 4:55 pm, Appaholics raghavs...@appaholics.in wrote:
 That is exactly what I meant. I apologize if I couldn't get it across
 clearly.

 On Sun, Sep 4, 2011 at 8:18 PM, sblantipodi 
 perini.dav...@dpsoftware.orgwrote:









  Ok I founded it, the appaholics answer is not correct.

  To simulate the physical dimension of a device you need to specify the
  screen dimension in inches of the simulated device
  and the DPI of the PC monitor.

  On Sep 4, 4:32 pm, Appaholics raghavs...@appaholics.in wrote:
   The density and the size of the display you are emulating. You may also
  need
   to set the AVD Ram etc to that of the device you are emulating. Look into
   the emulator docs if you need to.

   On Sun, Sep 4, 2011 at 7:09 PM, sblantipodi 
  perini.dav...@dpsoftware.orgwrote:

ok, I know I can do it with that scale to real size but what
parameters should
I put in?

Thanks.

On Sep 4, 3:33 pm, Appaholics raghavs...@appaholics.in wrote:
 Check scale display to real size and set the density.

 On Sun, Sep 4, 2011 at 7:00 PM, sblantipodi 
perini.dav...@dpsoftware.orgwrote:

  As title.

  I have a 24 display with 0.270mm pixel pitch (1920x1200)

  Suppose that I would like to simulate a 3.7 (480x800) display like
  the nexus on on the sdk,
  how can I do that?
  I want to simulate the dimension, is this possible?

  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

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
   http://www.raghavsood.com/https://market.android.com/developer?pub=Ap.
  ..

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

   --
   --
   Raghav Sood
   CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
   required to have complete control)
 http://www.raghavsood.com/https://market.android.com/developer?pub=Ap...

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

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete 
 control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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

2011-09-04 Thread Mark Murphy
Cameras should support one or more of the ImageFormat types:

http://developer.android.com/reference/android/graphics/ImageFormat.html

as determined by calling getSupportedPictureFormats() on
Camera.Parameters. setPictureFormat() on Camera indicates that Android
supports JPEG, NV21, and RGB_565.

I am no expert on image formats, so I have no idea if any of them
qualify for any of the available definitions of raw:

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

On Sun, Sep 4, 2011 at 11:47 AM, Appaholics raghavs...@appaholics.in wrote:
 Hi,
 I have been going through Google searches and the Android docs but I am
 still not clear on this. I would like to know if it is possible to get the
 raw image data from the camera using the Android SDK. Some of the examples I
 looked through said that it was possible but the image returned was always a
 jpg or png.
 So can I get the raw image from the camera?
 Thanks

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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



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

_The Busy Coder's Guide to Android Development_ Version 3.6 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: download declined for app on market

2011-09-04 Thread siliconeagle
https://market.android.com/details?id=org.my_pod.mypodunlockpaid

hopefully that works.

best
rob
On Sep 4, 12:38 pm, Appaholics raghavs...@appaholics.in wrote:
 Rich, I think Christopher meant that the Android support is not very good
 and that therefore the link doesn't work.

 On Sun, Sep 4, 2011 at 4:57 PM, rich friedel rich.frie...@gmail.com wrote:
   worked for 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

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete 
 control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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


[android-developers] Nexus Prime, 1280x720 display, huge resolution.

2011-09-04 Thread sblantipodi
Hi,
I would like to know if I need to start scaling my images again.

Is it true that nexus prime will have such an insane and unuseful
resolution?

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

2011-09-04 Thread Lwe
like OCR

On Jul 12, 5:54 pm, Justin Anderson magouyaw...@gmail.com wrote:
  how to read image as text

 What?

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware







 On Tue, Jul 12, 2011 at 3:48 AM, Lwe luaisul...@gmail.com wrote:
  how to read image as text

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

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

2011-09-04 Thread TreKing
On Sun, Sep 4, 2011 at 5:54 AM, Hadas hadas.mob...@gmail.com wrote:

 I upload 3 application to the Market.
 Three application are same.
 with diffrent name.


What would be the point of this?


 In one application the market wrote: This application is available to
 over 2 devices
 In the Second: This application is available to over 403 devices
 in the Third: .This application is available to over 384 devices.

 How it can be???


See you post title.

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

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

Re: [android-developers] Question: Is it possible to get the RAW camera data?

2011-09-04 Thread Appaholics
Thanks for the help Mark but I don't think that any of them would come close
to a raw format. I am not that knowledgable in photography though so maybe a
photographer who is on this list could help.

Thanks

On Sun, Sep 4, 2011 at 9:31 PM, Mark Murphy mmur...@commonsware.com wrote:

 Cameras should support one or more of the ImageFormat types:

 http://developer.android.com/reference/android/graphics/ImageFormat.html

 as determined by calling getSupportedPictureFormats() on
 Camera.Parameters. setPictureFormat() on Camera indicates that Android
 supports JPEG, NV21, and RGB_565.

 I am no expert on image formats, so I have no idea if any of them
 qualify for any of the available definitions of raw:

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

 On Sun, Sep 4, 2011 at 11:47 AM, Appaholics raghavs...@appaholics.in
 wrote:
  Hi,
  I have been going through Google searches and the Android docs but I am
  still not clear on this. I would like to know if it is possible to get
 the
  raw image data from the camera using the Android SDK. Some of the
 examples I
  looked through said that it was possible but the image returned was
 always a
  jpg or png.
  So can I get the raw image from the camera?
  Thanks
 
  --
  --
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
  http://www.raghavsood.com/
  https://market.android.com/developer?pub=Appaholics
  http://www.appaholics.in/
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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

 _The Busy Coder's Guide to Android Development_ Version 3.6 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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

2011-09-04 Thread Klimek .....
fu...
On Sep 4, 2011 5:48 PM, Appaholics raghavs...@appaholics.in wrote:
 Hi,

 I have been going through Google searches and the Android docs but I am
 still not clear on this. I would like to know if it is possible to get the
 raw image data from the camera using the Android SDK. Some of the examples
I
 looked through said that it was possible but the image returned was always
a
 jpg or png.

 So can I get the raw image from the camera?

 Thanks

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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

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

[android-developers] Market App behaving erratic

2011-09-04 Thread MComputing Lab
I find my market app very erratic since last 3-4 days. I dont see the Paid
Apps/Paid Games section. I only see Free Apps and the Just In section.

Sometimes I dont see any App at all in the All Applications screen.

Has anybody faced this? Will it work if I reset my phone back to Factory
Settings?



Regards,
Santosh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 I can add an int to an array if the user clicks a button?

2011-09-04 Thread Zwiebel
I want to make a program, which will has a lot of buttons. If the user
clicks one button, I want to add a specified number (int) to an array.

int[] array;

array = new int[20];

button.setOnClickListener(new View.OnClickOnListener) {

@Override
  public void onClick (View v) {
  //something to add the button's specified number to the
array
}

}

What I need to write to the method to add the number to the array? Is
there a method for this?

If I can make this, I will want to see whether my array and the user's
array is equals or not. Can I do this with the normal equals(myarray,
usersarray) ?

Thanks for any helps!

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


Re: [android-developers] How I can add an int to an array if the user clicks a button?

2011-09-04 Thread Mark Murphy
On Sun, Sep 4, 2011 at 1:44 PM, Zwiebel hunzwie...@gmail.com wrote:
 I want to make a program, which will has a lot of buttons. If the user
 clicks one button, I want to add a specified number (int) to an array.

 int[] array;

 array = new int[20];

 button.setOnClickListener(new View.OnClickOnListener) {

 @Override
      public void onClick (View v) {
              //something to add the button's specified number to the
 array
 }

 }

 What I need to write to the method to add the number to the array? Is
 there a method for this?

You cannot add to a standard Java array (int[]), as the length of
those is fixed. You will need to use something like ArrayList.

-- 
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 Android Development_ Version 3.6 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] Market App behaving erratic

2011-09-04 Thread TreKing
On Sun, Sep 4, 2011 at 12:36 PM, MComputing Lab 
mobilecomputing...@gmail.com wrote:


 I find my market app very erratic since last 3-4 days. I dont see the Paid
 Apps/Paid Games section. I only see Free Apps and the Just In section.

 Sometimes I dont see any App at all in the All Applications screen.


This is the developer's group. Go here for user support for the Android
Market.
http://www.google.com/support/androidmarket/bin/request.py?contact_type=contact_policypolicy=apps

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

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

[android-developers] Re: How I can add an int to an array if the user clicks a button?

2011-09-04 Thread Zwiebel
OK thanks for the very fast reply.

So If I use

ArrayListint array;

array = new ArrayList(20);

button.setOnClickListener(new View.OnClickOnListener) {

@Override
  public void onClick (View v) {
  //something to add the button's specified number to the
array

}
}

And I use the add method for add a number to the ArrayList will be
good? And here is the question, that How I can compare them, too?

Thanks




On szept. 4, 19:46, Mark Murphy mmur...@commonsware.com wrote:
 On Sun, Sep 4, 2011 at 1:44 PM, Zwiebel hunzwie...@gmail.com wrote:
  I want to make a program, which will has a lot of buttons. If the user
  clicks one button, I want to add a specified number (int) to an array.

  int[] array;

  array = new int[20];

  button.setOnClickListener(new View.OnClickOnListener) {

  @Override
       public void onClick (View v) {
               //something to add the button's specified number to the
  array
  }

  }

  What I need to write to the method to add the number to the array? Is
  there a method for this?

 You cannot add to a standard Java array (int[]), as the length of
 those is fixed. You will need to use something like ArrayList.

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

 _The Busy Coder's Guide to Android Development_ Version 3.6 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 I can add an int to an array if the user clicks a button?

2011-09-04 Thread Mark Murphy
On Sun, Sep 4, 2011 at 1:56 PM, Zwiebel hunzwie...@gmail.com wrote:
 OK thanks for the very fast reply.

 So If I use

 ArrayListint array;

 array = new ArrayList(20);

 button.setOnClickListener(new View.OnClickOnListener) {

 @Override
      public void onClick (View v) {
              //something to add the button's specified number to the
 array

 }
 }

 And I use the add method for add a number to the ArrayList will be
 good?

Yes.

 And here is the question, that How I can compare them, too?

http://stackoverflow.com/questions/4994021/compare-every-item-to-every-other-item-in-arraylist

Bear in mind that none of this has anything to do with Android. There
are plenty of Java support resources out there, such as
StackOverflow's [java] tag.

-- 
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 Android Development_ Version 3.6 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] Question: Is it possible to get the RAW camera data?

2011-09-04 Thread Kristopher Micinski
Raghav,

out of interest, why not write a decoder write to take insert encoded
format here to insert unencoded format here?  Is it just out of
interest?  Or perhaps that you feel the unencoded image capture would
be less work for the library?

I really don't know things about media, but I'd be interested as to
your rationale for why what the library provides isn't enough.

Kris

On Sun, Sep 4, 2011 at 1:05 PM, Appaholics raghavs...@appaholics.in wrote:
 Thanks for the help Mark but I don't think that any of them would come close
 to a raw format. I am not that knowledgable in photography though so maybe a
 photographer who is on this list could help.
 Thanks

 On Sun, Sep 4, 2011 at 9:31 PM, Mark Murphy mmur...@commonsware.com wrote:

 Cameras should support one or more of the ImageFormat types:

 http://developer.android.com/reference/android/graphics/ImageFormat.html

 as determined by calling getSupportedPictureFormats() on
 Camera.Parameters. setPictureFormat() on Camera indicates that Android
 supports JPEG, NV21, and RGB_565.

 I am no expert on image formats, so I have no idea if any of them
 qualify for any of the available definitions of raw:

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

 On Sun, Sep 4, 2011 at 11:47 AM, Appaholics raghavs...@appaholics.in
 wrote:
  Hi,
  I have been going through Google searches and the Android docs but I am
  still not clear on this. I would like to know if it is possible to get
  the
  raw image data from the camera using the Android SDK. Some of the
  examples I
  looked through said that it was possible but the image returned was
  always a
  jpg or png.
  So can I get the raw image from the camera?
  Thanks
 
  --
  --
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
  http://www.raghavsood.com/
  https://market.android.com/developer?pub=Appaholics
  http://www.appaholics.in/
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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

 _The Busy Coder's Guide to Android Development_ Version 3.6 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


 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete control)
 http://www.raghavsood.com/
 https://market.android.com/developer?pub=Appaholics
 http://www.appaholics.in/

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

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


Re: [android-developers] Question: Is it possible to get the RAW camera data?

2011-09-04 Thread Appaholics
I was looking to do more with the Android camera. Personally I have nothing
against the formats that are currently supported, except that a good
photographer (which I am not) would be able to get a much better image if
all the camera data is kept in a raw format for post processing. As this is
not supported by the SDK itself my only two options seem to be to modify the
firmware (something I am not keen on doing) and writing my own interface to
the camera (something I have no idea on how to achieve). While it is
possible to convert a raw image into a png or a jpeg it is not, AFAIK,
possible to do it the other way around.

Mostly this app idea came out of curiosity with some practical use at the
edge of my thought process.

Thanks

On Sun, Sep 4, 2011 at 11:57 PM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 Raghav,

 out of interest, why not write a decoder write to take insert encoded
 format here to insert unencoded format here?  Is it just out of
 interest?  Or perhaps that you feel the unencoded image capture would
 be less work for the library?

 I really don't know things about media, but I'd be interested as to
 your rationale for why what the library provides isn't enough.

 Kris

 On Sun, Sep 4, 2011 at 1:05 PM, Appaholics raghavs...@appaholics.in
 wrote:
  Thanks for the help Mark but I don't think that any of them would come
 close
  to a raw format. I am not that knowledgable in photography though so
 maybe a
  photographer who is on this list could help.
  Thanks
 
  On Sun, Sep 4, 2011 at 9:31 PM, Mark Murphy mmur...@commonsware.com
 wrote:
 
  Cameras should support one or more of the ImageFormat types:
 
 
 http://developer.android.com/reference/android/graphics/ImageFormat.html
 
  as determined by calling getSupportedPictureFormats() on
  Camera.Parameters. setPictureFormat() on Camera indicates that Android
  supports JPEG, NV21, and RGB_565.
 
  I am no expert on image formats, so I have no idea if any of them
  qualify for any of the available definitions of raw:
 
  http://en.wikipedia.org/wiki/Raw_image_format
 
  On Sun, Sep 4, 2011 at 11:47 AM, Appaholics raghavs...@appaholics.in
  wrote:
   Hi,
   I have been going through Google searches and the Android docs but I
 am
   still not clear on this. I would like to know if it is possible to get
   the
   raw image data from the camera using the Android SDK. Some of the
   examples I
   looked through said that it was possible but the image returned was
   always a
   jpg or png.
   So can I get the raw image from the camera?
   Thanks
  
   --
   --
   Raghav Sood
   CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
   required to have complete control)
   http://www.raghavsood.com/
   https://market.android.com/developer?pub=Appaholics
   http://www.appaholics.in/
  
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Mark Murphy (a Commons Guy)
  http://commonsware.com | http://github.com/commonsguy
  http://commonsware.com/blog | http://twitter.com/commonsguy
 
  _The Busy Coder's Guide to Android Development_ Version 3.6 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
 
 
  --
  --
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
  http://www.raghavsood.com/
  https://market.android.com/developer?pub=Appaholics
  http://www.appaholics.in/
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete 

Re: [android-developers] Question: Is it possible to get the RAW camera data?

2011-09-04 Thread Kristopher Micinski
Ah, so you're worried that the jpg results in a crappy image?  Might
be digging into the source on this one and seeing what's up with it,
it does seem like this should be an option, doesn't it? But I'm not
sure how camera hardware works.

Kris

On Sun, Sep 4, 2011 at 2:33 PM, Appaholics raghavs...@appaholics.in wrote:
 I was looking to do more with the Android camera. Personally I have nothing
 against the formats that are currently supported, except that a good
 photographer (which I am not) would be able to get a much better image if
 all the camera data is kept in a raw format for post processing. As this is
 not supported by the SDK itself my only two options seem to be to modify the
 firmware (something I am not keen on doing) and writing my own interface to
 the camera (something I have no idea on how to achieve). While it is
 possible to convert a raw image into a png or a jpeg it is not, AFAIK,
 possible to do it the other way around.
 Mostly this app idea came out of curiosity with some practical use at the
 edge of my thought process.
 Thanks

 On Sun, Sep 4, 2011 at 11:57 PM, Kristopher Micinski
 krismicin...@gmail.com wrote:

 Raghav,

 out of interest, why not write a decoder write to take insert encoded
 format here to insert unencoded format here?  Is it just out of
 interest?  Or perhaps that you feel the unencoded image capture would
 be less work for the library?

 I really don't know things about media, but I'd be interested as to
 your rationale for why what the library provides isn't enough.

 Kris

 On Sun, Sep 4, 2011 at 1:05 PM, Appaholics raghavs...@appaholics.in
 wrote:
  Thanks for the help Mark but I don't think that any of them would come
  close
  to a raw format. I am not that knowledgable in photography though so
  maybe a
  photographer who is on this list could help.
  Thanks
 
  On Sun, Sep 4, 2011 at 9:31 PM, Mark Murphy mmur...@commonsware.com
  wrote:
 
  Cameras should support one or more of the ImageFormat types:
 
 
  http://developer.android.com/reference/android/graphics/ImageFormat.html
 
  as determined by calling getSupportedPictureFormats() on
  Camera.Parameters. setPictureFormat() on Camera indicates that Android
  supports JPEG, NV21, and RGB_565.
 
  I am no expert on image formats, so I have no idea if any of them
  qualify for any of the available definitions of raw:
 
  http://en.wikipedia.org/wiki/Raw_image_format
 
  On Sun, Sep 4, 2011 at 11:47 AM, Appaholics raghavs...@appaholics.in
  wrote:
   Hi,
   I have been going through Google searches and the Android docs but I
   am
   still not clear on this. I would like to know if it is possible to
   get
   the
   raw image data from the camera using the Android SDK. Some of the
   examples I
   looked through said that it was possible but the image returned was
   always a
   jpg or png.
   So can I get the raw image from the camera?
   Thanks
  
   --
   --
   Raghav Sood
   CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
   required to have complete control)
   http://www.raghavsood.com/
   https://market.android.com/developer?pub=Appaholics
   http://www.appaholics.in/
  
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
   android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Mark Murphy (a Commons Guy)
  http://commonsware.com | http://github.com/commonsguy
  http://commonsware.com/blog | http://twitter.com/commonsguy
 
  _The Busy Coder's Guide to Android Development_ Version 3.6 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
 
 
  --
  --
  Raghav Sood
  CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
  required to have complete control)
  http://www.raghavsood.com/
  https://market.android.com/developer?pub=Appaholics
  http://www.appaholics.in/
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 

Re: [android-developers] Question: Is it possible to get the RAW camera data?

2011-09-04 Thread Appaholics
Sort of. For me the normal jpg works well enough. However if I can get this
type of app going a serious photographer may find it useful. The essence of
the raw format is that it saves everything that the camera sees. It doesn't
alter a thing. With your png and jpg formats android will alter the data it
gets and produce the image you see. The image in a jpg or png format has
been adjusted for white balance, noise, light etc. A raw format is unedited.

Thanks

On Mon, Sep 5, 2011 at 12:08 AM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 Ah, so you're worried that the jpg results in a crappy image?  Might
 be digging into the source on this one and seeing what's up with it,
 it does seem like this should be an option, doesn't it? But I'm not
 sure how camera hardware works.

 Kris

 On Sun, Sep 4, 2011 at 2:33 PM, Appaholics raghavs...@appaholics.in
 wrote:
  I was looking to do more with the Android camera. Personally I have
 nothing
  against the formats that are currently supported, except that a good
  photographer (which I am not) would be able to get a much better image if
  all the camera data is kept in a raw format for post processing. As this
 is
  not supported by the SDK itself my only two options seem to be to modify
 the
  firmware (something I am not keen on doing) and writing my own interface
 to
  the camera (something I have no idea on how to achieve). While it is
  possible to convert a raw image into a png or a jpeg it is not, AFAIK,
  possible to do it the other way around.
  Mostly this app idea came out of curiosity with some practical use at the
  edge of my thought process.
  Thanks
 
  On Sun, Sep 4, 2011 at 11:57 PM, Kristopher Micinski
  krismicin...@gmail.com wrote:
 
  Raghav,
 
  out of interest, why not write a decoder write to take insert encoded
  format here to insert unencoded format here?  Is it just out of
  interest?  Or perhaps that you feel the unencoded image capture would
  be less work for the library?
 
  I really don't know things about media, but I'd be interested as to
  your rationale for why what the library provides isn't enough.
 
  Kris
 
  On Sun, Sep 4, 2011 at 1:05 PM, Appaholics raghavs...@appaholics.in
  wrote:
   Thanks for the help Mark but I don't think that any of them would come
   close
   to a raw format. I am not that knowledgable in photography though so
   maybe a
   photographer who is on this list could help.
   Thanks
  
   On Sun, Sep 4, 2011 at 9:31 PM, Mark Murphy mmur...@commonsware.com
   wrote:
  
   Cameras should support one or more of the ImageFormat types:
  
  
  
 http://developer.android.com/reference/android/graphics/ImageFormat.html
  
   as determined by calling getSupportedPictureFormats() on
   Camera.Parameters. setPictureFormat() on Camera indicates that
 Android
   supports JPEG, NV21, and RGB_565.
  
   I am no expert on image formats, so I have no idea if any of them
   qualify for any of the available definitions of raw:
  
   http://en.wikipedia.org/wiki/Raw_image_format
  
   On Sun, Sep 4, 2011 at 11:47 AM, Appaholics 
 raghavs...@appaholics.in
   wrote:
Hi,
I have been going through Google searches and the Android docs but
 I
am
still not clear on this. I would like to know if it is possible to
get
the
raw image data from the camera using the Android SDK. Some of the
examples I
looked through said that it was possible but the image returned was
always a
jpg or png.
So can I get the raw image from the camera?
Thanks
   
--
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all
 titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/
   
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
  
  
  
   --
   Mark Murphy (a Commons Guy)
   http://commonsware.com | http://github.com/commonsguy
   http://commonsware.com/blog | http://twitter.com/commonsguy
  
   _The Busy Coder's Guide to Android Development_ Version 3.6
 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
  
  
   --
   --
   Raghav Sood
   CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
   required to have 

[android-developers] Date Problem with mySQL

2011-09-04 Thread Atif Musaddaq
Hi, All

Facing small problem in my Android App. I am getting 4 values from the user
including current date which user can change. Date format is -MM-DD

Code
// this is for Date to be displayed
private void updateDate() {
mDateDisplay.setText(
new StringBuilder()
// Month is 0 based so add 1
.append(mYear).append(-)
.append(mMonth + 1).append(-)
.append(mDay)
);
date=mDateDisplay.getText().toString();
Log.i(Date,date);
}

It is displaying the right date and also updating it on Mobile
device/emulator.

Now i have list of 4 pairs which i am sending with URL to the PHP Server

ListNameValuePair nameValuePairs = new ArrayListNameValuePair(4);
.
nameValuePairs.add(new BasicNameValuePair(Date, date));
..

*It is sending all other 3 values to my mySQL database but not the DATE. I
also changed the Format of the Date but no success.*
*
*
*Any help please*



-- 
Musaddaq

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

2011-09-04 Thread Samsung Galaxy
If i hard code the value like this.

nameValuePairs.add(new BasicNameValuePair(Date, 2001-09-04));

it works.


Musaddaq

On Sep 4, 8:44 pm, Atif Musaddaq atif.musad...@gmail.com wrote:
 Hi, All

 Facing small problem in my Android App. I am getting 4 values from the user
 including current date which user can change. Date format is -MM-DD

 Code
 // this is for Date to be displayed
 private void updateDate() {
     mDateDisplay.setText(
         new StringBuilder()
                 // Month is 0 based so add 1
         .append(mYear).append(-)
                 .append(mMonth + 1).append(-)
                 .append(mDay)
                 );
     date=mDateDisplay.getText().toString();
     Log.i(Date,date);

 }

 It is displaying the right date and also updating it on Mobile
 device/emulator.

 Now i have list of 4 pairs which i am sending with URL to the PHP Server

 ListNameValuePair nameValuePairs = new ArrayListNameValuePair(4);
 .
 nameValuePairs.add(new BasicNameValuePair(Date, date));
 ..

 *It is sending all other 3 values to my mySQL database but not the DATE. I
 also changed the Format of the Date but no success.*
 *
 *
 *Any help please*

 --
 Musaddaq

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

2011-09-04 Thread Nikolay Elenkov
A good photographer uses a real camera :) Btw, there are different formats
to what is commonly referred to RAW.

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

2011-09-04 Thread Jim Graham
On Mon, Sep 05, 2011 at 12:03:45AM +0530, Appaholics wrote:
 I was looking to do more with the Android camera. Personally I have nothing
 against the formats that are currently supported, except that a good
 photographer (which I am not) would be able to get a much better image if
 all the camera data is kept in a raw format for post processing.

Time to inject a couple of important points  First, the raw image
format you're referring to is a TIFF image.  It's the highest resolution
format that is in common use.

HOWEVER, the digital cameras that I've seen on Android devices have all
been in the 2 to 3 MP range.  That stinks.  That REALLY stinks.  As an
amateur photographer, myself, with some training by a pro, I wouldn't
bother with a TIFF from any digital camera in that range.  It's just
not worth it.  A PNG is fine.  TIFFs come into play on the high
resolution side...not with extremely low resolutions.  And it's not
just about the resolution; you also have to look at the glass;  a
poor-quality lens will produce a terrible image even at the highest
resolution.  Likewise, a low resolution digital's image will just end
up being pixelated if you expand it beyond a certain size (size limited
by resolution).

If you want to do serious photography, you won't be using a low-res
digital.  (You might not be using a digital camera at all---there is
still no substitute for film in some areas of photography.)

Low resolution digitals have their place; it's the same place that
the old Instamatic or Polaroid cameras had:  memory pictures.  People
taking these tend not to care (or even know) about TIFFs.

High resolution digital imagery has its places too.  More serious
photography (where digital fits) is one.  I used to work with another
area, as well...but since I was read out of that program years ago

Later,
   --jim

-- 
73 DE N5IAL (/4)| DMR: So fsck was originally called
spooky1...@gmail.com|  something else.
 Running FreeBSD 7.0  | Q:   What was it called?
ICBM / Hurricane:   | DMR: Well, the second letter was different.
   30.44406N 86.59909W  |-- Dennis M. Ritchie, Usenix, June 1998.

Android Apps Listing at http://www.jstrack.org/barcodes.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] Android Gallery View Application

2011-09-04 Thread GMR
Hello buddies.

I am developing an app like default gallery.
though It is not gallery application, but similar to it,

The main view of my app is gallery view which contains content pages.
And then when use tap the screen left or right, gallery items are
selected only one according to the tap direction.

if user started dragging, next page would follew the previous or next
one like scrolling.

Now, on my gallery view, whe user taps the screen, the gallery items
started scrolling.
they should not be scrolled . Just push to left or right one by one

any reply would be appricieted

tnx 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] Retrieve Keyboard Candidates

2011-09-04 Thread Lemon CustardCake
I am trying to create a keyboard suggestion(candidate) bench marking
tool. (for private testing purpose only)
(Just to add, I am pretty noobish on the android platform)

Is there a way I could retrieve the current keyboard candidates via
InputMethodManager or some other method?
Or, is there a way to retrieve views of other applications.
(Keyboards)

Thank you very much.

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


[android-developers] Re: Webview with flash video in Android

2011-09-04 Thread GMR
2.2 started to support flash content. previous version of android
cannot support flash contents naturally.

On Sep 2, 2:04 am, deepak emailmedee...@gmail.com wrote:
 I am calling a webview which contains a flash video and its playing
 without issues on Android 2.2 onwards. Its not playing in Android 2.1.
 Wanted to know whether it will play in Android 2.1 Update ?

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


[android-developers] Android AudioRecord Modulation Demodulation

2011-09-04 Thread Androino
Hi everyone,

I'm a student from Spain who is developing a project with Android
where I try to connect Android devices with Arduino microcontroller. I
explain everything here in my blog, wehre I comment every progress I
make.

At this moment I'm trying to record some sound through the device's
MIC and try to recover it from an array where I save all the data.

Here is the code:


package org.ardroino.prototype;

import android.app.Activity;
import android.os.Bundle;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecord;
import android.media.AudioTrack;
import android.media.MediaRecorder;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import android.content.Context;
//import java.nio.ByteBuffer;
//import android.media.AudioTrack;
//import android.media.MediaRecorder.AudioSource;

public class HelloworldActivity extends Activity {
/** Called when the activity is first created. */
private static final int AUDIO_SAMPLE_FREQ = 8000;
// private static final int AUDIO_BUFFER_SIZE=11025;
private TextView TextAudio;
private String msg2 = ;
private String msg1 = ;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
setButtonClickListener();
}

private void setButtonClickListener() {
Button ButtonRec = (Button) findViewById(R.id.Rec);

TextAudio = (TextView) findViewById(R.id.Values);

ButtonRec.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
try {
recordAudio();
} catch (Exception e) {
e.printStackTrace();
debugMessage(Error + e.getMessage());
}
}
});

}

protected void onResume() {
super.onResume();
}

private void recordAudio() {
debugMessage(recordAudio():);

int AUDIO_BUFFER_SIZE =
AudioTrack.getMinBufferSize(AUDIO_SAMPLE_FREQ,
2,
AudioFormat.ENCODING_PCM_16BIT);

appendDebugInfo(BufferSize, + AUDIO_BUFFER_SIZE );

byte[] audioData = new byte[AUDIO_BUFFER_SIZE];

AudioRecord localAudioRecord = new AudioRecord(
MediaRecorder.AudioSource.MIC, 
AUDIO_SAMPLE_FREQ,
2,
AudioFormat.ENCODING_PCM_16BIT, 
AUDIO_BUFFER_SIZE);

AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC,
AUDIO_SAMPLE_FREQ, 2,
AudioFormat.ENCODING_PCM_16BIT, 
AUDIO_BUFFER_SIZE,
AudioTrack.MODE_STREAM);

// audio recording

localAudioRecord.startRecording();
int nBytes=localAudioRecord.read(audioData, 0, 
AUDIO_BUFFER_SIZE);


//atrack.write(buffer, 0,   buffer.length);

appendDebugInfo(NBytes, + nBytes );

try {
Thread.sleep(1000 * 5);
} catch (InterruptedException e) {
e.printStackTrace();
}

// stop and free resources

//track.write(audioData, 0, AUDIO_BUFFER_SIZE);
localAudioRecord.stop();
localAudioRecord.release();
// process audio data
showAudioData(audioData, nBytes);

}

private void appendDebugInfo(String label, String msg){
String txt =  + TextAudio.getText();
TextAudio.setText(label + : + msg + \n + txt);
}

// print data
private void showAudioData(byte[] audioData, int nBytes) {
debugMessage(showAudioData():);

String msg = + TextAudio.getText()+\n;
for (int i = 1; i  (audioData.length)/2; i++) {
//msg += audioData[2*(i-1)] + \n;
msg += audioData[i] + \n;

}
TextAudio.setText(msg);
}

private void debugMessage(String msg) {
Context context = getApplicationContext();
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, msg, duration);
toast.show();
}
__


[android-developers] Android AudioRecord Modulation Demodulation

2011-09-04 Thread Androino
Hi everyone,

I'm a student from Spain who is developing a project with Android
where I try to connect Android devices with Arduino microcontroller. I
explain everything here in my blog: http://androino.blogspot.com/,
wehre I comment every progress I make.

At this moment I'm trying to record some sound through the device's
MIC and try to recover it from an array where I save all the data.

Here is the code:


package org.ardroino.prototype;

import android.app.Activity;
import android.os.Bundle;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecord;
import android.media.AudioTrack;
import android.media.MediaRecorder;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import android.content.Context;
//import java.nio.ByteBuffer;
//import android.media.AudioTrack;
//import android.media.MediaRecorder.AudioSource;

public class HelloworldActivity extends Activity {
/** Called when the activity is first created. */
private static final int AUDIO_SAMPLE_FREQ = 8000;
// private static final int AUDIO_BUFFER_SIZE=11025;
private TextView TextAudio;
private String msg2 = ;
private String msg1 = ;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
setButtonClickListener();
}

private void setButtonClickListener() {
Button ButtonRec = (Button) findViewById(R.id.Rec);

TextAudio = (TextView) findViewById(R.id.Values);

ButtonRec.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
try {
recordAudio();
} catch (Exception e) {
e.printStackTrace();
debugMessage(Error + e.getMessage());
}
}
});

}

protected void onResume() {
super.onResume();
}

private void recordAudio() {
debugMessage(recordAudio():);

int AUDIO_BUFFER_SIZE =
AudioTrack.getMinBufferSize(AUDIO_SAMPLE_FREQ,
2,
AudioFormat.ENCODING_PCM_16BIT);

appendDebugInfo(BufferSize, + AUDIO_BUFFER_SIZE );

byte[] audioData = new byte[AUDIO_BUFFER_SIZE];

AudioRecord localAudioRecord = new AudioRecord(
MediaRecorder.AudioSource.MIC, 
AUDIO_SAMPLE_FREQ,
2,
AudioFormat.ENCODING_PCM_16BIT, 
AUDIO_BUFFER_SIZE);

AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC,
AUDIO_SAMPLE_FREQ, 2,
AudioFormat.ENCODING_PCM_16BIT, 
AUDIO_BUFFER_SIZE,
AudioTrack.MODE_STREAM);

// audio recording

localAudioRecord.startRecording();
int nBytes=localAudioRecord.read(audioData, 0, 
AUDIO_BUFFER_SIZE);


//atrack.write(buffer, 0,   buffer.length);

appendDebugInfo(NBytes, + nBytes );

try {
Thread.sleep(1000 * 5);
} catch (InterruptedException e) {
e.printStackTrace();
}

// stop and free resources

//track.write(audioData, 0, AUDIO_BUFFER_SIZE);
localAudioRecord.stop();
localAudioRecord.release();
// process audio data
showAudioData(audioData, nBytes);

}

private void appendDebugInfo(String label, String msg){
String txt =  + TextAudio.getText();
TextAudio.setText(label + : + msg + \n + txt);
}

// print data
private void showAudioData(byte[] audioData, int nBytes) {
debugMessage(showAudioData():);

String msg = + TextAudio.getText()+\n;
for (int i = 1; i  (audioData.length)/2; i++) {
//msg += audioData[2*(i-1)] + \n;
msg += audioData[i] + \n;

}
TextAudio.setText(msg);
}

private void debugMessage(String msg) {
Context context = getApplicationContext();
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, msg, duration);
toast.show();
}

[android-developers] Bluetooth HID profile in 3.1

2011-09-04 Thread BT
Hi,

Does anyone know if it is possible to use bluetooth HID profile in
android 3.1? Android claims HID support is there for both USB and
Bluetooth, but I can't really see how to use it in the API. The device
connects properly as a HID device when paired, but how do I get a
handle to it in the API?

/BT

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


[android-developers] project contains many error

2011-09-04 Thread dhanaraj chaudhari
Hello,

I am new andriod developer, I have developed new project in Eclips.
There are many .java files  some of the xml layout  files all these
files not contain error. but in project explorer the project name
shows the red mark.

please any body can tell me why happens this



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] Multithread, concurrent thread

2011-09-04 Thread Logesh rajendren
By Running 100 threads , you will just drain the battery . Also in android
when the machine is running out of memory , it will abruptly terminate your
program without any prompt.

On Sat, Sep 3, 2011 at 3:03 PM, Christopher Van Kirk 
christopher.vank...@gmail.com wrote:

 No idea if it's possible, but is it wise? Considering there are a maximum
 of two cpus to work with, what are you gaining with so many threads?


 On 9/4/2011 5:52 AM, Goutom wrote:

 Hello

 I want to run 100 thread concurrently.Is it possible for android?

 Regards
 RiskyCoder
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@**
 googlegroups.com 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=enhttp://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.comandroid-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=enhttp://groups.google.com/group/android-developers?hl=en


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

Re: [android-developers] how many threads does android browser generate?

2011-09-04 Thread Dianne Hackborn
Sorry I don't know anything about BusyBox.  Aren't there man pages or
something?

Anyway, you just want top with an option to have it show threads.

On Fri, Sep 2, 2011 at 6:21 AM, Jack Harvard jack.harv...@gmail.com wrote:

 Thanks a lot, unfortunately we use BusyBox as the filesystem, the 'top'
 command options are slightly different,  'top -b' got me something as
 follows, but would like to get something as you did (suppose you use ps
 command, i couldn't get exactly the same output as yours, would be nice to
 have the function names printed out).

 Mem: 189324K used, 65772K free, 0K shrd, 864K buff, 78104K cached
 CPU: 50.0% usr  0.0% sys  0.0% nic 50.0% idle  0.0% io  0.0% irq  0.0% sirq
 Load average: 0.18 0.17 0.09 4/298 1085
  PID  PPID USER STAT   VSZ %MEM CPU %CPU COMMAND
  728   727 1000 S 136m 54.7   2  0.0 system_server
 1027   727 10030R 128m 51.2   3  0.0 com.android.browser
  786 727 1001 S86028 33.6   0  0.0 com.android.phone
  868   727 10005S83568 32.6   0  0.0 android.process.acore
  960   727 10029S83516 32.6   1  0.0 com.android.mms
  779   727 10012S78344 30.6   0  0.0 com.android.inputmethod.latin
  787 727 1000 S76668 29.9   1  0.0 com.android.systemui
  788   727 10020S76120 29.7   1  0.0 com.android.launcher
  932   727 10016S73868 28.8   0  0.0 com.android.email
 1002   727 10027S73584 28.7   2  0.0 com.cooliris.media
  905   727 10003S73176 28.5   3  0.0 android.process.media
  916   727 10006S72168 28.1   1  0.0 com.android.deskclock
  945   727 10025S72040 28.1   3  0.0 com.android.providers.calendar
  985   727 10013S71856 28.0   0  0.0 com.android.quicksearchbox
  899   727 10002S71448 27.9   1  0.0 com.android.bluetooth
  977   727 10008S71384 27.8   0  0.0 com.android.music
  993   727 10014S70820 27.6   0  0.0 com.android.protips

 On 2 Sep 2011, at 00:11, Dianne Hackborn wrote:

  Many of those probably aren't even browser threads, but threads for
 Dalvik and the application framework.  For example, here is a list of
 threads in my browser:
 
  1 7035native  79  21  main
  *27038vmwait  10  0   GC
  *37040vmwait  0   0   Signal Catcher
  *47041running 0   5   JDWP
  *57042vmwait  13  7   Compiler
  *67043wait0   0   ReferenceQueueDaemon
  *77044wait0   0   FinalizerDaemon
  *87045timed-wait  0   0   FinalizerWatchdogDaemon
  9 7046native  0   0   Binder Thread #1
  107047native  0   0   Binder Thread #2
  117057wait0   0   pool-2-thread-1
  127050native  0   0   CookieSyncManager
  137056timed-wait  2   0   pool-1-thread-2
  147058native  322 30  WebViewCoreThread
  157053native  2   1   BackgroundHandler
  167054timed-wait  0   0   pool-1-thread-1
  177059wait1   0   AsyncTask #1
  187062native  8   1   TexturesGenerator
  *19   7063wait10  1   Thread-183
  207067native  0   0   Thread-185
  217066native  6   0   Thread-186
  227070wait10  1   AsyncTask #2
  237074native  18  51  Thread-188
  247076native  0   0   Thread-189
  257077wait0   0   AsyncTask #3
  267078wait10  1   AsyncTask #4
  277079wait11  0   AsyncTask #5
 
  WebViewCoreThread is I believe the main browser thread.  You can easily
 see what threads are actually using CPU with adb shell top -m 10 -t while
 you are using the browser.
 
  On Thu, Sep 1, 2011 at 12:15 PM, Jack Harvard jack.harv...@gmail.com
 wrote:
  Thanks for your reply. I'm on the research side, rather than development.
 I observed 17-22 threads from com.android.browser, suppose only one of those
 thread is doing the real work of rendering the page.
 
  On 31 Aug 2011, at 22:58, Dianne Hackborn wrote:
 
   I really don't know what you are trying to get at.  As I said, as far
 as I know browser CPU use is generally pretty single-threaded -- the DOM
 rendering and JavaScript interpreter all need to run in the same thread.
  Just creating more threads doesn't magically allow this work to be spread
 across them.
  
   And again, Gingerbread was not written for multi-core CPUs.  In fact if
 you try to run stock GB on a multi-core CPU you will be extremely unstable
 because there are many things not working correctly for SMP, especially ARM
 SMP.  So it doesn't make sense to ask questions about how stock GB runs on
 multi-core, because it just doesn't.
  
   If you are wondering about a particular phone someone has released with
 GB, you will need to talk with that manufacturer, because they will have
 needed to do some work to have GB 

[android-developers] Control Keyboard Backlight

2011-09-04 Thread Gastty
hi, i want to control the keyboard backlight, like with the 
FLASH_MODE_TORCH , that i can turn on and off, and make a pulse
signal. The problem it's that a only found for controlling the
keyboard light this: PowerManager.FULL_WAKE_LOCK but this changes the
screen  at full brightness, and i only want to change the keyboard
brightness, someone 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] XML parsing in android

2011-09-04 Thread Krishna Prasad
Is It possible to parse a dynamically created xml in android?

I want  to display the xml based on fields in the xml.

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

2011-09-04 Thread kalpana chaurasia
I must need to use table layout. but i want table layout with fixed
size when there is no record or two row. after deleted that two
records(row) size is fixed. and when more than two records(row) are
added then size of table is increasing. table layout created on
runtime. is it possible ? how? i create table layout at runtime and
add row dynamically its working and also size is also increasing but
when i put fixed size then the size is not increasing. Suggest me.
Thanks
This is my code:
layout is:
   RelativeLayout android:id=@+id/relativeLayout1
android:layout_width=fill_parent android:layout_marginTop=10dip
android:layout_height=wrap_content TableLayout android:id=@+id/
TableLayout01 android:background=#FF
android:layout_width=fill_parent android:layout_height=130dip /
TableLayout /RelativeLayout

code:

TableLayout table = (TableLayout) findViewById(R.id.TableLayout01);
TableLayout.LayoutParams params = new
TableLayout.LayoutParams( TableLayout.LayoutParams.FILL_PARENT,
TableLayout.LayoutParams.WRAP_CONTENT); table.setLayoutParams(params);

above code to increasing size.
Run first time its display. but when i click the button to add rows it
gives error.
Please suggest 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] abd shell USB debugging

2011-09-04 Thread BT
Hello,

I have one question, I'm testing android devices, and is it possible
abd command Enable or Disable USB debugging mode ?

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


[android-developers] JSON android

2011-09-04 Thread ashish
How to check whether an element is a JSONArray or JSONObject. I wrote
the code to check,

if(jsonObject.getJSONObject(Category).getClass().isArray()) {

} else {

}
In this case if the element 'category' is JSONObject then it work fine
but if it contains an array then it throw exception: JSONArray cannot
be converted to JSONObject. Please help. 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 me with adding overlays in google maps

2011-09-04 Thread Logesh
hello guys , i am just trying to add overlays and markers in google
maps in my android application . I am very new to android
development . I have tried with all the examples and snippets given .
But nothing is working for me .
whatever i do i am getting only error message . please help me to
debug it !!

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


[android-developers] Updating a database without freezing

2011-09-04 Thread Jared Kass
Hi,
I'm working on an app that records information for a study and posts
it to a database. An alert dialog prompts the user with a question and
the answer is recorded and sent. I'm successfully updating the
database using httpclient and httppost, however it takes a varying
amount of time, usually several seconds. This is unacceptable, and I
was wondering how to go about having this run in the background. Any
advice you could give me would be great, thanks!

-Jared

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


[android-developers] Wake lock question

2011-09-04 Thread chris alderson
If the device is sleeping and you acquire a partial wake lock, does
the device immediately go back to sleep when you release the lock? If
not, how long does it take?

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

2011-09-04 Thread Luigi Papino
You simply need to save the information before clearAll and restore
them later.
However it seems that isn't a way to remove single tab using the
standard API.

On 2 Set, 14:26, sj sujith...@gmail.com wrote:
 There is a method to add a tab in TabHost as well as clear all tabs,
 but there are no APIs to remove one single tab.

 Following the logic in clearAllTabs tried to
 tabwidget.removeViewAt(index);
 tabHost.getTabContentView().removeViewAt(index)

 After this the behaviour is strange. I assume that is because the
 mTabSpecs still contain the tabspec reference. mTabSpecs is a private
 variable in TabHost and there are not get methods to get a handle to
 this.

 How to resolve the issue if one wants to close a single tab, and yes i
 have tried to clear all the tabs and add back all the tabspecs. It
 does not work for my usecase where some views contains some
 information regarding a session. If i recreate those tabspecs, i will
 go back to the starting point in those views.

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


[android-developers] Background Application Consistently On

2011-09-04 Thread Ben Chen
I'm not that familiar with Android development, just IOS so please
pardon if this is question seems too fundamental.

I'm oking to create an applicaiton that once launched will
consistently be on ... even when the individual is not actively
using the phone/app.  At various intervals, the application would send
infomation (e.g., location, texts, etc.).  Is this device resident
application that is always ON and automatically sends this information
without the user's manual intervention each time implementable in
Android?  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] OutOfMemoryError

2011-09-04 Thread NWD Sports
Yes. Go to the AVD manager and find the virtual device you use to debug on. 
Set the SD card size to a higher value. you shouldn't run into the problem 
again.




Nicholas L. - NWD Sports.com Co-Founder
-Original Message- 
From: bob

Sent: Friday, September 02, 2011 7:43 PM
To: Android Developers
Subject: [android-developers] OutOfMemoryError

I'm getting an OutOfMemoryError.  Is there any way to increase the
amount of memory my app can use?

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


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


[android-developers] how to upgrade andriod

2011-09-04 Thread piyush
I am using Samsung Pop model having 2.2.1 Version of Android and want
to upgrade it. Can any one let me know how can I upgrade my Android?
Please let me know the procedure..


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] my file replacing app

2011-09-04 Thread mizzeeboy
Hi there i was wondering if i could make an app with android eclipse
which could copy and replace a file on a phone micro sd card? Is it
possible ifso can some one please give me the code

thanks

mizzeeboy

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


[android-developers] getLocalActivityManager().getActivity(tabTag) return NULL

2011-09-04 Thread paddy
I have 2 tabs with tagID tag01 and tag02. I have explicitly set
the focus to first tab by calling tabHost.setCurrentTab(0)

When i call getLocalActivityManager().getActivity(tag01) i get the
object of activity but when i call
getLocalActivityManager().getActivity(tag02) then i get NULL.

Now when i again run my app and this time click second tab and then
getLocalActivityManager().getActivity(tag02) gives object
(toString() in logcat).
So after checking it again and again i found that only activity in
first tab( that i had set focus explicitly by
tabHost.setCurrentTab(0)) returns non-null and other tabs return null
unless u don't click those tab.
When i click all tabs i.e atleast i go through all tabs by clicking
them then getLocalActivityManager().getActivity(anyTag) returns
object(i am tracing toString()) . How to access activity from other
tabs without clicking other tabs because user won't know that he/she
has to click tabs.
Please give some suggestions. Because i have to access activity in
tabs in my app.
I hope you understood my problem.

(Note: i am tracing in LogCat)

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

2011-09-04 Thread david ross
This is a design bug as far as I am concerned. There seems to be
nothing you can do about it except let the poor phone user drag the
toast to the trash can. I think you can listen for an Intent
PACKAGE_UNINSTALL and then check to see if it is actually a reinstall
for a new version, but there is no way to programatically remove the
widget from the home screen.

A related problem use-case is when the user does the CLEAR DATA
option. This seems to be like an uninstall without actually removing
the APK. The intention is that it is like taking the App back to the
just installed state, but if the App is actually an active home
screen widget then it just causes chaos. The widget remains, but any
shared preferences and any registered receivers are removed. I call
that a ghost widget. At least the user can drag it to the trash can.

(Ghost Widgets occur also from things like a power off/on cycle when
the widget config app is running and in pre 2.1 OS if the user tries
to install the widget on a home screen with not enough space to fit
the widget. Some ghosts are in the eye of the OS (it thinks the widget
exists but it doesn't), others are in the eye of the App, but in all
cases there is no functioning widget.)

On Aug 11, 11:14 am, angel999 lehuy...@gmail.com wrote:
 In Android, I have created awidgetfor my application. When I
 uninstall the app, thewidgetshows problemloadingwidget error in
 home screen. I need a scenario wherewidgetshould be removed by the
 developer through code (and not by the drag and drop to the trash)
 when I uninstall the app. Is it possible? If so, what changes we need
 to do? Is there anything that can be set in the manifest so that it
 removes all references of the app once it is uninstalled? Please help
 me solve thisproblem. 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] Aw: SyncManager can't find my sync adapter

2011-09-04 Thread Thomas Mair
I am stuck with the same problem and can't find a solution...

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

2011-09-04 Thread Simon Trigona
Hi, did you find a solution?

Thanks,
Simon

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

[android-developers] .sh script

2011-09-04 Thread ACN
Hi! I'm new to Android developing, but I'd like to ask a how to go
about writing a script to accomplish two simple tasks. I'd like to put
this script in the existing init.post_boot.sh script found in /etc.

I'd like it to run a loop while it waits for com.htc.launcher to be
running, then go and rename a file, copy another file to a location
and possibly set a marker on the system not to do this again on the
next reboot. Any ideas how I can go about accomplishing this ?

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


[android-developers] Create an animation over an Overlay

2011-09-04 Thread Massimo
Hi,
It's possible to create an animation over an overlay into a map?

I need to design a line that goes left to right into 10 seconds.

Thks a lot

Massimo

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

2011-09-04 Thread NWD Sports
Try www.parse.com. I have used some of their services and I believe there is a 
way to integrate licensing. I am not promising anything as this may be the 
wrong service. If you can’t find anything let me know and I will try and find 
the right service I used.



Nicholas L. - NWD Sports.com Co-Founder
-Original Message- 
From: Jim 
Sent: Friday, September 02, 2011 6:27 PM 
To: Android Developers 
Subject: [android-developers] Re: Limiting installs of licensed app to number 
of devices 

I see your point. I mis-read your concern. I implemented the policy to
check licensing at intervals, to minimize sharing through temporary
account setup for app download purposes.

A service for this is an interesting concept. Is there any additional
interest out there? We may be interested in providing this service (we
are currently developing an app that requires device specific
licensing, so providing it as a service is a consideration also), but
it seems like it is a very limited market, unfortunately.

-Jim

On Sep 2, 2:11 pm, Kevin Tambascio ke...@appbrewer.net wrote:
 Hi Jim,

 I originally read this section when implementing licensing:

 Caution: Per-device licensing is not recommended for most applications
 because:

 - It requires that you provide a backend server to manage a users and
 devices mapping, and
 - It could inadvertently result in a user being denied access to an
 application that they have legitimately purchased on another device.

 I didn't implement this because of needing to have a backend server.
 Also, at the time, my app was more consumer focused, and therefore I
 wasn't too concerned since the average user may only have 1-2 devices
 (phone and a tablet, etc).

 Are there any paid services that offer this as a backend?  I haven't
 found any.  I did find a PHP project (http://code.google.com/p/
 marketlicensing/) that would serve as a starting point.  You'd have to
 keep a database of user devices and identities, and that brings in
 security and privacy issues into the mix.

 -Kevin

 On Sep 1, 5:51 pm, Jim secondphonea...@gmail.com wrote:







  According to the documentation, if you implemented the licensing
  correctly, it will not allow installation on multiple devices for the
  same license. (Check out the device identifier section 
  here:http://developer.android.com/guide/publishing/licensing.html)

  Is there documentation or information elsewhere that contradicts this?

  -Jim

  On Sep 1, 2:57 pm, Kevin Tambascio ke...@appbrewer.net wrote:

   Hi,

   As my app has evolved, it has appealed more to business owners who
   want to purchase the app for their employees.  According to the
   Android market statistics, yesterday I had a one day spike in the
   number of active installs, that that amounted to 10x my normal
   volume.  Normally I sell around 5 per day, but yesterday the active
   installs bumped up by about 55.  I know I did not sell 50+ licenses in
   one day per my merchant account.  My fear is that a company bought one
   copy of my app, and since they used the same email address on those
   other devices, were able to download and use it on 50 devices.  I have
   no problem in letting each person use my app on a few devices, but 50
   crosses the line for me.

   Has anyone found any successful strategies to limit the app to just a
   few devices (say a license that lets you install it on 3 or 5
   devices)?  I would imagine that you'd have to extend the licensing
   system along with your own server to validate the number of devices,
   but I don't think users would appreciate my app calling home when
   started.

   Thoughts?

   -Kevin

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

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

[android-developers] Aw: SyncManager can't find my sync adapter

2011-09-04 Thread Thomas Mair
I finally found the solution.

The contentAuthority value must equal the name used for the Provider 

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

[android-developers] Unable to launch Emulator

2011-09-04 Thread Sagar Rajagopal
Hi,

I am getting the below error while trying to run the helloworld
android application.

invalid command-line parameter: Files\Android\android-sdk\tools/
emulator-arm.exe.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information

[2011-09-02 08:38:18 - HelloAndroid] --
[2011-09-02 08:38:18 - HelloAndroid] Android Launch!
[2011-09-02 08:38:18 - HelloAndroid] adb is running normally.
[2011-09-02 08:38:18 - HelloAndroid] Performing
com.example.helloandroid.HelloAndroidActivity activity launch
[2011-09-02 08:38:18 - HelloAndroid] Automatic Target Mode: Preferred
AVD 'My_AVD' is not available. Launching new emulator.
[2011-09-02 08:38:18 - HelloAndroid] Launching a new emulator with
Virtual Device 'My_AVD'
[2011-09-02 08:38:18 - Emulator] invalid command-line parameter: Files
\Android\android-sdk\tools/emulator-arm.exe.
[2011-09-02 08:38:18 - Emulator] Hint: use '@foo' to launch a virtual
device named 'foo'.
[2011-09-02 08:38:18 - Emulator] please use -help for more information


Please help me out to figure the issue as I am a new bie to Android.

I even tried searching for resolution but didnot find anything for
already posted queries.

Please help me to get this resolved.

Awaiting your reply,

Sagar

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

2011-09-04 Thread neha agrawal
connect 2 device through bluetooth den print msg in a format like if we
press 0 den it display hello,when i press 2 it display android..help me

On Sat, Sep 3, 2011 at 12:00 AM, hpadrao hpad...@gmail.com wrote:

 Anyone?

 On 1 set, 15:49, hpadrao hpad...@gmail.com wrote:
  I'm gonna be crazy, I'm trying to have 1 9patch image with 2 contents
  (Different views). How can I do this? Please see below my code:
 
  ?xml version=1.0 encoding=utf-8?
  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android android:orientation=vertical
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:background=@drawable/test_imag 
  TextView android:layout_width=wrap_content
 android:textSize=4sp
  android:layout_height=wrap_content android:text=@string/hello
  android:layout_alignParentTop=true
  android:layout_alignParentBottom=true /
  TextView android:text=@string/hello
  android:layout_height=wrap_content
  android:layout_width=wrap_content
  android:layout_alignParentTop=true
  android:layout_alignParentBottom=true/TextView
  /LinearLayout
 
  Could you please help me?
 
  Thanks a lot.
 
  Hélio Padrão

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

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

[android-developers] How to detect if a view is on screen

2011-09-04 Thread vdaele
Hello,

Suppose I have a horizontal scrollable list of say 100 movie posters
(each in its own View)
of which only 4 Views fit on the screen at the same time.
When I've scrolled through the complete list once, I will have 100
Bitmaps in memory of which only 4 are visible.

To save memory, I want to release the Bitmaps of those Views that are
off-screen.
Is there an easy way to know whether a View is effectively visible or
should I compute this myself?

(I've looked at the onVisibilityChanged listener but this seems to
serve a different purpose)

Thanks for your help,

Marc



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


[android-developers] multitasking implementation

2011-09-04 Thread sandy
I have to divide my my screen in four parts and show different
activity running on different  parts of screen running together.help
me to do this.

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


[android-developers] Re: Tamil Fonts in android 2.1

2011-09-04 Thread ravishankar ayyakkannu
Hi Rooney, 

There is no inbuilt support yet. However there are some apps and browsers 
that support Tamil viewing and typing. Samsung Ace is also providing native 
support for Tamil now. 

Please check 

http://microblog.ravidreams.net/2011/01/tamil-in-android-mobile-phones/

for state of Tamil in Android OS now.

Ravi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] GridView shows only one row with layout_height=WRAP_CONTENT

2011-09-04 Thread NWD Sports
If you want to see all of the rows you need to set layout_height=fill_parent 
not layout_width=fill_parent and layout_height=wrap_content. It won't be 
able to show all the rows though unless you make them all really small 
anyway depending on the number of cells you have. If you have a lot of cells 
then it is pointless to even try to get them to show up on one screen.




Nicholas L. - NWD Sports.com Co-Founder
-Original Message- 
From: Shri

Sent: Friday, September 02, 2011 7:33 PM
To: Android Developers
Subject: [android-developers] GridView shows only one row with 
layout_height=WRAP_CONTENT


I am using a GridView in a LinearLayout. I want the GridView to show
up as tall as needed to show all the rows. However, I am seeing only
one row when set (layout_width=MATCH_PARENT and)
layout_height=WRAP_CONTENT. If I set layout_height to a size that
equals mulitple rows, then I do see those rows.

Looking at onMeasure in 
http://www.netmite.com/android/mydroid/frameworks/base/core/java/android/widget/GridView.java,

I see that onMeasure does not calculate the number of rows at all, and
so I can understand why only one row shows up. So it seems like an
oversight.

Shouldn't layout_height=WRAP_CONTENT show all rows (if possible)? Is
there any workaround?

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


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


[android-developers] How to detect Outgoing Call Connected Event?

2011-09-04 Thread Jelly Chen
BroadcastReceiver can not do it.

I try to detect from logcat : DEBUG/CallNotifier(116): stopRing()... 
(OFFHOOK state)
if (line.contains(stopRing()... (OFFHOOK state))) { 
Log.d(TAG, Outgoing Call connected.);
}

But there are 5 Outgoing Call connected. logs before really connected.

Any suggestion ? Thanks!

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

[android-developers] Re: SearchView in Action Bar randomly stealing focus

2011-09-04 Thread UpNextCTO
Hi Mike, I'm seeing the exact same thing. Any ideas on how to fix
this?
This seems like an android bug.

On Jul 27, 4:17 pm, Mike Mangino mmang...@elevatedrails.com wrote:
 We're developing an app on Honeycomb that uses the new tab fragments stuff.
 We also have a SearchView in the Action Bar. We're consistently seeing the
 SearchView gain focus and bring up the keyboard on tab switch. It's
 currently 100% reproducible and always happens on the third tab change. Is
 anyone else seeing this on 3.1 or am I completely crazy?

 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


[android-developers] SAP Parser will not read and print one section of my xml File

2011-09-04 Thread Walkdog
I really need someone help in trying to get my parser to read and show
just one section of xml file, i can get it two read from top to bottom
but when i try and use the inner tags in my xml handler that separate
each section out it doesn't do it and goes mental and shows one bit of
it

import java.net.URL;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

//import android.content.Intent;
import android.os.Bundle;
//import android.view.View;
//import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Mainweather extends Seskanoreweatherpart2Activity {

weatherlist sitesList = null;

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

 LinearLayout layout = new LinearLayout(this);
 layout.setOrientation(1);
 layout.setBackgroundColor(0xFF80);

 TextView value [];

try {

/** Handling XML */
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();

/** Send URL to parse XML Tags */
URL sourceUrl = new URL(
http://www.seskanore.com/currentoutput.xml;);


/** Create handler to handle XML Tags ( extends
DefaultHandler ) */
XMLhandler XMLhandler = new XMLhandler();
xr.setContentHandler(XMLhandler);
xr.parse(new InputSource(sourceUrl.openStream()));

} catch (Exception e) {
System.out.println(XML Pasing Excpetion =  + e);
}

/** Get result from XMLhandler SitlesList Object */
sitesList = XMLhandler.sitesList;

/** Assign textview array lenght by arraylist size */
   //   item = new TextView[sitesList.getName().size()];
value = new TextView[sitesList.getName().size()];

/** Set the result text in textview and add it to layout */
for (int i = 0; i  sitesList.getName().size(); i++) {
value[i] = new TextView(this);
value[i].setText(sitesList.getvalue().get(i)+  is 
+sitesList.getitem().get(i));

layout.addView(value[i]);

 }


/** Set the layout view to display */
setContentView(layout);

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


[android-developers] SAP Parser will not read and print one section of my xml File

2011-09-04 Thread Walkdog
I really need someone help in trying to get my parser to read and show
just one section of xml file, i can get it two read from top to bottom
but when i try and use the inner tags in my xml handler that separate
each section out it doesn't do it and goes mental and shows one bit of
it

This is the code for my Parser

package heavytime
import java.net.URL;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

//import android.content.Intent;
import android.os.Bundle;
//import android.view.View;
//import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Mainweather extends Seskanoreweatherpart2Activity {

weatherlist sitesList = null;

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

 LinearLayout layout = new LinearLayout(this);
 layout.setOrientation(1);
 layout.setBackgroundColor(0xFF80);

 TextView value [];

try {

/** Handling XML */
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();

/** Send URL to parse XML Tags */
URL sourceUrl = new URL(
http://www.seskanore.com/currentoutput.xml;);


/** Create handler to handle XML Tags ( extends
DefaultHandler ) */
XMLhandler XMLhandler = new XMLhandler();
xr.setContentHandler(XMLhandler);
xr.parse(new InputSource(sourceUrl.openStream()));

} catch (Exception e) {
System.out.println(XML Pasing Excpetion =  + e);
}

/** Get result from XMLhandler SitlesList Object */
sitesList = XMLhandler.sitesList;

/** Assign textview array lenght by arraylist size */
   //   item = new TextView[sitesList.getName().size()];
value = new TextView[sitesList.getName().size()];

/** Set the result text in textview and add it to layout */
for (int i = 0; i  sitesList.getName().size(); i++) {
value[i] = new TextView(this);
value[i].setText(sitesList.getvalue().get(i)+  is 
+sitesList.getitem().get(i));

layout.addView(value[i]);

 }


/** Set the layout view to display */
setContentView(layout);
 }
}

This is the code for my XML handler

package heavytime
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class XMLhandler extends DefaultHandler {

Boolean currentElement = false;
Boolean temperature = false;
String currentValue = null;
//  int currentVal = 0;
public static weatherlist sitesList = null;

public static weatherlist getSitesList() {
return sitesList;
}

public static void setSitesList(weatherlist sitesList) {
XMLhandler.sitesList = sitesList;
}

 @Override
public void startDocument() throws SAXException {
// Some sort of setting up work
}

@Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {

currentElement = true;

if (localName.equals(weatherdata))
{
sitesList = new weatherlist();}
else if (localName.equals(item)){
temperature = true;
String attr = attributes.getValue(name);
sitesList.setValue(attr);}


}



/** Called when tag closing*/
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {

currentElement = false;

/** set value*/
if (localName.equals(temperaturetags)){
localName.equalsIgnoreCase(item);
sitesList.setName(currentValue);
localName.equalsIgnoreCase(value);
sitesList.setitem(currentValue);

}


temperature = false;
}

/** Called to get tag characters*/
@Override
public void characters(char[] ch, int start, int length)
throws SAXException {

if (currentElement) {
currentValue = new String(ch, start, length);
currentElement = false;
}
}

@Override
public void endDocument() throws SAXException {
// Some sort of finishing up work
}
}

This the Code for my Arraylist for displaying the parsed information

package heavytime
import java.util.ArrayList;


public class weatherlist {


[android-developers] SAP Parser will not read and print one section of my xml File

2011-09-04 Thread Walkdog
I really need someone help in trying to get my parser to read and show
just one section of xml file, i can get it two read from top to bottom
but when i try and use the inner tags in my xml handler that separate
each section out it doesn't do it and goes mental and shows one bit of
it

This is the code for my Parser

package heavytime
import java.net.URL;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

//import android.content.Intent;
import android.os.Bundle;
//import android.view.View;
//import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Mainweather extends Seskanoreweatherpart2Activity {

weatherlist sitesList = null;

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

 LinearLayout layout = new LinearLayout(this);
 layout.setOrientation(1);
 layout.setBackgroundColor(0xFF80);

 TextView value [];

try {

/** Handling XML */
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();

/** Send URL to parse XML Tags */
URL sourceUrl = new URL(
http://www.seskanore.com/currentoutput.xml;);


/** Create handler to handle XML Tags ( extends
DefaultHandler ) */
XMLhandler XMLhandler = new XMLhandler();
xr.setContentHandler(XMLhandler);
xr.parse(new InputSource(sourceUrl.openStream()));

} catch (Exception e) {
System.out.println(XML Pasing Excpetion =  + e);
}

/** Get result from XMLhandler SitlesList Object */
sitesList = XMLhandler.sitesList;

/** Assign textview array lenght by arraylist size */
   //   item = new TextView[sitesList.getName().size()];
value = new TextView[sitesList.getName().size()];

/** Set the result text in textview and add it to layout */
for (int i = 0; i  sitesList.getName().size(); i++) {
value[i] = new TextView(this);
value[i].setText(sitesList.getvalue().get(i)+  is 
+sitesList.getitem().get(i));

layout.addView(value[i]);

 }


/** Set the layout view to display */
setContentView(layout);
 }
}

This is the code for my XML handler

package heavytime
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class XMLhandler extends DefaultHandler {

Boolean currentElement = false;
Boolean temperature = false;
String currentValue = null;
//  int currentVal = 0;
public static weatherlist sitesList = null;

public static weatherlist getSitesList() {
return sitesList;
}

public static void setSitesList(weatherlist sitesList) {
XMLhandler.sitesList = sitesList;
}

 @Override
public void startDocument() throws SAXException {
// Some sort of setting up work
}

@Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {

currentElement = true;

if (localName.equals(weatherdata))
{
sitesList = new weatherlist();}
else if (localName.equals(item)){
temperature = true;
String attr = attributes.getValue(name);
sitesList.setValue(attr);}


}



/** Called when tag closing*/
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {

currentElement = false;

/** set value*/
if (localName.equals(temperaturetags)){
localName.equalsIgnoreCase(item);
sitesList.setName(currentValue);
localName.equalsIgnoreCase(value);
sitesList.setitem(currentValue);

}


temperature = false;
}

/** Called to get tag characters*/
@Override
public void characters(char[] ch, int start, int length)
throws SAXException {

if (currentElement) {
currentValue = new String(ch, start, length);
currentElement = false;
}
}

@Override
public void endDocument() throws SAXException {
// Some sort of finishing up work
}
}

This the Code for my Arraylist for displaying the parsed information

package heavytime
import java.util.ArrayList;


public class weatherlist {


[android-developers] How to avoid 3g or 2g(GPRS) disable when my mobile standby?

2011-09-04 Thread Bertrand Huang
Are there  any APIs can deal with this issue? I search a lot, but all
the messages I found are about how to keep wifi alive.

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] calling camera

2011-09-04 Thread Pandey, Sanat
Use This Code to Capture and get Image from Camera--

String fileName = new-photo-name.jpg;
//create parameters for Intent with filename
ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.TITLE, fileName);
values.put(MediaStore.Images.Media.DESCRIPTION,Image capture by
camera);//imageUri is the current activity attribute, define and save
it for later usage (also in onSaveInstanceState)
imageUri = getContentResolver().insert(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
//create new Intent
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);




protected void onActivityResult(int requestCode, int resultCode, Intent
data) {
if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {
if (resultCode == RESULT_OK) {
//use imageUri here to access the image

} else if (resultCode == RESULT_CANCELED) {
Toast.makeText(this, Picture was not taken,
Toast.LENGTH_SHORT);
} else {
Toast.makeText(this, Picture was not taken,
Toast.LENGTH_SHORT);
}
}
}

On Sat, Sep 3, 2011 at 4:14 PM, Lwe luaisul...@gmail.com wrote:

 how to call camera

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




-- 
*With Best Regards:*
*Sanat Pandey
*Android Developer
Mob: +918860924723
sanat.pan...@halosys.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] Programming in Android

2011-09-04 Thread Tareq Al-Ma'mari
Hi guys,

Good morning ,

I'm proud that I'm a member in this great group
I need your help to start programming in Android,just the beginning .

Thanks in advance, hope to hear from you,

yours
   Tareq,

tariq.mam...@gmail.com
facebook.com/tareq.mamari
twitter.com/tareq_mamari

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

2011-09-04 Thread Jim Graham
On Sat, Sep 03, 2011 at 10:54:21PM -0700, ACN wrote:

 I'd like to put this script in the existing init.post_boot.sh script
 found in /etc.

I cannot imagine that the Android's security would be so insanely flawed
as to allow you to do that (particularly if you want to do that from an
app).  I haven't seen what level a rooted device will allow, but I'd hope
that it still wouldn't allow THAT

The security implications are on the most SEVERE level  And even
if your intentions are ok, it could still be mis-used by someone whose
intentions are not so good

Later,
   --jim

-- 
73 DE N5IAL (/4)|  There it was, right in the title bar:
spooky1...@gmail.com|   Microsoft Operations POS.
 Running FreeBSD 7.0  | 
ICBM / Hurricane:   | Never before has a TLA been so appropriately
   30.44406N 86.59909W  |  mis-parsed. (alt.sysadmin.recovery)

Android Apps Listing at http://www.jstrack.org/barcodes.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] Android Operating System for Your Computer

2011-09-04 Thread abhilash
Android the new revolutionary OS from google is playing its role on
Tablets, and Mobile devices and got a wide variety of listeners in all
segments with its google driven interface .This feature rich operating
system intially limited to devices designed for Android and like meego
and chrome OS it is not readily available for Computers including mini
laptop,netbook and desktops . In one of the earlier article i
explained about this version and at that time i dont have an
installation on hand to detail the OS , now i got one instance of
android on my computer and so lets have a look on features.The project
bringing android to computer is named Android-x86 – Porting Android to
x86,

Read Full 
http://www.meabi.com/android-for-netbook-laptops-and-desktops-the-android86-project/

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

2011-09-04 Thread Mark Murphy
On Sun, Sep 4, 2011 at 3:07 PM, Jim Graham spooky1...@gmail.com wrote:
 HOWEVER, the digital cameras that I've seen on Android devices have all
 been in the 2 to 3 MP range.

Within about 18 inches of me I have a phone with a 5-megapixel camera,
a phone with a 13(!)-megapixel camera, and a tablet with a 5-megapixel
camera. The 5-megapixel devices are fairly conventional; the
13-megapixel one is a bit special. Not to mention crazy expensive.

There are Android phones with low-resolution cameras, but many people
will have phones with better cameras. Note that I'm not quibbling
about anything with your post, other than the prevalence of
better-megapixel devices.

-- 
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 Android Development_ Version 3.6 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] Updating a database without freezing

2011-09-04 Thread Satya Komatineni
You may want to look at using an asynctask

Here are some research notes on async task (This is not a tutorial but
could point you to do some work)
http://www.satyakomatineni.com/item/3536

On Fri, Sep 2, 2011 at 5:23 PM, Jared Kass jdk...@cornell.edu wrote:
 Hi,
 I'm working on an app that records information for a study and posts
 it to a database. An alert dialog prompts the user with a question and
 the answer is recorded and sent. I'm successfully updating the
 database using httpclient and httppost, however it takes a varying
 amount of time, usually several seconds. This is unacceptable, and I
 was wondering how to go about having this run in the background. Any
 advice you could give me would be great, thanks!

 -Jared

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



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

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


Re: [android-developers] multitasking implementation

2011-09-04 Thread Mark Murphy
You really do not want to show different activities running on
different parts of the screen running together. While ActivityGroup
could be forced into working that way, it has been deprecated, and new
development should be avoiding it.

Please look into fragments (both the native Honeycomb fragments and
the implementation in the Android Compatibility Library).

On Sat, Sep 3, 2011 at 2:04 AM, sandy sandeepsaga...@gmail.com wrote:
 I have to divide my my screen in four parts and show different
 activity running on different  parts of screen running together.help
 me to do this.

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

_The Busy Coder's Guide to Android Development_ Version 3.6 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


  1   2   >