[android-developers] Re: Touch screen Issue with Android { Jun'ichi}

2009-02-05 Thread Rajesh N
 Hi Jun'ichi,

 Touch screen after applying ur  patch, but everything is working in reverse
manner , I think X and Y co-ordinates have swapped, when I touch extreem
right icon , It selects extreem left icon!!! (wired!)

I have attched my mxc_ts.c file with mail, kindly give me some suggestion on
how to resolve this problem...

Best Regards,
Rajesh N

On Wed, Feb 4, 2009 at 9:35 PM, Jun'ichi Hirayama wrote:

> Hi  Rajesh
>
> Lastyear I was porting Android on IMX31 platform ,
> (kernel ver 2.6.22 )
>
> I adapted mxc_ts.c
>
> 
> ,diff -ur linux-2.6.22/drivers/input/touchscreen/mxc_ts.c 
> linux-2.6.22/drivers/input/touchscreen/mxc_ts.c
>
> --- linux-2.6.22/drivers/input/touchscreen/mxc_ts.c   2008-06-02 
> 20:40:12.0 +0900
> +++ linux-2.6.22.android/drivers/input/touchscreen/mxc_ts.c   2008-06-17 
> 18:49:28.0 +0900
> @@ -38,6 +38,15 @@
>
>  #define MXC_TS_NAME  "mxc_ts"
>
>
> +#define X_AXIS_MAX 1000
> +#define X_AXIS_MIN 80
> +#define Y_AXIS_MAX 1000
> +#define Y_AXIS_MIN 80
> +#define PRESSURE_MAX 1
> +#define PRESSURE_MIN 0
>
>  static struct input_dev *mxc_inputdev = NULL;
>
>  static u32 input_ts_installed;
>
> @@ -50,15 +59,39 @@
>   try_to_freeze();
>   memset(&ts_sample, 0, sizeof(t_touch_screen));
>   pmic_adc_get_touch_sample(&ts_sample, !wait);
> -
> +#if 1
> + if((ts_sample.x_position >= X_AXIS_MIN) &&
>
> + (ts_sample.x_position <= X_AXIS_MAX) &&
> + (ts_sample.y_position >= Y_AXIS_MIN) &&
> + (ts_sample.y_position <= Y_AXIS_MAX)) {
> + 
> + input_report_abs(mxc_inputdev, ABS_X, 
> ts_sample.x_position);
>
> + input_report_abs(mxc_inputdev, ABS_Y, 
> ts_sample.y_position);
> + input_report_abs(mxc_inputdev, ABS_PRESSURE,
> +  ts_sample.contact_resistance);
> +
> + input_report_key(mxc_inputdev,BTN_TOUCH,1);
> + }
>
> + else {
> + input_report_key(mxc_inputdev,BTN_TOUCH,0);
> + }
> + input_sync(mxc_inputdev);
> + 
> + wait = ts_sample.contact_resistance;
> + msleep(20);
> +#else
>   input_report_abs(mxc_inputdev, ABS_X, ts_sample.x_position);
>
>   input_report_abs(mxc_inputdev, ABS_Y, ts_sample.y_position);
>   input_report_abs(mxc_inputdev, ABS_PRESSURE,
>ts_sample.contact_resistance);
> +
>   input_sync(mxc_inputdev);
>
>   wait = ts_sample.contact_resistance;
>
>   msleep(20);
> +#endif
>   }
>
>   return 0;
> @@ -77,6 +110,12 @@
>   mxc_inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
>   mxc_inputdev->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
>   mxc_inputdev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
>
> + input_set_abs_params(mxc_inputdev,ABS_X,X_AXIS_MIN,X_AXIS_MAX,0,0);
> + input_set_abs_params(mxc_inputdev,ABS_Y,Y_AXIS_MIN,Y_AXIS_MAX,0,0);
> + 
> input_set_abs_params(mxc_inputdev,ABS_PRESSURE,PRESSURE_MIN,PRESSURE_MAX,0,0);
>
>   input_register_device(mxc_inputdev);
>
>   input_ts_installed = 1;
>
> ===
> BTW I found ipu had some problem.following image is fix image.
>
>
> diff -ur linux-2.6.22/drivers/mxc/ipu/ipu_common.c 
> linux-2.6.22/drivers/mxc/ipu/ipu_common.c
> --- linux-2.6.22/drivers/mxc/ipu/ipu_common.c 2008-06-02 20:40:13.0 
> +0900
> +++ linux-2.6.22.android/drivers/mxc/ipu/ipu_common.c 2008-06-17 
> 18:49:40.0 +0900
>
> @@ -588,23 +587,28 @@
>
>   if (dma_chan == IDMA_CHAN_INVALID)
>   return -EINVAL;
> -
>   spin_lock_irqsave(&ipu_lock, lock_flags);
>
>   if (bufNum == 0) {
>   reg = __raw_readl(IPU_CHA_BUF0_RDY);
> +#if 0
>
>   if (reg & (1UL << dma_chan)) {
>   spin_unlock_irqrestore(&ipu_lock, lock_flags);
>   return -EACCES;
>   }
> +#endif
>   __raw_writel(DMAParamAddr(dma_chan) + 0x0008UL, IPU_IMA_ADDR);
>   __raw_writel(phyaddr, IPU_IMA_DATA);
>
>   } else {
>   reg = __raw_readl(IPU_CHA_BUF1_RDY);
> +#if 0
>   if (reg & (1UL << dma_chan)) {
>   spin_unlock_irqrestore(&ipu_lock, lock_flags);
>   return -EACCES;
>   }
> +#endif
>   __raw_writel(DMAParamAddr(dma_chan) + 0x0009UL, IPU_IMA_ADDR);
>
>   __raw_writel(phyaddr, IPU_IMA_DATA);
>   }
> @@ -1139,7 +1143,15 @@
>   if (wait_for_stop && channel != MEM_SDC_FG && channel != MEM_SDC_BG) {
>   timeout = 40;
>   while ((__raw_readl(IDMAC_CHA_BUSY) & chan_mask) ||
>
> +#if 0
>  (_ipu_chan

[android-developers] Re: ListView: Disable Focus Highlight

2009-02-05 Thread BoD
Thanks a lot, I'll try that.

BoD

On Feb 6, 2009 12:29 AM, "Emmanuel"  wrote:


In order not to have the items selectable, I disable them by code
( but it is perhaps doable in the xml files ), in the adapter
definition :

ListAdapter adapter = new SimpleCursorAdapter(MyList, Layout, c,
   new String[] { "Name", "Score" }, to)
{
   public boolean areAllItemsEnabled()
   {
   return false;
   }

   public boolean isEnabled(int position)
   {
   return false;
   }
};

and it's ok...

Emmanuel
http://androidblogger.blogspot.com/


On Feb 5, 12:08 am, BoD  wrote:
> I too have this problem.
> I tried this solution (setting the listSelector to #), but
> even though it does suppress the Orange background there's a side
> effect: the text is darker.
> Isn't there a "proper" way to completely disable the focusable/
> selectable behavior of a ListView? If you can make it not clickable,
> it should make sense that it is also not possible to select cells.
>
> Thanks for your help!
>
> BoD
>
> On Feb 2, 12:47 pm, Mark Murphy  wrote:
>
> > fahad wrote:
> > > Hi,
>
> > > I've set the row (view) being used in a ListView as non-focusable
> > > along with non-clickable and have set the listview's focusable flag to
> > > false as well. However, I still get the yellow highlight when I use
> > > the scroll-ball on my device. How can I disable the yellow highlight
> > > and use my own special view/color instead upon focus?
>
> > > Any help would be much appreciated.
>
> > android:listSelector in your ListView XML will allow you to change the
> > color/drawable used for the highlight. You can also set it to be fully
> > transparent (#) and "roll your own" highlighting, if you feel
> > the need.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
>
> > Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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

2009-02-05 Thread Meryl Silverburgh

Hi,

I am trying to programmically add a new contact in android.

What I did is this:

  Uri uri = Contacts.People.CONTENT_URI;
values.put(Contacts.PeopleColumns.NAME, "mydummyuser1");
Uri newuri = myActivity.getContentResolver().insert(uri, 
values);

Uri phoneUri = Uri.withAppendedPath(newuri,
Contacts.People.Phones.CONTENT_DIRECTORY);

values.clear();
values.put(Contacts.PhonesColumns.ISPRIMARY, 1);
values.put(Contacts.PhonesColumns.TYPE,
Contacts.PhonesColumns.TYPE_CUSTOM);
values.put(Contacts.PhonesColumns.LABEL, "Other");

String formattedPhone = 
PhoneNumberUtils.formatNumber("555666");
values.put(Contacts.PhonesColumns.NUMBER, formattedPhone);
Uri newPhoneUri =
myActivity.getContentResolver().insert(phoneUri, values);

But as soon as I kill and restart my emulator, the contact that I add is gone.

Can you please tell me why?

Thank you.

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



[android-developers] Re: "Native code is not supported in the current SDK."

2009-02-05 Thread Dave Sparks

Further clarification:

<<< I was under the impression it is possible to download the java
source code AND the C source code and build them all. >>>

It is possible to download the open source code and build for the
emulator. If you want the code to run on a specific device, you need
additional libraries that are not necessarily available in open
source. These libraries are provided by the manufacturer and/or third
party vendors and contain hardware specific code.

<<< If its not possible does it just mean its not possible for 3rd
party developers to do but it is possible for device manufacturers to
do? >>>

Manufacturers do write native code to adapt Android to their hardware
in order to create these device specific libraries. This code is
usually exposed through a hardware abstraction layer that hides the
eccentricities of the device from the application developer.

We do intend to support native code development in the future. We just
want to take time to refine the native API's before we make them
public. There is nothing more painful than changing an API because you
overlooked something and then having to support the legacy API for
years to come.

On Feb 5, 10:57 am, Jean-Baptiste Queru  wrote:
> it is possible to make it work for a given device running a given
> revision of the software. It is not currently possible to make it work
> in a way that behaves predictably on different devices or different
> revisions of the software (including, importantly, devices or software
> revisions that haven't been released yet).
>
> That's why it's "not supported": if you make it work on your device
> right now and it doesn't work in another environment, you shouldn't
> expect to receive any help or to see any effort spent at the framework
> level to try to make your application work in the future. The same is
> true of undocumented classes, functions, or parameter values.
>
> JBQ
>
>
>
> On Wed, Feb 4, 2009 at 11:28 AM, fructose  wrote:
>
> > I keep seeing this quote everywhere whenever anybody asks a question
> > about about C code.
>
> > However I don't understand it, nor another quote which is used to
> > futher explain it "The SDK does not include support for native ARM
> > code".
>
> > I was under the impression it is possible to download the java source
> > code AND the C source code and build them all.
>
> > Is this therefore incorrect, you cannot build the existing C code for
> > a target platform and therefore make changes to it?
>
> > I want to know if it is possible to write some C code in, for example,
> > the Library layer, and then write some Java code in the Apllication/
> > Application framework that accesses that C code via JNI.
>
> > If this is not possible will it be possible in the future, and if so
> > at what point?
>
> > If its not possible does it just mean its not possible for 3rd party
> > developers to do but it is possible for device manufacturers to do?
> > Otherwise I don't understand how a device manufacturer can create a
> > device containing proprietary functionality if there is no ability to
> > write and access C code. Is Android forcing manufacturers to write
> > *everything* in Java?
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Radio Off

2009-02-05 Thread Nick Pelly
Actually, android.provider.Settings is just used to persist the on/off state
across reboot. It is not as useful as it looks. Changing these values will
only have an effect on startup.

In the case of Bluetooth, there is no SDK API to immediately turn it off/on
quite yet.

I am pretty sure there is an SDK API to turn WIFI and Telephony off/on, i'll
leave the relevant teams to chip in, although i'm sure its not hard to find
in the SDK docs.

Nick

On Thu, Feb 5, 2009 at 1:24 PM, Mark K  wrote:

>
>
>  You can use android.provider.Settings, see the SDK docs.
>
>   Mark
>
> On Feb 4, 2:14 am, Kamal Hasan  wrote:
> > Hi,
> >
> > Programatically how to switch off Radio, bluetooth and wifi in
> > android  ?
> > Can I enable airplane mode ?
> >
> > Kamal
> >
>

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



[android-developers] Button Problem

2009-02-05 Thread ipeg . student

Hello


   Thanks for the reply. But i am facing the same problem.
How can i put the button in this page?



  private static class SampleView extends View
{


 private  Canvas mCanvas;
 private final Paint mPaint;
public SampleView(Context context) {
super(context);
}

 protected void onDraw(Canvas canvas) {
}


This is the coding of drawing something. But can you tell me how can i
put the button in this page?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with playing sounds using media player

2009-02-05 Thread Dave Sparks

Suggest you try running top to find out what's hogging the CPU.

On Feb 5, 9:22 pm, suhas gavas  wrote:
> Hi,
> No ... i m not playing 6 to 7 mp3 files at same time ..
> later that day i have tried with just playing one single file and same issue
> . But then i tried SoundPool api and it worked fine
> . Then also i wonder what was the prb with mediaplayer
>
> On Fri, Feb 6, 2009 at 9:07 AM, Dave Sparks  wrote:
>
> > If you are playing 6 or 7 MP3 files at the same time, you are probably
> > saturating the CPU just decoding the audio.
>
> > On Feb 5, 1:10 am, suhas gavas  wrote:
> > > hi,
>
> > > My program is a 3d game . And i m creating 6 to 7 media
> > > player in my game .. so is this y the warning is flashed ?
>
> > > On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks 
> > wrote:
>
> > > > The message could be a clue, it's trying to tell you that the CPU is
> > > > overloaded, i.e. you're trying to do too much. Have you tried running
> > > > "top" to check the CPU load?
>
> > > > On Feb 4, 10:32 pm, suhas  wrote:
> > > > > Hi all,
> > > > > I m using mp3 sound in my game (used wav format also)   while
> > > > > playing sound i get problem as  "obtainBuffer timeout (is the CPU
> > > > > pegged)" and then sound gets played after some time i.e it is not
> > > > > syncronized with the game play ... plz help me with this issue
>
> > > > > Thnxs
> > > > > Suhas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Querying in Sqlite

2009-02-05 Thread And-Rider

Is it possible to pass a query directly and check the values that has
been inserted for a particular table in a database using the SQlite3
UI (like what we do in SQLSERVER) or should i write a program to
display the values inserted for a particular table??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 set RESULT_OK when activity exit?

2009-02-05 Thread jj

how to set RESULT_OK when activity exit?

I am launching list activity from main activity using
startActivityForResult, after doing work with list activity; i exit
from it from it using "finish()" but it doesn't propagate RESULT_OK to
main activity in  onActivityResult(), what should I do , so that
listact should return RESULT_OK

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



[android-developers] Re: Difficult Button

2009-02-05 Thread birds fly
public class Hellobye2 extends Activity {
   SampleView mView;
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mView = new SampleView(this);
  Button b =  new Button(this);

  setContentView(mView);

  }
}

On Fri, Feb 6, 2009 at 12:18 PM,  wrote:

>
> Hi all
>
>Thanks for the greate replies. I have a porgram by
> which i draw a rectengle. The code is written below.
>
>
> //
>
>  public class Hellobye2 extends Activity {
>
>   SampleView mView;
>   protected void onCreate(Bundle savedInstanceState) {
>   super.onCreate(savedInstanceState);
>   mView = new SampleView(this);
>setContentView(mView);
>
>   }
> }
>
>
> //
>
> Now my problem is I want to insert a button in this page. But i cant
> use setContentView(R.layout.main);
>
> How can i crerate a button which is defiend on main.xml. Please give
> me the appropiate code.
> Thanks in advance.
>
> >
>

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



[android-developers] Re: problem with playing sounds using media player

2009-02-05 Thread suhas gavas
Hi,
No ... i m not playing 6 to 7 mp3 files at same time ..
later that day i have tried with just playing one single file and same issue
. But then i tried SoundPool api and it worked fine
. Then also i wonder what was the prb with mediaplayer

On Fri, Feb 6, 2009 at 9:07 AM, Dave Sparks  wrote:

>
> If you are playing 6 or 7 MP3 files at the same time, you are probably
> saturating the CPU just decoding the audio.
>
> On Feb 5, 1:10 am, suhas gavas  wrote:
> > hi,
> >
> > My program is a 3d game . And i m creating 6 to 7 media
> > player in my game .. so is this y the warning is flashed ?
> >
> > On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks 
> wrote:
> >
> > > The message could be a clue, it's trying to tell you that the CPU is
> > > overloaded, i.e. you're trying to do too much. Have you tried running
> > > "top" to check the CPU load?
> >
> > > On Feb 4, 10:32 pm, suhas  wrote:
> > > > Hi all,
> > > > I m using mp3 sound in my game (used wav format also)   while
> > > > playing sound i get problem as  "obtainBuffer timeout (is the CPU
> > > > pegged)" and then sound gets played after some time i.e it is not
> > > > syncronized with the game play ... plz help me with this issue
> >
> > > > Thnxs
> > > > Suhas
> >
>

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

2009-02-05 Thread munish

Can any one please tell me how to add multiple items (images/text) in
list view
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to get lists of email from contact application?

2009-02-05 Thread dileep singh
its not working.iF u have complete code then plz giv.i will check.what u
suggested is not working.anyway thanks for giving your time.

On Fri, Feb 6, 2009 at 8:08 AM, Mark Roberts  wrote:

>
> Try extending the class with ListActivity instead of Activity.  Then
> make sure you change the linearLayout to a ListView in layout file and
> give it an attribute of android:id="@+id/list"
>
> On Feb 5, 12:42 am, dileep singh  wrote:
> > Hi Mark,
>  > As  suggested by u ,i am using the same code.this is my code:-
> > But its returning blank screen,eventhough in conatct application  i have
> > added the name,phone no. and email..
> > *
> >
> > import* android.app.Activity;
> > *
> >
> > import* android.content.ContentUris;
> > *
> >
> > import* android.database.Cursor;
> > *
> >
> > import* android.net.Uri;
> > *
> >
> > import* android.os.Bundle;
> > *
> >
> > import* android.provider.Contacts.People;
> > *
> >
> > import* android.util.Log;
> > *
> >
> > import* android.widget.ListAdapter;
> > *
> >
> > import* android.widget.SimpleCursorAdapter;
> >
> > *
> >
> > public* *class* GetEmail *extends* Activity {
> >
> > /** Called when the activity is first created. */
> >
> > *private* ListAdapter mAdapter;
> >
> > *public* *static* *final* String[] *METHODS_PROJECTION* = *new* String[]
> {
> >
> > People.ContactMethods.*_ID*,
> >
> > People.ContactMethods.*KIND*,
> >
> > People.ContactMethods.*DATA*,
> >
> > People.ContactMethods.*TYPE*,
> >
> > People.ContactMethods.*LABEL*,
> >
> > People.ContactMethods.*ISPRIMARY*,
> >
> > };
> >
> > Uri mUri;
> >
> > @Override
> >
> > *public* *void* onCreate(Bundle savedInstanceState) {
> >
> > *super*.onCreate(savedInstanceState);
> >
> > setContentView(R.layout.*main*);
> >
> >  mUri =
> ContentUris.*withAppendedId*(Uri.*parse*("content://contacts/people"),1);
> > //1 is the ID of the first created contact
> >
> > Uri methodsUri = Uri.*withAppendedPath*(mUri,People.ContactMethods.*
> > CONTENT_DIRECTORY*);
> >
> > Cursor methodsCursor = getContentResolver().query
> >
> > (methodsUri,*METHODS_PROJECTION*, "kind=1", *null*, *null*);
> >
> > String[] columns = *new* String[]{People.*_ID*}; // Comment
> >
> > *int*[] names = *new* *int*[]{R.id.*row_entry*};
> >
> > Log.*i*("Cursor", "Count = " + methodsCursor.getCount());
> >
> > mAdapter = *new* SimpleCursorAdapter(*this*, R.layout.*main*,
> methodsCursor,
> > columns, names);
> >
> > *this*.setListAdapter(mAdapter);
> >
> > }
> >
> > *
> >
> > private* *void* setListAdapter(ListAdapter adapter) {
> >
> > // *TODO* Auto-generated method stub
> >
> > }
> > }
> >
> > main.xml:-
> >
> > 
> >
> > http://schemas.android.com/apk/res/android
> "*
> >
> > android:orientation=*"horizontal"*
> >
> > android:layout_width=*"fill_parent"*
> >
> > android:layout_height=*"wrap_content"*
> >
> >
> >
> >  >
> > android:layout_width=*"wrap_content"*
> >
> > android:layout_height=*"wrap_content"*
> >
> > android:text=*"email: "
> > *
> >
> > />
> >
> >  >
> > android:id=*"@+id/row_entry"*
> >
> > android:layout_width=*"wrap_content"*
> >
> > android:layout_height=*"wrap_content"*
> >
> > android:text=*"Name: "*
> >
> > />
> >
> > 
> > AndroidManifest:
> >
> > 
> >
> > http://schemas.android.com/apk/res/android";
> > *
> >
> > package=*"com.android.hello"
> > *
> >
> > android:versionCode=*"1"
> > *
> >
> > android:versionName=*"1.0.0"*>
> >
> > 
> >
> > 
> >
> >  > "@string/app_name"*>
> >
> >  > *
> >
> > android:label=*"@string/app_name"*>
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > On Wed, Feb 4, 2009 at 10:09 PM, dileep singh <
> discover.dile...@gmail.com>wrote:
> >
> > > Thank you very much Mark.I will try this code and will let you
> know.once
> > > again thanks.
> >
>  > > On Wed, Feb 4, 2009 at 9:12 PM, Mark Roberts 
> wrote:
> >
> > >> import android.app.Activity;
> > >> import android.content.ContentUris;
> > >> import android.database.Cursor;
> > >> import android.net.Uri;
> > >> import android.os.Bundle;
> > >> import android.provider.Contacts.People;
> > >> import android.util.Log;
> >
> > >> public class Start extends Activity {
> > >>/** Called when the activity is first created. */
> > >>public static final String[] METHODS_PROJECTION = new String[] {
> > >>People.ContactMethods._ID,
> > >>People.ContactMethods.KIND,
> > >>People.ContactMethods.DATA,
> > >>People.ContactMethods.TYPE,
> > >>People.ContactMethods.LABEL,
> > >>People.ContactMethods.ISPRIMARY,
> > >>};
> > >>Uri mUri;
> > >>@Override
> > >>public void onCreate(Bundle savedInstanceState) {
> > >>super.onCreate(savedInstanceState);
> > >>setContentView(R.layout.main);
> >
> > >>mUri = ContentUris.withAppendedId(Uri.parse("content://contacts/
> > >> people"), 1); //1 is the ID of the first created contact
> > >>Uri methodsUri = Uri.withAppendedPath(mUri,
> > >>People.ContactMethods.CONTENT_DIRECTORY);
> > >>Cursor methodsCursor = getContentRe

[android-developers] Inserting button in a difficult position

2009-02-05 Thread ipeg . student

Hi all

Thanks for the greate replies. I have a porgram by
which i draw a rectengle. The code is written below.

//

 public class Hellobye2 extends Activity {

   SampleView mView;
   protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   mView = new SampleView(this);
setContentView(mView);

   }
}

//

Now my problem is I want to insert a button in this page. But i cant
use setContentView(R.layout.main);

How can i crerate a button which is defiend on main.xml. Please give
me the appropiate code.
Thanks in advance.

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



[android-developers] Difficult Button

2009-02-05 Thread ipeg . student

Hi all

Thanks for the greate replies. I have a porgram by
which i draw a rectengle. The code is written below.

//

 public class Hellobye2 extends Activity {

   SampleView mView;
   protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   mView = new SampleView(this);
setContentView(mView);

   }
}

//

Now my problem is I want to insert a button in this page. But i cant
use setContentView(R.layout.main);

How can i crerate a button which is defiend on main.xml. Please give
me the appropiate code.
Thanks in advance.

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



[android-developers] Any one know why "Timeout executing service: ServiceRecord" happen?

2009-02-05 Thread Eckel

Hi,

I try to create a mini player view on home screen and still use the
music mediaplayback service by putting a IMediaPlaybackService aidl in
home directory.  the mini player can normally playback and control the
music, but often meet the anr(com.android.music) and see below log.

Anyone can give some hints?  Thanks in advance.

 01-01 01:40:02.031   904:0x399 W/ActivityManager ]
Timeout executing service: ServiceRecord{43b7bb18
com.android.music/.MediaPlaybackService}

[ 01-01 01:40:02.101   904:0x399 I/ActivityManager ]
ANR (application not responding) in process: com.android.music
Annotation: Executing service ComponentInfo{com.android.music/
com.android.music.MediaPlaybackService}
CPU usage:
Load: 5.95 / 2.65 / 1.01
CPU usage from 8543ms to 2916ms ago:
  mediaserver: 25% = 19% user + 6% kernel
  com.db4o.servo.search: 20% = 14% user + 6% kernel
  com.android.music: 17% = 10% user + 6% kernel
  system_server: 17% = 7% user + 9% kernel
  touch_daemon: 2% = 0% user + 2% kernel
  android.process.media: 1% = 1% user + 0% kernel
  logcat: 0% = 0% user + 0% kernel
  kswapd0: 0% = 0% user + 0% kernel
  micco_charger: 0% = 0% user + 0% kernel
 -oms.qwertyboard.QwertyInputMethodService: 0% = 0% user + 0% kernel
TOTAL: 80% = 50% user + 27% kernel + 3% iowait

/proc/meminfo:
MemTotal:   113240 kB
MemFree:  2068 kB
Buffers:16 kB
Cached:  23852 kB
SwapCached:  0 kB
Active:  78652 kB
Inactive: 3832 kB
SwapTotal:   0 kB
SwapFree:0 kB
Dirty:   0 kB
Writeback:   0 kB
AnonPages:   58672 kB
Mapped:  19712 kB
Slab: 3712 kB
SReclaimable:  636 kB
SUnreclaim:   3076 kB
PageTables:   5212 kB
NFS_Unstable:0 kB
Bounce:  0 kB
CommitLimit: 56620 kB
Committed_AS:  1931344 kB
VmallocTotal:   532480 kB
VmallocUsed: 20992 kB
VmallocChunk:   486396 kB


[ 01-01 01:40:02.101   904:0x399 I/Process  ]
Sending signal. PID: 968 SIG: 3

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

2009-02-05 Thread Dave Sparks

It's not an issue of I/O conflict. The issue is constructing the file
in such a way that the file can played without having to seek to a
point that isn't written. If you open a file in OpenCore, it assumes
that the file is complete.

One other possibility is to run a local HTTP server that streams the
file to OpenCore through an HTTP url. If the stream is formatted
properly, OpenCore should be able to play it without seeking (unless
prompted by an app or user interaction).

On Feb 4, 11:40 pm, "Jerry Yang"  wrote:
> Hi, Dave Thanks
> May it possible I use a local streaming? That means I decrypting the 
> stream/writing the clear stream, at the same time, the playback/decode read 
> the file and try to play? Because for media player, this file should be read 
> only, it do not need to write the file, so should no I/O confliction issue.
> May it possible?
> Thanks
> With best wishes
> Jerry
>
> -Original Message-
> From: android-developers@googlegroups.com 
> [mailto:android-develop...@googlegroups.com] On Behalf Of Dave Sparks
> Sent: Thursday, February 05, 2009 3:29 PM
> To: Android Developers
> Subject: [android-developers] Re: About media player
>
> This is not a scenario we can support today.
>
> You can get close by decrypting the stream, writing it to a file in
> your application's private directory, and playing it from there. This
> would keep it reasonably secure unless the phone is jail-broken. Of
> course, it's not real-time streaming - you need to write out the
> complete file first.
>
> On Feb 4, 7:08 pm, "Jerry Yang"  wrote:
> > Hi, all
> > Any feedback? What I need is like: I try to playback a scrambled
> > stream/file. I wanna to de-crypto the file and feed the clear stream to
> > player. But I did not find any detail information about the media player
> > of android platform.
> > My possible solution is like:
> > 1. build a C based service/process to make the decrypto work running,
> > then try to give the stream to the player by some way. I still do not
> > know how to give the clear stream to decoder. Does anyone has any idea
> > about it?
> > 2. build a C based library to make the de-crypto work, they the android
> > java app calls the api to decrypto the stream/file, transfer the clear
> > stream/file to player, but I also noticed the android native code
> > support is not added, how to transfer the clear stream to decoder is
> > also problem here.
>
> > With best wishes
> > Jerry
>
> > -Original Message-
> > From: android-developers@googlegroups.com
>
> > [mailto:android-develop...@googlegroups.com] On Behalf Of Jerry Yang
> > Sent: Tuesday, February 03, 2009 4:45 PM
> > To: android-developers@googlegroups.com
> > Subject: [android-developers] Re: About media player
>
> > I wanna to add a plug-in with certain de-crypto. That means I receive
> > encrypted meida, and de-encrypt it on run time with certain key. My
> > propose is to setup a demo system for research and study.
> > With best wishes
> > Jerry
>
> > -Original Message-
> > From: android-developers@googlegroups.com
> > [mailto:android-develop...@googlegroups.com] On Behalf Of Dave Sparks
> > Sent: Tuesday, February 03, 2009 6:43 AM
> > To: Android Developers
> > Subject: [android-developers] Re: About media player
>
> > What kind of plug-in do you want to write?
>
> > "media player" is kind of a vague term. There is the Music player
> > application, the MusicPlaybackService, the MovieView activity, the
> > VideoView activity, and the MediaPlayer object. Source for all of
> > those is available at source.android.com.
>
> > On Feb 1, 12:36 am, "Jerry Yang"  wrote:
> > > Hi, all
>
> > > I have a simple question, except the default player, is there any open
> > > source media player we can modify or is there anyway we can add some
> > > feature to the media player in android platform? Like we add a plug-in
> > > into the MS media player?
>
> > > Thanks
>
> > > With best wishes
>
> > > Jerry Yang
>
> > > Client System Engineer Intertrust.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with playing sounds using media player

2009-02-05 Thread Dave Sparks

If you are playing 6 or 7 MP3 files at the same time, you are probably
saturating the CPU just decoding the audio.

On Feb 5, 1:10 am, suhas gavas  wrote:
> hi,
>
> My program is a 3d game . And i m creating 6 to 7 media
> player in my game .. so is this y the warning is flashed ?
>
> On Thu, Feb 5, 2009 at 1:04 PM, Dave Sparks  wrote:
>
> > The message could be a clue, it's trying to tell you that the CPU is
> > overloaded, i.e. you're trying to do too much. Have you tried running
> > "top" to check the CPU load?
>
> > On Feb 4, 10:32 pm, suhas  wrote:
> > > Hi all,
> > > I m using mp3 sound in my game (used wav format also)   while
> > > playing sound i get problem as  "obtainBuffer timeout (is the CPU
> > > pegged)" and then sound gets played after some time i.e it is not
> > > syncronized with the game play ... plz help me with this issue
>
> > > Thnxs
> > > Suhas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Processing audio

2009-02-05 Thread Dave Sparks

This is not possible in SDK 1.0.

On Feb 4, 1:01 pm, Natalie  wrote:
> I would like to be able to extract frequency/amplitude info from
> incoming mic audio.  From looking at previous posts, it looks like the
> way to do this with the current sdk is to write to a file, then tail
> that file.  This means I need to be able to extract frequency/
> amplitude information from .mp4 or 3gpp files, since these are the
> audio formats supported by MediaRecorder.  Now, I'd really prefer not
> to have to decode this data by hand.  :)  MediaPlayer is obviously
> decoding the .mp4 files, so I was wondering if there is any way to tap
> into this functionality, or some other way to get my .mp4 files
> decoded?
> 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: OpenGL-ES 2.0 support

2009-02-05 Thread Dave Sparks

We are planning Open GL ES 2.0 hardware binding support for Donuts
(the next release). There will not be a software renderer, so you'll
need to have hardware that supports it. Theoretically it should be
possible write a software renderer as well.

On Feb 5, 3:55 am, AndroidDev  wrote:
> Hi.
>
> Is there any plan to support OpenGL-ES 2.0 in Android?
> Is it possible to write a renderer youself based on OpenGL-ES 2.0?
> In that case, where to start :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Network utilities

2009-02-05 Thread alexdonnini

Hello,

Does anyone know if the utilities in

system/core/libnetuitls

can be used in an application?

At this point in time, I am particularly interested in

ifc_utils

I would appreciate any insight into this.

Thanks.

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

2009-02-05 Thread Jean-Baptiste Queru

The bootloader does allow unsigned filesystem images. The recovery
system still checks the update packages for signatures.

JBQ

On Thu, Feb 5, 2009 at 6:20 PM, Mark L. Chang  wrote:
>
> On Feb 5, 8:57 pm, Timothy DeWees  wrote:
>> This one doesn't seem to work for me.  It fails at the verifying
>> package stating that it's not signed.
>
> which is weird, since I thought the dev phone would allow unsigned
> firmware?
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

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

2009-02-05 Thread Mark Roberts

Try extending the class with ListActivity instead of Activity.  Then
make sure you change the linearLayout to a ListView in layout file and
give it an attribute of android:id="@+id/list"

On Feb 5, 12:42 am, dileep singh  wrote:
> Hi Mark,
> As  suggested by u ,i am using the same code.this is my code:-
> But its returning blank screen,eventhough in conatct application  i have
> added the name,phone no. and email..
> *
>
> import* android.app.Activity;
> *
>
> import* android.content.ContentUris;
> *
>
> import* android.database.Cursor;
> *
>
> import* android.net.Uri;
> *
>
> import* android.os.Bundle;
> *
>
> import* android.provider.Contacts.People;
> *
>
> import* android.util.Log;
> *
>
> import* android.widget.ListAdapter;
> *
>
> import* android.widget.SimpleCursorAdapter;
>
> *
>
> public* *class* GetEmail *extends* Activity {
>
> /** Called when the activity is first created. */
>
> *private* ListAdapter mAdapter;
>
> *public* *static* *final* String[] *METHODS_PROJECTION* = *new* String[] {
>
> People.ContactMethods.*_ID*,
>
> People.ContactMethods.*KIND*,
>
> People.ContactMethods.*DATA*,
>
> People.ContactMethods.*TYPE*,
>
> People.ContactMethods.*LABEL*,
>
> People.ContactMethods.*ISPRIMARY*,
>
> };
>
> Uri mUri;
>
> @Override
>
> *public* *void* onCreate(Bundle savedInstanceState) {
>
> *super*.onCreate(savedInstanceState);
>
> setContentView(R.layout.*main*);
>
>  mUri = 
> ContentUris.*withAppendedId*(Uri.*parse*("content://contacts/people"),1);
> //1 is the ID of the first created contact
>
> Uri methodsUri = Uri.*withAppendedPath*(mUri,People.ContactMethods.*
> CONTENT_DIRECTORY*);
>
> Cursor methodsCursor = getContentResolver().query
>
> (methodsUri,*METHODS_PROJECTION*, "kind=1", *null*, *null*);
>
> String[] columns = *new* String[]{People.*_ID*}; // Comment
>
> *int*[] names = *new* *int*[]{R.id.*row_entry*};
>
> Log.*i*("Cursor", "Count = " + methodsCursor.getCount());
>
> mAdapter = *new* SimpleCursorAdapter(*this*, R.layout.*main*, methodsCursor,
> columns, names);
>
> *this*.setListAdapter(mAdapter);
>
> }
>
> *
>
> private* *void* setListAdapter(ListAdapter adapter) {
>
> // *TODO* Auto-generated method stub
>
> }
> }
>
> main.xml:-
>
> 
>
> http://schemas.android.com/apk/res/android"*
>
> android:orientation=*"horizontal"*
>
> android:layout_width=*"fill_parent"*
>
> android:layout_height=*"wrap_content"*
>
>
>
> 
> android:layout_width=*"wrap_content"*
>
> android:layout_height=*"wrap_content"*
>
> android:text=*"email: "
> *
>
> />
>
> 
> android:id=*"@+id/row_entry"*
>
> android:layout_width=*"wrap_content"*
>
> android:layout_height=*"wrap_content"*
>
> android:text=*"Name: "*
>
> />
>
> 
> AndroidManifest:
>
> 
>
> http://schemas.android.com/apk/res/android";
> *
>
> package=*"com.android.hello"
> *
>
> android:versionCode=*"1"
> *
>
> android:versionName=*"1.0.0"*>
>
> 
>
> 
>
>  "@string/app_name"*>
>
>  *
>
> android:label=*"@string/app_name"*>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> On Wed, Feb 4, 2009 at 10:09 PM, dileep singh 
> wrote:
>
> > Thank you very much Mark.I will try this code and will let you know.once
> > again thanks.
>
> > On Wed, Feb 4, 2009 at 9:12 PM, Mark Roberts  wrote:
>
> >> import android.app.Activity;
> >> import android.content.ContentUris;
> >> import android.database.Cursor;
> >> import android.net.Uri;
> >> import android.os.Bundle;
> >> import android.provider.Contacts.People;
> >> import android.util.Log;
>
> >> public class Start extends Activity {
> >>    /** Called when the activity is first created. */
> >>    public static final String[] METHODS_PROJECTION = new String[] {
> >>        People.ContactMethods._ID,
> >>        People.ContactMethods.KIND,
> >>        People.ContactMethods.DATA,
> >>        People.ContactMethods.TYPE,
> >>        People.ContactMethods.LABEL,
> >>        People.ContactMethods.ISPRIMARY,
> >>    };
> >>    Uri mUri;
> >>   �...@override
> >>    public void onCreate(Bundle savedInstanceState) {
> >>        super.onCreate(savedInstanceState);
> >>        setContentView(R.layout.main);
>
> >>    mUri = ContentUris.withAppendedId(Uri.parse("content://contacts/
> >> people"), 1); //1 is the ID of the first created contact
> >>    Uri methodsUri = Uri.withAppendedPath(mUri,
> >>    People.ContactMethods.CONTENT_DIRECTORY);
> >>    Cursor methodsCursor = getContentResolver().query
> >> (methodsUri,METHODS_PROJECTION, "kind=1", null, null);
>
> >>    Log.i("Cursor", "Count = " + methodsCursor.getCount());
> >>    }
> >> }
>
> >> On Feb 4, 4:44 am, dileep singh  wrote:
> >> > Hi Mark,
> >> > Can u give me some sample code?I am not able to get email with the above
> >> > code.
> >> > please provide me somple code
>
> >> > On Wed, Feb 4, 2009 at 12:53 AM, dileep singh <
> >> discover.dile...@gmail.com>wrote:
>
> >> > > Thanks a lot mark.I will try the above code.
>
> >>  > > On Tue, Feb 3, 2009 at 10:46 PM, Mark Roberts 
> >> wrote:
>
> >> > >> If you are looking for the emails for  a specific contact then you
> >> > >>

[android-developers] Re: RC33 for Dev Phone

2009-02-05 Thread Mark L. Chang

On Feb 5, 8:57 pm, Timothy DeWees  wrote:
> This one doesn't seem to work for me.  It fails at the verifying
> package stating that it's not signed.

which is weird, since I thought the dev phone would allow unsigned
firmware?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] http progressive download on emulator

2009-02-05 Thread RCP2278

Hi,

Has anyone been successful in trying to stream a progressive download
clip on the emulator?  If so, can anyone send me the http link that
you guys used to stream?  I'm not sure if the reason I cannot play is
due to the media source that I'm trying to play or whether its an
emulator problem.

The http video link that I'm using is:

http://www.funshun.com/mobile/data/vclips/funny/squirrel.3gp

I'm using the MediaPlayerDemo_Video.java file included in the ApiDemos
sample code.  I basically changed the path variable under the
STREAM_VIDEO case statement to point to the http link above.

Everytime the emulator tries to play it, it throws an exception after
the prepare():

error: Prepare failed.: status=0x
java.io.IOException: Prepare failed.: status=0x

If you guys have tried it and been successful, can you please post the
http link that you guys used?

Thanks

-R

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



[android-developers] ESP

2009-02-05 Thread CPSC483

Howdy,

We are working on a class project. It is ESP (Experience Sampling
Program).
we are going to use a phone with android on it.

Here is the idea for the project: Make a Survey. Users get an e-mail
and fill the survey and e-mail back to us (Ex:server)

-program is Java

We have a possibility to use Ipodlinux too so now,
I was wondering to ask the feasibility of the project on Android?
Anybody has done something similar.

Thanks,
Sarah

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



[android-developers] Re: Android Developers in Atlanta, GA

2009-02-05 Thread mission4u

I am in Charlotte, NC and have designed app named iTubeStatus... it
wont be available in US Android market but you can search its
description online. Let me know if you guys wanna see the app. I can
change a setting for a while I can join your team too...Thanks

On Jan 30, 9:10 am, BarbieDahl  wrote:
> Are there any developers in Atlanta, GA that would like to meet and
> discuss android app ideas as well as learn new and advanced android
> topics? I would like to network with some other developers in and
> around Atlanta, GA for help, mentoring and support.  Please reply if
> you are interested.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "Native code is not supported in the current SDK."

2009-02-05 Thread Jean-Baptiste Queru

it is possible to make it work for a given device running a given
revision of the software. It is not currently possible to make it work
in a way that behaves predictably on different devices or different
revisions of the software (including, importantly, devices or software
revisions that haven't been released yet).

That's why it's "not supported": if you make it work on your device
right now and it doesn't work in another environment, you shouldn't
expect to receive any help or to see any effort spent at the framework
level to try to make your application work in the future. The same is
true of undocumented classes, functions, or parameter values.

JBQ

On Wed, Feb 4, 2009 at 11:28 AM, fructose  wrote:
>
> I keep seeing this quote everywhere whenever anybody asks a question
> about about C code.
>
> However I don't understand it, nor another quote which is used to
> futher explain it "The SDK does not include support for native ARM
> code".
>
>
> I was under the impression it is possible to download the java source
> code AND the C source code and build them all.
>
> Is this therefore incorrect, you cannot build the existing C code for
> a target platform and therefore make changes to it?
>
>
> I want to know if it is possible to write some C code in, for example,
> the Library layer, and then write some Java code in the Apllication/
> Application framework that accesses that C code via JNI.
>
> If this is not possible will it be possible in the future, and if so
> at what point?
>
> If its not possible does it just mean its not possible for 3rd party
> developers to do but it is possible for device manufacturers to do?
> Otherwise I don't understand how a device manufacturer can create a
> device containing proprietary functionality if there is no ability to
> write and access C code. Is Android forcing manufacturers to write
> *everything* in Java?
>
> >



--
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

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

2009-02-05 Thread cyber5tar86

Hi! I need some informations..
I want to know if is possible to run android on HTC P3600.
It have a Samsung SC32442A cpu inside...
Thanx for your help!

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



[android-developers] custom EditText that executes callback function

2009-02-05 Thread ashu

I have a user input box that I want to execute a function every time I
press enter.  I can't call super.onKey(...) to do the standard text
input.

I have two ways to solve this problems, but I'm having trouble looking
for places to find out how to do this.
1. Convert the keycode to a character that I can append to (theText)
2. Find a standard onKeyListener that I can call

---
final EditText userInputBox = (EditText) findViewById
(R.id.editTextItems);
userInputBox.setOnKeyListener(new OnKeyListener()
{
public boolean onKey(View v, int keyCode, KeyEvent event)
{
// code
Editable theText = userInputBox.getText();
int pressedKey = event.getUnicodeChar();
if (pressedKey == '\n')
{
addUserInput();
}

return true;
}
});
---

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



[android-developers] Anyone knows the application, who will poll/handle keypad events in user space?

2009-02-05 Thread cha...@gmail.com

Hi All,

The problem I have is that after updaing system.img with the latest
changes from Google, while without changing anything in keypad kernel
driver, some keypad events can not be handled by user space
applications anymore.

After checking with "/system/bin/getevent /dev/input/event0", I'm sure
that correct key codes have been sent out from keypad driver.

Other information that I have,
system_server is the only user of /dev/input/event0
/system/usr/keylayout is not changed
/system/usr/keychars is not changed

So to debug this issue, I will have to know the exact application
(child of system_server???) which is polling/handling keypad events.
Or that program is in HAL layer?

Could someone have a chance to know this?

Thanks,
Stephen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 can i find out what is the top 'view' of my activity?

2009-02-05 Thread Meryl Silverburgh

Hi,

Is it possible for me to find out what is the 'view' of my activity?
e.g. if my activity pops up a 'dialog', can I get a reference of that dialog?

Thank you.

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



[android-developers] Re: RC33 for Dev Phone

2009-02-05 Thread Timothy DeWees

This one doesn't seem to work for me.  It fails at the verifying
package stating that it's not signed.

On Feb 5, 8:20 pm, Brad Fuller  wrote:
> On Thu, Feb 5, 2009 at 4:56 PM, Timothy DeWees  wrote:
>
> > Hello, can someone help me understand how I can get the latest RC33
> > release for the dev phone?
>
> I'd like to know too. I saw this:
>
> http://www.mobilecrunch.com/2009/02/05/how-to-get-rc33-on-your-g1-wit...
>
> But, I don't know if this is correct or not for the dev phone.
>
> --
> Brad Fuller
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: java.lang.OutOfMemoryError: bitmap size exceeds VM budget

2009-02-05 Thread Rohit

I've tried the unbind method and it doesnt seem to help my case :( It
is a good thing to know and keep in mind.

Rohit


On Jan 23, 2:07 pm, JP  wrote:
> There's a bunch of discussions about this issue in this forum, just
> dig a little and you will find what you need to know.
> Also, Romain Guy posted a write-up about un-binding views (and
> bitmaps) from 
> activities.http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks
>
> Admittedly, a lot to read up on.
>
> On Jan 23, 3:48 am, ad  wrote:
>
> > I've problem with memory of the bitmaps,
> > I'm creating a lot of bitmaps and then releasing them by recycle() and
> > after many retries I get:
>
> > java.lang.OutOfMemoryError: bitmap size exceeds VM budget
>
> > How to get rid of this???
> > The problem is that even if i close the activity (call onDestroy()),
> > in next program run the bitmap memory is still allocated (I've
> > also android:clearTaskOnLaunch="true" in my manifest).
> > This is horrible. Can anybody help me with that?
> > I suspect that every application using BitmapFactory.decodeResource
> > must get this exception in some call!
> > Do you have any idea what's going on?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: String "Enter" problem

2009-02-05 Thread Neo

Thank you very much , i resolved it

On 2月5日, 下午7时01分, Chander Pechetty  wrote:
> 1. Save as unix file/format
> 2. use dos2unix
> trick is to remove the carriage return character.
>
> On Feb 5, 7:44 am, Neo  wrote:
>
>
>
> > i had aproblemabout read the file, in the inputstream, the string
> > have a lot or "Enter"
>
> > but the "Enter" display like this "口"
>
> > i tried used the "android edit tools" and "UltraEdit" modify the
> > string "Enter", but failed
>
> >http://www.anddev.org/viewtopic.php?p=17564#17564- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] debugging integrated Java and native code

2009-02-05 Thread Sergey Ten

Hi,

I am trying to figure out what is the best way to debug a mix of Java 
and native code? Please notice, that I am NOT trying to develop a native 
app. The app will be written entirely in Java, using Android SDK. 
However, I noticed that some pieces of the SDK use native methods (e.g. 
AssetManager, WebKit, etc). I wonder which tools Google developers use 
if/when they need to debug a mix of Java and C/C++ code? Eclipse/gdb or 
there are commercial tools which make the debugging experience less painful?

I googled on this topic and the results returned do not look very 
encouraging.

Thanks,
Sergey

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

2009-02-05 Thread Brad Fuller

On Thu, Feb 5, 2009 at 4:56 PM, Timothy DeWees  wrote:
>
> Hello, can someone help me understand how I can get the latest RC33
> release for the dev phone?

I'd like to know too. I saw this:

http://www.mobilecrunch.com/2009/02/05/how-to-get-rc33-on-your-g1-without-the-wait/

But, I don't know if this is correct or not for the dev phone.

-- 
Brad Fuller

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

2009-02-05 Thread Dianne Hackborn
TextUtils.concat().

On Thu, Feb 5, 2009 at 4:20 PM, Ivan Soto  wrote:

> Is it possible to merge spannables?
>
> like
> Spannable spa = null;
> spa = Html.fromHtml("text text  asds");
>
> spa = spa + Html.fromHtml("asdasdasd");
>
> Thanks
>
> >
>


-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



[android-developers] RC33 for Dev Phone

2009-02-05 Thread Timothy DeWees

Hello, can someone help me understand how I can get the latest RC33
release for the dev phone?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Instrumentation for unit testing

2009-02-05 Thread Lucius Fox
Hi,

I understand that Android has an Instrumentation for unit testing.

In my android activity, I have a ListView and when user clicks on it, it
pops up an dialog which 2 choices. And when user clicks one of the choices,
it will pop up another form which allow users to enter move information and
finally user clicks 'Save' to save the content.

Can you please tell me if  Android Instrumentation allow me to unit test
this automatically.
e.g. programmablly click one row of the 'ListView'
e.g. click the selection of the pop up dialog
e.g. fill in the form value.

Thank you for any pointers

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



[android-developers] Merging spannables?

2009-02-05 Thread Ivan Soto
Is it possible to merge spannables?

like
Spannable spa = null;
spa = Html.fromHtml("text text  asds");

spa = spa + Html.fromHtml("asdasdasd");

Thanks

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



[android-developers] Re: How to use findViewById() in a dialog

2009-02-05 Thread Lucius Fox
Thanks for sharing this info.


On Thu, Feb 5, 2009 at 2:57 PM, Emmanuel  wrote:

>
> On last note :
>
> I finally found the Id of this button : android.R.id.button1.
> here's my try (succesfull ):
> public void onClick(DialogInterface dialog, int whichButton)
> {
> Dialog curDialog = (Dialog) dialog;
>Button curButton = (Button) curDialog.findViewById
> ( android.R.id.button1 );
>curButton.setText("Coucou");
> }
>
> Emmanuel
> http://androidblogger.blogspot.com/
>
>
>
> On Feb 5, 9:09 pm, Emmanuel  wrote:
> > R.string.btn_yes is the string that appear on your button.
> > Not the id !
> >
> > findVienwById wants an id !
> >
> > Emmanuelhttp://androidblogger.blogspot.com/
> >
> > On Feb 5, 8:35 am, Lucius Fox  wrote:
> >
> > > Hi,
> >
> > > I create a dialog using this:
> >
> > > Dialog d = new AlertDialog.Builder(MyActivity.this)
> > > .setPositiveButton(R.string.btn_yes, new
> > > DialogInterface.OnClickListener() {
> > > public void onClick(DialogInterface dialog, int
> > > whichButton) {
> > >dummy();
> > > }
> > > })
> >
> > > Then I try to get the 'yes' button using this:
> > > Button yesButton = (Button)d.findViewById(R.string.btn_yes);
> >
> > > But I get null for my 'yesButton'.
> >
> > > Any idea why findViewById does not work? And if not, how can I get a
> > > reference to yes button of the dialog?
> >
> > > Thank you.
> >
>

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



[android-developers] Re: ListView: Disable Focus Highlight

2009-02-05 Thread Emmanuel

In order not to have the items selectable, I disable them by code
( but it is perhaps doable in the xml files ), in the adapter
definition :

ListAdapter adapter = new SimpleCursorAdapter(MyList, Layout, c,
new String[] { "Name", "Score" }, to)
{
public boolean areAllItemsEnabled()
{
return false;
}

public boolean isEnabled(int position)
{
return false;
}
};

and it's ok...

Emmanuel
http://androidblogger.blogspot.com/


On Feb 5, 12:08 am, BoD  wrote:
> I too have this problem.
> I tried this solution (setting the listSelector to #), but
> even though it does suppress the Orange background there's a side
> effect: the text is darker.
> Isn't there a "proper" way to completely disable the focusable/
> selectable behavior of a ListView? If you can make it not clickable,
> it should make sense that it is also not possible to select cells.
>
> Thanks for your help!
>
> BoD
>
> On Feb 2, 12:47 pm, Mark Murphy  wrote:
>
> > fahad wrote:
> > > Hi,
>
> > > I've set the row (view) being used in a ListView as non-focusable
> > > along with non-clickable and have set the listview's focusable flag to
> > > false as well. However, I still get the yellow highlight when I use
> > > the scroll-ball on my device. How can I disable the yellow highlight
> > > and use my own special view/color instead upon focus?
>
> > > Any help would be much appreciated.
>
> > android:listSelector in your ListView XML will allow you to change the
> > color/drawable used for the highlight. You can also set it to be fully
> > transparent (#) and "roll your own" highlighting, if you feel
> > the need.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
>
> > Android Training on the Ranch! -- Mar 16-20, 
> > 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 get text from EditText filed which is showing in alert Dialog

2009-02-05 Thread Emmanuel


As Romain said you're getting the content from your activity ( that
don't possess a username_edit item ).
you should do :
...
Dialog curDialog = (Dialog) dialog;
EditText enterNumberField = (EditText) curDialog.findViewById
(R.id.username_edit);
...

It works for me...

Emmanuel
http://androidblogger.blogspot.com/

On Feb 3, 12:32 pm, Gulfam  wrote:
> Hi all,
> I m facing a problem for getting text from EditText field which is on
> alert dialog  same like ApiDemo text entry Dialog
>
> public void enterNumberView(Activity activity){
>
>                     LayoutInflater factory = LayoutInflater.from(_activity);
>                     final View textEntryView = factory.inflate
> (R.layout.invite_friend_enternumber, null);
>                     new AlertDialog.Builder(_activity)
>                         .setIcon(R.drawable.invite_friends_icon)
>                         .setTitle("Enter Numbers")
>                         .setView(textEntryView)
>                         .setPositiveButton("Invite", new
> DialogInterface.OnClickListener() {
>                             public void onClick(DialogInterface dialog, int
> whichButton) {
>
>                                 EditText enterNumberField = (EditText)
> findViewById(R.id.username_edit);
>
>                                 String numbers = enterNumberField.getText
> ().toString();
>
>                                 Log.i("Enter Number Field Text", ""+numbers);
>
>                             }
>                         })
>                         .setNegativeButton("Cancel", new
> DialogInterface.OnClickListener() {
>                             public void onClick(DialogInterface dialog, int
> whichButton) {
>
>                                 /* User clicked cancel so do some stuff */
>                             }
>                         })
>                         .show();
>                }
>
> *xml is
> under*
>          android:id="@+id/username_edit"
>         android:layout_height="wrap_content"
>         android:layout_width="fill_parent"
>         android:layout_marginLeft="20dip"
>         android:layout_marginRight="20dip"
>         android:scrollHorizontally="true"
>         android:numeric="integer"
>         android:digits="0123456789,"
>         android:autoText="false"
>         android:capitalize="none"
>         android:gravity="fill_horizontal"
>         android:textAppearance="?android:attr/textAppearanceMedium" />
> *** 
> *
>
> i have also found the an answer of this post as under
>
> You are doing the findViewById() on the *activity*, not the dialog.
> Call findViewById() on the dialog's content instead. BY (Romain Guy)
> *** *
> any one can help How Call findViewById() on the dialog's content
> please modify in my code where i am wrong
> i dont know the exact syntex to Call findViewById() on the dialog's
> content.
>
> Thanks and Regards,
> Gulfam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 use findViewById() in a dialog

2009-02-05 Thread Emmanuel

On last note :

I finally found the Id of this button : android.R.id.button1.
here's my try (succesfull ):
public void onClick(DialogInterface dialog, int whichButton)
{
Dialog curDialog = (Dialog) dialog;
Button curButton = (Button) curDialog.findViewById
( android.R.id.button1 );
curButton.setText("Coucou");
}

Emmanuel
http://androidblogger.blogspot.com/



On Feb 5, 9:09 pm, Emmanuel  wrote:
> R.string.btn_yes is the string that appear on your button.
> Not the id !
>
> findVienwById wants an id !
>
> Emmanuelhttp://androidblogger.blogspot.com/
>
> On Feb 5, 8:35 am, Lucius Fox  wrote:
>
> > Hi,
>
> > I create a dialog using this:
>
> > Dialog d = new AlertDialog.Builder(MyActivity.this)
> >                 .setPositiveButton(R.string.btn_yes, new
> > DialogInterface.OnClickListener() {
> >                     public void onClick(DialogInterface dialog, int
> > whichButton) {
> >                        dummy();
> >                     }
> >                 })
>
> > Then I try to get the 'yes' button using this:
> > Button yesButton = (Button)d.findViewById(R.string.btn_yes);
>
> > But I get null for my 'yesButton'.
>
> > Any idea why findViewById does not work? And if not, how can I get a
> > reference to yes button of the dialog?
>
> > Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BitmapShader performance

2009-02-05 Thread tomgibara

Romain, Thanks for the explanation.


On Feb 5, 10:26 pm, Romain Guy  wrote:
> Tom,
>
> A shader is a per-pixel operation, which lets you apply it to any
> shape, respecting alpha blending as well. As such it is not surprising
> that your first method is faster.
>
>
>
> On Thu, Feb 5, 2009 at 2:08 PM, tomgibara  wrote:
>
> > I'm experimenting with tiling a fullscreen image (480x320px ARGB
> > bitmap) with a square image (160x160px ARGB bitmap). My initial
> > implementation was naive:
>
> > public void render(Canvas canvas) {
> >        final int size = tile.getWidth();
> >        final int w = canvas.getWidth();
> >        final int h = canvas.getHeight();
> >                for (int y = 0; y < h; y += size) {
> >                        for (int x = 0; x < w; x += size) {
> >                        canvas.drawBitmap(tile, x, y, null);
> >                }
> >        }
> > }
>
> > Then I remembered that Paint supports a Shader, so I swapped this
> > implementation for something much more satisfying:
>
> > public void render(Canvas canvas) {
> >                canvas.drawPaint(paint);
> > }
>
> > Where paint is initialized outside this method with:
>
> > paint = new Paint();
> > paint.setShader(new BitmapShader(tile, Shader.TileMode.REPEAT,
> > Shader.TileMode.REPEAT));
>
> > I expected that using a BitmapShader would be competitive with the
> > first implementation and probably slightly faster. But initial
> > benchmarking indicates that the first method is more than twice as
> > fast (almost 3x as fast if PorterDuff.Mode.SRC is used for both). I
> > found that surprising.
>
> > Is there a good reason that the BitmapShader is necessarily much
> > slower, or does it point to a deficiency in its implementation?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BitmapShader performance

2009-02-05 Thread Romain Guy

Tom,

A shader is a per-pixel operation, which lets you apply it to any
shape, respecting alpha blending as well. As such it is not surprising
that your first method is faster.

On Thu, Feb 5, 2009 at 2:08 PM, tomgibara  wrote:
>
> I'm experimenting with tiling a fullscreen image (480x320px ARGB
> bitmap) with a square image (160x160px ARGB bitmap). My initial
> implementation was naive:
>
> public void render(Canvas canvas) {
>final int size = tile.getWidth();
>final int w = canvas.getWidth();
>final int h = canvas.getHeight();
>for (int y = 0; y < h; y += size) {
>for (int x = 0; x < w; x += size) {
>canvas.drawBitmap(tile, x, y, null);
>}
>}
> }
>
> Then I remembered that Paint supports a Shader, so I swapped this
> implementation for something much more satisfying:
>
> public void render(Canvas canvas) {
>canvas.drawPaint(paint);
> }
>
> Where paint is initialized outside this method with:
>
> paint = new Paint();
> paint.setShader(new BitmapShader(tile, Shader.TileMode.REPEAT,
> Shader.TileMode.REPEAT));
>
> I expected that using a BitmapShader would be competitive with the
> first implementation and probably slightly faster. But initial
> benchmarking indicates that the first method is more than twice as
> fast (almost 3x as fast if PorterDuff.Mode.SRC is used for both). I
> found that surprising.
>
> Is there a good reason that the BitmapShader is necessarily much
> slower, or does it point to a deficiency in its implementation?
>
>
> >
>



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

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

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



[android-developers] How to improve browser performance in Emulator?

2009-02-05 Thread Videoguy

Hi
I am running Emulator on XP. I find webkit browser on emulator to be
very sluggish even though same page from IE on the desktop loads 10x
faster.
Is there any emulator/qemu startup parameter that can make it faster?

I appreciate any pointers.

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

2009-02-05 Thread Dianne Hackborn
Context.getResources().getConfiguration()

On Thu, Feb 5, 2009 at 1:57 PM, Layeeq  wrote:

>
> Hi,
> 1. How do i find the current orientation of the phone (portrait or
> landscape) ?
> 2. How do i find the slider position ?
>
> Thanks,
> Layeeq
> >
>


-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



[android-developers] Re: How to hang up outgoing call?

2009-02-05 Thread Tilekus

Can you please provide more details?

For me it doesn't seem to be possible for now.

On Feb 3, 9:58 am, Kamal Hasan  wrote:
> You can abort a call using BroadcastReceiver in your application.
>
> Kamal
>
> On Feb 3, 1:31 am, Tilekus  wrote:
>
> > Hi everyone,
>
> > We are new to Android and creating an application where one of the
> > things we need is to control the outgoing call,
> > at least to be able to stop it from our application.
>
> > For now we tried using Intent.ACTION_CALL to use existing activity:
>
> >         Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse
> > ("tel:" + phoneNumber));
> >         startActivity(callIntent);
>
> > But we can't figure out whether it's possible to stop launched by this
> > default Call activity. Is it possible? If yes, how?
>
> > If not, what should we use to write our own Call activity to make a
> > very simple call?
> > We would want this activity only to be used by our application, not
> > for all outgoing calls.
>
> > Million thanks in advance,
>
> > Tilek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] BitmapShader performance

2009-02-05 Thread tomgibara

I'm experimenting with tiling a fullscreen image (480x320px ARGB
bitmap) with a square image (160x160px ARGB bitmap). My initial
implementation was naive:

public void render(Canvas canvas) {
final int size = tile.getWidth();
final int w = canvas.getWidth();
final int h = canvas.getHeight();
for (int y = 0; y < h; y += size) {
for (int x = 0; x < w; x += size) {
canvas.drawBitmap(tile, x, y, null);
}
}
}

Then I remembered that Paint supports a Shader, so I swapped this
implementation for something much more satisfying:

public void render(Canvas canvas) {
canvas.drawPaint(paint);
}

Where paint is initialized outside this method with:

paint = new Paint();
paint.setShader(new BitmapShader(tile, Shader.TileMode.REPEAT,
Shader.TileMode.REPEAT));

I expected that using a BitmapShader would be competitive with the
first implementation and probably slightly faster. But initial
benchmarking indicates that the first method is more than twice as
fast (almost 3x as fast if PorterDuff.Mode.SRC is used for both). I
found that surprising.

Is there a good reason that the BitmapShader is necessarily much
slower, or does it point to a deficiency in its implementation?


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



[android-developers] Current orientation of the device

2009-02-05 Thread Layeeq

Hi,
1. How do i find the current orientation of the phone (portrait or
landscape) ?
2. How do i find the slider position ?

Thanks,
Layeeq
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: What is the difference between managedQuery() and getContentREsolver().query()

2009-02-05 Thread Romain Guy

managedQuery() will use ContentResolver's query(). The difference is
that with managedQuery() the activity will keep a reference to your
Cursor and close it whenever needed (in onDestroy() for instance.) If
you do query() yourself, you *will* have to manage the Cursor as a
sensitive resource. If you forget, for instance, to close() it in
onDestroy(), you will leak underlying resources (logcat will warn you
about it.)

On Thu, Feb 5, 2009 at 1:32 PM, Meryl Silverburgh
 wrote:
>
> I have read:
> http://code.google.com/android/devel/data/contentproviders.html
>
> But I don't understand what is the difference between managedQuery()
> and getContentREsolver().query()?
> Seems to me both take a Uri and query parameters and then return a Cursor.
>
> I appreciate if anyone can tell me the difference.
>
> Thank you.
>
> >
>



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

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

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



[android-developers] What is the difference between managedQuery() and getContentREsolver().query()

2009-02-05 Thread Meryl Silverburgh

I have read:
http://code.google.com/android/devel/data/contentproviders.html

But I don't understand what is the difference between managedQuery()
and getContentREsolver().query()?
Seems to me both take a Uri and query parameters and then return a Cursor.

I appreciate if anyone can tell me the difference.

Thank you.

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



[android-developers] Re: Radio Off

2009-02-05 Thread Mark K


  You can use android.provider.Settings, see the SDK docs.

   Mark

On Feb 4, 2:14 am, Kamal Hasan  wrote:
> Hi,
>
> Programatically how to switch off Radio, bluetooth and wifi in
> android  ?
> Can I enable airplane mode ?
>
> Kamal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: using G1 without network

2009-02-05 Thread Mark K


   You can use it without a SIM card once you have the phone initially
setup, but it does seem like you need a SIM card to do the initial
boot, and Google registration.

  Mark

On Feb 5, 12:44 pm, "Rob Ruff"  wrote:
> Is it possible to use the G1 without a sim card if we only intend to use the 
> wifi/usb interfaces?
>
> Thanks,
> Rob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] using G1 without network

2009-02-05 Thread Rob Ruff

Is it possible to use the G1 without a sim card if we only intend to use the 
wifi/usb interfaces?

Thanks,
Rob


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Market statistics for apps targeting The Netherlands are not correct

2009-02-05 Thread Ronald van der Lingen

At this moment the developer console is still showing 0 downloads
after the app has been available for a week.

I really suspect that something is wrong with the download count for
applications targeted to the Netherlands (or even downloads from the
Netherlands in general). I have checked several apps in the market
that are targeted to the Netherlands, and all of them show a download
count of <50.

I cannot imagine that apps that received a lot of publicity around the
launch have not been downloaded more than 50 times. This leads me to
believe that the developers of these applications also will see 0
downloads in their developer console.

Do any of the developers targeting apps to other new regions (Germany,
Poland, etc) experiencing the same?

Kind regards,
Ronald


On Feb 3, 7:43 pm, "Justin (Google Employee)"  wrote:
> Ronald,
>
> I've talked with the Market team and there may be a delay in
> statistics gathering. My recommendation is to wait a day or two and
> see what your results are then. Either way, please post back with your
> results in a day or two.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Feb 3, 9:51 am, Ronald van der Lingen  wrote:
>
> > The name of my application is "PimPam".
>
> > Thank you,
> > Ronald
>
> > On Feb 3, 5:07 pm, "Justin (Google Employee)"  wrote:
>
> > > What is the name of your application? If you're not comfortable
> > > sharing this publicly, please message me privately.
>
> > > Cheers,
> > > Justin
> > > Android Team @ Google
>
> > > On Feb 3, 1:58 am, Ronald van der Lingen  wrote:
>
> > > > Last week I published our first app to the Market, which is a game
> > > > targeted to users in The Netherlands. Now that the G1 has been
> > > > available over here for a couple of days, we have received feedback
> > > > from several of our users.
>
> > > > When I look at the developers console in the market however, the
> > > > download count still shows 0. Also on the device it is listed as <50.
> > > > When looking around in the Market, I see that all applications
> > > > targeted to The Netherlands are listed as having <50 downloads, even
> > > > an application that received a lot of publicity.
>
> > > > Have other developers noticed the same?
>
> > > > Kind regards,
> > > > Ronald
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 use findViewById() in a dialog

2009-02-05 Thread Emmanuel

R.string.btn_yes is the string that appear on your button.
Not the id !

findVienwById wants an id !

Emmanuel
http://androidblogger.blogspot.com/

On Feb 5, 8:35 am, Lucius Fox  wrote:
> Hi,
>
> I create a dialog using this:
>
> Dialog d = new AlertDialog.Builder(MyActivity.this)
>                 .setPositiveButton(R.string.btn_yes, new
> DialogInterface.OnClickListener() {
>                     public void onClick(DialogInterface dialog, int
> whichButton) {
>                        dummy();
>                     }
>                 })
>
> Then I try to get the 'yes' button using this:
> Button yesButton = (Button)d.findViewById(R.string.btn_yes);
>
> But I get null for my 'yesButton'.
>
> Any idea why findViewById does not work? And if not, how can I get a
> reference to yes button of the dialog?
>
> Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Application did not load to market place now the app is gone, please help

2009-02-05 Thread srajpal

I tried to upload an update to my app but I got the following now my
app has disappeared from my interface and i cannot load an app with
the same name,

You have another published application on Market with the same package
name (com.x.x). Go to that other application, and click upgrade.

I cannot update or re-publish my app, please help

does anybody know how to fix 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: Is it possible to have 2 launcher Activity in a single apk?

2009-02-05 Thread tauntz

Thanks Dianne.

Just for the record (if someone else needs the solution and finds this thread):
If you want to have two different applications in one .apk then you
need to have both launcher Activities with the LAUNCHER category as
Romain said.
You also need to add different task affinities to these activities.
Otherwise you might bump into the problems that I described (and as
far as I understand, this is designed to behave like that :) )

One more note - don't believe
http://code.google.com/android/intro/appmodel.html entirely - you
can't have task affinities in the form "append your .apk's package
name with a colon separated string" - colons are not supported
characters there. Also replace the words "you will probably want to"
with "you have to" in your head when reading this :)

Tauno


On Thu, Feb 5, 2009 at 8:02 PM, Dianne Hackborn  wrote:
> If you want two fully distinct apps, you need to give them different task
> affinities.  Please read this before you go farther:
>
> http://code.google.com/android/intro/appmodel.html
>
> On Thu, Feb 5, 2009 at 7:56 AM, tauntz  wrote:
>>
>> On Tue, Feb 3, 2009 at 10:37 AM, Romain Guy  wrote:
>> > Yes :) Just put two activities in your manifest, both with the
>> > LAUNCHER category.
>>
>> I tried that but it seems I'm still doing something wrong (see code at
>> the end of the message). The results I get are:
>> * Two launcher entries (Ativity A and Activity B) are placed in the
>> activity list in Home
>> * Clicking first on Activity A will start Activity A.
>> * Going back and clicking on Activity B will start Activity A again.
>> * If I click on Activity B the first time after install, B is started
>> and going back -> clicking on A, starts B again
>>
>> Any hints on what I'm doing wrong?
>>
>>
>> LogCat:
>> INFO/ActivityManager(55): Starting activity: Intent {
>> action=android.intent.action.MAIN
>> categories={android.intent.category.LAUNCHER} flags=0x1020
>> comp={test.activity/test.activity.ActivityA} }
>> INFO/ActivityManager(55): Start proc test.activity for activity
>> test.activity/.ActivityA: pid=13716 uid=10036 gids={}
>> INFO/jdwp(13716): received file descriptor 10 from ADB
>> INFO/ActivityManager(55): Displayed activity test.activity/.ActivityA: 872
>> ms
>> INFO/ActivityManager(55): Starting activity: Intent {
>> action=android.intent.action.MAIN
>> categories={android.intent.category.HOME} flags=0x1020
>> comp={com.android.launcher/com.android.launcher.Launcher} }
>> INFO/ActivityManager(55): Starting activity: Intent {
>> action=android.intent.action.MAIN
>> categories={android.intent.category.LAUNCHER} flags=0x1020
>> comp={test.activity/test.activity.ActivityB} }
>>
>> Code:
>> 
>> http://schemas.android.com/apk/res/android";
>>  package="test.activity"
>>  android:versionCode="1"
>>  android:versionName="1.0.0">
>>
>>
>>
>>
>>
>>> />
>>
>>
>>
>>
>>
>>
>>> />
>>
>>
>>
>>
>> 
>>
>>
>> public class ActivityA extends Activity {
>>
>>@Override
>>public void onCreate(Bundle savedInstanceState) {
>>super.onCreate(savedInstanceState);
>>TextView tv = new TextView(this);
>>tv.setText("ActivityA");
>>setContentView(tv);
>>}
>>
>> }
>>
>>
>> public class ActivityB extends Activity {
>>
>>@Override
>>public void onCreate(Bundle savedInstanceState) {
>>super.onCreate(savedInstanceState);
>>super.onCreate(savedInstanceState);
>>TextView tv = new TextView(this);
>>tv.setText("ActivityB");
>>setContentView(tv);
>>}
>> }
>>
>>
>
>
>
> --
> 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.  All such questions should be posted on public
> forums, where I and others can see and answer them.
>
>
> >
>

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



[android-developers] Re: Memory leak in BitmapFactory/Gallery?

2009-02-05 Thread blindfold

Ah yes, perfect! Works like a charm now - I had not been aware of the
need to use su.

Thanks!

On Feb 5, 2:05 am, fadden  wrote:
> The "adb" daemon still runs as a regular user on the ADP1.  You need
> to run "su" to become root, then issue the chmod.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: ImageButton resizes within TableLayout -- How do i fix?

2009-02-05 Thread James Yum
You could try wrapping the button with another layout.
Cheers,
James

On Thu, Feb 5, 2009 at 2:48 AM, Chander Pechetty wrote:

>
> yeah, its a hack, the other options don't seem to work. its really the
> job of the parent layout to take care of laying the children, so there
> must be some option in TableRow/TableLayout.
>
>
>
> >
>

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

2009-02-05 Thread Markus Junginger

For my purpose, I resolved it partly using a different approach. There
seems to be an undocumented Intent to bring up the Calendar UI and
fill start and end time in advance. I found out that the ZXing Apps
does it like this. Maybe this helps:
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", start.getTime());
intent.putExtra("endTime", end.getTime());
intent.putExtra("summary", summary);
context.startActivity(intent);

One thing I did not find out was how to prepare the event name.
Setting the summary like in the code had no effect on my G1. If
somebody finds out, I would be happy to know...

Markus
--
http://jars.de

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

2009-02-05 Thread Al

setPositiveButton() is for setting the button text and listener. To
use findViewById, you need to set your own custom layout, but this
won't work with AlertDialog.Builder (iirc), you need to use the Dialog
class. Here is some code I use for this in my application:

mDialog = new Dialog(this);
mDialog.setCancelable(true);
mDialog.setContentView(R.layout.dialoginput); //set the custom layout

mBtn_DialogOK = (Button) mDialog.findViewById(R.id.btn_ok); //From our
custom layout
mBtn_DialogOK.setTag(BUTTON_OK_ID);
mBtn_DialogOK.setOnClickListener(this);

Also, findViewById is for R.id., not for Strings.

On Feb 5, 7:35 am, Lucius Fox  wrote:
> Hi,
>
> I create a dialog using this:
>
> Dialog d = new AlertDialog.Builder(MyActivity.this)
>                 .setPositiveButton(R.string.btn_yes, new
> DialogInterface.OnClickListener() {
>                     public void onClick(DialogInterface dialog, int
> whichButton) {
>                        dummy();
>                     }
>                 })
>
> Then I try to get the 'yes' button using this:
> Button yesButton = (Button)d.findViewById(R.string.btn_yes);
>
> But I get null for my 'yesButton'.
>
> Any idea why findViewById does not work? And if not, how can I get a
> reference to yes button of the dialog?
>
> Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to use camera application without sd card detect?

2009-02-05 Thread Dianne Hackborn
No, sorry.

On Wed, Feb 4, 2009 at 10:55 PM, FlyCry  wrote:

>
> Hi, All,
>
>There is a question I need for help. When I was using the camera
> application, the ERROR: Please insert SD card before using camera
> jumped out because the driver of sd card haven't been porting
> properly. Is there anyway to use android camera application without sd
> card?
>
> >
>


-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



[android-developers] Re: Problem loading using JNI if C++ class has virtual function (vtable)

2009-02-05 Thread Dianne Hackborn
Please move this to one of the open-source list, this is not SDK discussion.

On Wed, Feb 4, 2009 at 2:14 PM, jima  wrote:

>
> I've been expanding on the example given here:
>
> http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/
> (thanks for that example!)
>
> and have am getting Unresolved symbols when I have a class with a
> virtual function.  I am using the java code given in the above
> example. Here's the C++ code I am using:
>
> #include "com_hp_CamDemo_Native.h"
>
> class jj {
>  virtual int func() {return 0;};// this line causes a failure
> //   int func() {return 0;};// this line works
> };
>
> JNIEXPORT jlong JNICALL Java_com_hp_CamDemo_Native_add (JNIEnv * env,
> jclass c, jlong a, jlong b) {
>
>   jj *j = new jj;
>
>   return a * b * 4;
> }
>
> There are two function definitions in the class jj.  The one with the
> virtual keyword (which forces the class to have a vtable) results in
> the UnsatisifiedLinkError exception being thrown, while the non-
> virtual function works fine.
>
> Here are the compile and link command lines I am using
> arm-none-linux-gnueabi-g++  -MD -c -fpic   -I/usr/java/jdk1.6.0_11/
> include/ -I/usr/java/jdk1.6.0_11/include/linux  -o obj/jini.o jini.cpp
> arm-none-linux-gnueabi-ld -T armelf_linux_eabi.xsc  --error-unresolved-
> symbols -static -shared -o libNative.so obj/jini.o
>
> Is there a command line switch I'm missing that will allow this to be
> used in android?
>
> FWIW, I'm building the .so on Fedora Core 8 with the arm-2007q3
> toolset and I'm running the android emulator on windowsXP.
>
> Thanks for any insight or suggestions on how to find a solution for
> this!
> jim anderson
>
> >
>


-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



[android-developers] Re: Is it possible to have 2 launcher Activity in a single apk?

2009-02-05 Thread Dianne Hackborn
If you want two fully distinct apps, you need to give them different task
affinities.  Please read this before you go farther:

http://code.google.com/android/intro/appmodel.html

On Thu, Feb 5, 2009 at 7:56 AM, tauntz  wrote:

>
> On Tue, Feb 3, 2009 at 10:37 AM, Romain Guy  wrote:
> > Yes :) Just put two activities in your manifest, both with the
> > LAUNCHER category.
>
> I tried that but it seems I'm still doing something wrong (see code at
> the end of the message). The results I get are:
> * Two launcher entries (Ativity A and Activity B) are placed in the
> activity list in Home
> * Clicking first on Activity A will start Activity A.
> * Going back and clicking on Activity B will start Activity A again.
> * If I click on Activity B the first time after install, B is started
> and going back -> clicking on A, starts B again
>
> Any hints on what I'm doing wrong?
>
>
> LogCat:
> INFO/ActivityManager(55): Starting activity: Intent {
> action=android.intent.action.MAIN
> categories={android.intent.category.LAUNCHER} flags=0x1020
> comp={test.activity/test.activity.ActivityA} }
> INFO/ActivityManager(55): Start proc test.activity for activity
> test.activity/.ActivityA: pid=13716 uid=10036 gids={}
> INFO/jdwp(13716): received file descriptor 10 from ADB
> INFO/ActivityManager(55): Displayed activity test.activity/.ActivityA: 872
> ms
> INFO/ActivityManager(55): Starting activity: Intent {
> action=android.intent.action.MAIN
> categories={android.intent.category.HOME} flags=0x1020
> comp={com.android.launcher/com.android.launcher.Launcher} }
> INFO/ActivityManager(55): Starting activity: Intent {
> action=android.intent.action.MAIN
> categories={android.intent.category.LAUNCHER} flags=0x1020
> comp={test.activity/test.activity.ActivityB} }
>
> Code:
> 
> http://schemas.android.com/apk/res/android";
>  package="test.activity"
>  android:versionCode="1"
>  android:versionName="1.0.0">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
>
>
> public class ActivityA extends Activity {
>
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>TextView tv = new TextView(this);
>tv.setText("ActivityA");
>setContentView(tv);
>}
>
> }
>
>
> public class ActivityB extends Activity {
>
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>super.onCreate(savedInstanceState);
>TextView tv = new TextView(this);
>tv.setText("ActivityB");
>setContentView(tv);
> }
> }
>
> >
>


-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



[android-developers] Re: Question about linking to Android camera libraries from C++

2009-02-05 Thread Dianne Hackborn
This kind of discussion should be on android-platform or
android-frameworks.  You are way way way outside the bounds of the SDK. :)

On Wed, Feb 4, 2009 at 8:03 PM, Chris Clark  wrote:

> I tried posting this question to the Android Internals mailing list, but
> that list seems to be inactive...
>
> Goal: I am trying to gain access to raw camera data on the G1 from native
> code (JNI C++) so that I can do real time image processing on camera frames
> at 15 fps. This will not work in the Java API because it takes too long for
> the camera preview callback to load the data.
>
> Setup: I am using the CodeSourcery C++ cross-compilation toolchain for ARM
> development on Windows. I include the relevant header files from the Android
> source code and create a shared library object using the following commands
> (my project name is flow):
>
> arm-none-linux-gnueabi-g++ -I"C:\Program Files\Java\jdk1.6.0_11\include"
>  -I"C:\Program Files\Java\jdk1.6.0_11\include\linux"
>  -I"C:\Program
> Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\core\include"
>  -I"C:\Program
> Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\base\include"
>  -I"C:\Program Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\msm7k"
>  -I"C:\Program
> Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\base\camera\libcameraservice"
>  -I"C:\Program
> Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\common\include"
>  -fpic -c flow.c
>
> arm-none-linux-gnueabi-ld
>  --dynamic-linker /system/bin/linker -nostdlib -I /system/bin/linker
>  -rpath-link /system/lib
>  -L"C:\Program Files\CodeSourcery\Sourcery G++
> Lite\arm-none-linux-gnueabi\lib\ldscripts" -L.
>  -shared -o libflow.so flow.o
>  -z now @minlibs.inc
>
> where minlibs.inc contains:
>  -lcameraservice -lcamera -lui -lpixelflinger -lhardware -lgps -lcorecg
> -lOmxH264Dec -lutils
>  -lqcamera -lwpa_client -lnetutils -lcutils -lrpc -llog -lz -lstdc++ -lm
> -lc -ldl
>
> In order to link, I pulled copies of all the libraries in the /system/lib
> folder on the device to my computer. Then I take this shared library object
> and copy it to the resource directory of my Java Android project in Eclipse.
> This Android activity uses System.load() to load my shared object and then I
> call the functions in the shared object from Java by standard JNI.
>
> What works: I am able to run activities on the phone that call JNI
> functions which contain calls to Android functions. For example, I was able
> to write a message to the log and call android::CameraService::instantiate()
> and see the log messages in the ddms debugger.
>
> Problem: The camera libraries that I would like to interface with are using
> a template class sp. A function I want to use returns type:
> android::sp. As soon as I declare a
> variable of this type, the constructor and destructor are required. Despite
> lengthy efforts, I have not been able to get a program to run that contains
> this type declaration. The code builds and links fine on my computer,
> without warnings, but the Activity crashes immediately upon execution and
> the ddms debugger just says that my shared object is "not found" whenever
> this type declaration is present. I do not know how to get any more detailed
> debug messages from the dynamic linker.
>
> What I've tried: I made a batch file that scans through all the libraries
> using arm-none-linux-gnueabi-nm -C -D to find the symbols needed to declare
> this type. I believe that my minlibs.inc file contains all necessary
> libraries, however I am not sure. The code for the constructor and
> destructor of sp is directly in the header files that I have included and
> the only functions they reference are incStrong and decStrong, which are
> found in libutils.so, which I have linked to. I also sorted the relevant
> libraries based on dependencies obtained using
> arm-none-linux-gnueabi-objdump -p as can be seen in the minlibs.inc file
> above. I also tried using an alternate constructor by passing in a null
> pointer:
>
>  android::QualcommCameraHardware *qcam = NULL;
>  android::sp cam(qcam);
>  //android::sp cam;
>
> My C++ function really only contains these lines, a call to
> __android_log_write, and return.
>
> Question: Any ideas on how to get this to run without crashing?
>
>
> >
>


-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

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

[android-developers] Re: fileobserver

2009-02-05 Thread and.pradeep

thanks solved it. instead of creating in separate threads i did it in
single thread by creating an instance of fileobserver for each
directory and calling startwatching(); in a loop.

On Feb 4, 11:03 pm, Dianne Hackborn  wrote:
> You don't need to create any threads to use FileObserver -- it is
> callback-based.
>
> On Tue, Feb 3, 2009 at 11:27 PM, pradeep  wrote:
>
> > i need to observe a sdcard i.e all the folders inside. i am creating
> > fileobservers for each folder in saparate threads, but i don't think
> > it is efficient. is there any other method for do so?
>
> --
> 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.  All such questions should be posted on public
> forums, where I and others can see and answer them.

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



[android-developers] Re: fileobserver

2009-02-05 Thread and.pradeep

what if I have to observe 2 or more folders (or paths)? even then
threads are not required?

how to register callbacks?

On Feb 4, 11:03 pm, Dianne Hackborn  wrote:
> You don't need to create any threads to use FileObserver -- it is
> callback-based.
>
> On Tue, Feb 3, 2009 at 11:27 PM, pradeep  wrote:
>
> > i need to observe a sdcard i.e all the folders inside. i am creating
> > fileobservers for each folder in saparate threads, but i don't think
> > it is efficient. is there any other method for do so?
>
> --
> 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.  All such questions should be posted on public
> forums, where I and others can see and answer them.

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



[android-developers] Re: Error: Read and parse xml file

2009-02-05 Thread Aman

Have you given your application the permission to open network
sockets? If not, add the following line to your manifest file and then
try running your application.


On Jan 21, 7:06 am, "zxhwo...@gmail.com"  wrote:
> "public void characters(char ch[], int start, int length) {
>           if(this.in_mytag){
>           myParsedExampleDataSet.setExtractedString(new String(ch,
> start, length));
>      }
>     } "
>
> changecodeto:
>
> "public void characters(char ch[], int start, int length) {
>           if(this.in_mytag&&(new String(ch,start, length)!
> =null||!"".equals(new String(ch,start, length{
>           myParsedExampleDataSet.setExtractedString(new String
> (ch,start, length));
>      }
>     } "
>
> ok?
> On Jan 19, 12:14 pm, Sabi  wrote:
>
>
>
>
>
> > Hi Moto,
>
> >        Thecodeof my ExampleHandler.java file as:
>
> > package s.s;
>
> > import org.xml.sax.Attributes;
> > import org.xml.sax.SAXException;
> > import org.xml.sax.helpers.DefaultHandler;
>
> > public class ExampleHandler extends DefaultHandler{
>
> >      // ===
> >      // Fields
> >      // ===
>
> >      private boolean in_outertag = false;
> >      private boolean in_innertag = false;
> >      private boolean in_mytag = false;
>
> >      private ParsedExampleDataSet myParsedExampleDataSet = new
> > ParsedExampleDataSet();
>
> >      // ===
> >      // Getter & Setter
> >      // ===
>
> >      public ParsedExampleDataSet getParsedData() {
> >           return this.myParsedExampleDataSet;
> >      }
>
> >      // ===
> >      // Methods
> >      // ===
> >     �...@override
> >      public void startDocument() throws SAXException {
> >           this.myParsedExampleDataSet = new ParsedExampleDataSet();
> >      }
>
> >     �...@override
> >      public void endDocument() throws SAXException {
> >           // Nothing to do
> >      }
>
> >      /** Gets be called on opening tags like:
> >       * 
> >       * Can provide attribute(s), whenxmlwas like:
> >       * */
> >     �...@override
> >      public void startElement(String namespaceURI, String localName,
> >                String qName, Attributes atts) throws SAXException {
> >           if (localName.equals("outertag")) {
> >                this.in_outertag = true;
> >           }else if (localName.equals("innertag")) {
> >                this.in_innertag = true;
> >           }else if (localName.equals("mytag")) {
> >                this.in_mytag = true;
> >           }else if (localName.equals("tagwithnumber")) {
> >                // Extract an Attribute
> >                String attrValue = atts.getValue("thenumber");
> >                int i = Integer.parseInt(attrValue);
> >                myParsedExampleDataSet.setExtractedInt(i);
> >           }
> >      }
>
> >      /** Gets be called on closing tags like:
> >       *  */
> >     �...@override
> >      public void endElement(String namespaceURI, String localName,
> > String qName)
> >                throws SAXException {
> >           if (localName.equals("outertag")) {
> >                this.in_outertag = false;
> >           }else if (localName.equals("innertag")) {
> >                this.in_innertag = false;
> >           }else if (localName.equals("mytag")) {
> >                this.in_mytag = false;
> >           }else if (localName.equals("tagwithnumber")) {
> >                // Nothing to do here
> >           }
> >      }
>
> >      /** Gets be called on the following structure:
> >       * characters */
> >     �...@override
> >     public void characters(char ch[], int start, int length) {
> >           if(this.in_mytag){
> >           myParsedExampleDataSet.setExtractedString(new String(ch,
> > start, length));
> >      }
> >     }
>
> > }
>
> > Please  check thiscodeand help me.
>
> > Thanks,
> > Dinesh Sharma

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

2009-02-05 Thread ezmobile

hi

check below posting for Customized Android Tabs.
http://ezmobile.wordpress.com/2009/02/02/customized-android-tabs/


hope it helps



On Jan 12, 11:04 am, skink  wrote:
> hi,
>
> Is there any way to customize tab indicators, by for ex. setting own
> bitmap drawables?
>
> pskink

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



[android-developers] Re: ListView: Disable Focus Highlight

2009-02-05 Thread BoD

I too have this problem.
I tried this solution (setting the listSelector to #), but
even though it does suppress the Orange background there's a side
effect: the text is darker.
Isn't there a "proper" way to completely disable the focusable/
selectable behavior of a ListView? If you can make it not clickable,
it should make sense that it is also not possible to select cells.

Thanks for your help!

BoD

On Feb 2, 12:47 pm, Mark Murphy  wrote:
> fahad wrote:
> > Hi,
>
> > I've set the row (view) being used in a ListView as non-focusable
> > along with non-clickable and have set the listview's focusable flag to
> > false as well. However, I still get the yellow highlight when I use
> > the scroll-ball on my device. How can I disable the yellow highlight
> > and use my own special view/color instead upon focus?
>
> > Any help would be much appreciated.
>
> android:listSelector in your ListView XML will allow you to change the
> color/drawable used for the highlight. You can also set it to be fully
> transparent (#) and "roll your own" highlighting, if you feel
> the need.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 use camera application without sd card detect?

2009-02-05 Thread FlyCry

Hi, All,

There is a question I need for help. When I was using the camera
application, the ERROR: Please insert SD card before using camera
jumped out because the driver of sd card haven't been porting
properly. Is there anyway to use android camera application without sd
card?

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



[android-developers] Question about linking to Android camera libraries from C++

2009-02-05 Thread Chris Clark
I tried posting this question to the Android Internals mailing list, but
that list seems to be inactive...

Goal: I am trying to gain access to raw camera data on the G1 from native
code (JNI C++) so that I can do real time image processing on camera frames
at 15 fps. This will not work in the Java API because it takes too long for
the camera preview callback to load the data.

Setup: I am using the CodeSourcery C++ cross-compilation toolchain for ARM
development on Windows. I include the relevant header files from the Android
source code and create a shared library object using the following commands
(my project name is flow):

arm-none-linux-gnueabi-g++ -I"C:\Program Files\Java\jdk1.6.0_11\include"
 -I"C:\Program Files\Java\jdk1.6.0_11\include\linux"
 -I"C:\Program
Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\core\include"
 -I"C:\Program
Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\base\include"
 -I"C:\Program Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\msm7k"
 -I"C:\Program
Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\base\camera\libcameraservice"
 -I"C:\Program
Files\Eclipse\SDK\android-sdk-windows-1.0_r2\source\common\include"
 -fpic -c flow.c

arm-none-linux-gnueabi-ld
 --dynamic-linker /system/bin/linker -nostdlib -I /system/bin/linker
 -rpath-link /system/lib
 -L"C:\Program Files\CodeSourcery\Sourcery G++
Lite\arm-none-linux-gnueabi\lib\ldscripts" -L.
 -shared -o libflow.so flow.o
 -z now @minlibs.inc

where minlibs.inc contains:
 -lcameraservice -lcamera -lui -lpixelflinger -lhardware -lgps -lcorecg
-lOmxH264Dec -lutils
 -lqcamera -lwpa_client -lnetutils -lcutils -lrpc -llog -lz -lstdc++ -lm -lc
-ldl

In order to link, I pulled copies of all the libraries in the /system/lib
folder on the device to my computer. Then I take this shared library object
and copy it to the resource directory of my Java Android project in Eclipse.
This Android activity uses System.load() to load my shared object and then I
call the functions in the shared object from Java by standard JNI.

What works: I am able to run activities on the phone that call JNI functions
which contain calls to Android functions. For example, I was able to write a
message to the log and call android::CameraService::instantiate() and see
the log messages in the ddms debugger.

Problem: The camera libraries that I would like to interface with are using
a template class sp. A function I want to use returns type:
android::sp. As soon as I declare a
variable of this type, the constructor and destructor are required. Despite
lengthy efforts, I have not been able to get a program to run that contains
this type declaration. The code builds and links fine on my computer,
without warnings, but the Activity crashes immediately upon execution and
the ddms debugger just says that my shared object is "not found" whenever
this type declaration is present. I do not know how to get any more detailed
debug messages from the dynamic linker.

What I've tried: I made a batch file that scans through all the libraries
using arm-none-linux-gnueabi-nm -C -D to find the symbols needed to declare
this type. I believe that my minlibs.inc file contains all necessary
libraries, however I am not sure. The code for the constructor and
destructor of sp is directly in the header files that I have included and
the only functions they reference are incStrong and decStrong, which are
found in libutils.so, which I have linked to. I also sorted the relevant
libraries based on dependencies obtained using
arm-none-linux-gnueabi-objdump -p as can be seen in the minlibs.inc file
above. I also tried using an alternate constructor by passing in a null
pointer:

 android::QualcommCameraHardware *qcam = NULL;
 android::sp cam(qcam);
 //android::sp cam;

My C++ function really only contains these lines, a call to
__android_log_write, and return.

Question: Any ideas on how to get this to run without crashing?

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



[android-developers] a receiver for outgoing sms and email?

2009-02-05 Thread Dietrich Ayala

i figured out how to listen for outgoing calls. however, i can't find
any docs or code samples for making a Receiver that catches outgoing
sms or email.

is that possible?

thanks!

-dietrich

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

2009-02-05 Thread aby

When I push app calendar button in emulator button by android 1.5, it
can't display anything.

Does anyone knows how to install the google calendar on the G1
emulator?

thanks

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



[android-developers] Re: ListView: Disable Focus Highlight

2009-02-05 Thread BoD

I too have this problem.
I tried this solution (setting the listSelector to #), but
even though it does suppress the Orange background there's a side
effect: the text is darker.
Isn't there a "proper" way to completely disable the focusable/
selectable behavior of a ListView? If you can make it not clickable,
it should make sense that it is also not possible to select cells.

Thanks for your help!

BoD

On Feb 2, 12:47 pm, Mark Murphy  wrote:
> fahad wrote:
> > Hi,
>
> > I've set the row (view) being used in a ListView as non-focusable
> > along with non-clickable and have set the listview's focusable flag to
> > false as well. However, I still get the yellow highlight when I use
> > the scroll-ball on my device. How can I disable the yellow highlight
> > and use my own special view/color instead upon focus?
>
> > Any help would be much appreciated.
>
> android:listSelector in your ListView XML will allow you to change the
> color/drawable used for the highlight. You can also set it to be fully
> transparent (#) and "roll your own" highlighting, if you feel
> the need.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 can I get the mms in my program?

2009-02-05 Thread Alfred

I want to backup all messages including SMS and MMS to the SD card,
but I don't know how to fetch the MMS.How can 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] Android PC connectivity

2009-02-05 Thread Hemant

How Android supports PC connectivity.
Can android phone be seen as modem from PC via USB? What will be the
requirements for this?

The connection is through AT commands is there any Android Application
on PC side?

Thanks,
Hvr

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

2009-02-05 Thread ezmobile

hi

check below posting for Customized Android Tabs.
http://ezmobile.wordpress.com/2009/02/02/customized-android-tabs/


hope it helps



On Jan 12, 11:04 am, skink  wrote:
> hi,
>
> Is there any way to customize tab indicators, by for ex. setting own
> bitmap drawables?
>
> pskink

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



[android-developers] OpenGL-ES 2.0 support

2009-02-05 Thread AndroidDev

Hi.

Is there any plan to support OpenGL-ES 2.0 in Android?
Is it possible to write a renderer youself based on OpenGL-ES 2.0?
In that case, where to start :)

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



[android-developers] Testing Sync Application - Contacts and Calendar

2009-02-05 Thread Prashant M

We are debugging the Sync application which we have got from the
android sources.
We are able to understand  and trace till SyncManager.
SyncManager is failing to get the account details.
How it is getting the account details  ? Where these details are
stored ?

Please do the needful..



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



[android-developers] Testing Sync Application - Contacts and Calendar

2009-02-05 Thread Prashant M

We are debugging the Sync application which we have got from the
android sources.
We are able to understand  and trace till SyncManager.
SyncManager is failing to get the account details.
How it is getting the account details  ? Where these details are
stored ?

Please do the needful..



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



[android-developers] Data syncronization-- Contacts and Calendar

2009-02-05 Thread Prashant M

Trying to do the sync operation for contact and calendar using
emulator ?
Where and how to configure the account details.

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



[android-developers] n810 running android is not accessible as a removable drive

2009-02-05 Thread disposableteen

Hello. I installed Android on the Nokia n810 and when I connect it via
usb to my laptop, the sound of a new device attached is played, and
two new removable disks, F: and G: appear in My Computer. When I try
to access them, Windows tells me to insert a disk on those drives. I
have all the usb drivers, and the phone appears in device manager as a
nokia usb phone and as working properly. I need to access them so that
I can run adb from the SDK and install new stuff on the phone, is
pretty bare...
Thanks for any help.

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



[android-developers] Limit emulator CPU clock

2009-02-05 Thread LuchoLaf

I don't have a G1 but I want the emulator to perform as similiar as a
real device. I'm working on a game and want to have a real sense of
the FPS i'll get. after 'adb shell' and 'cat /proc/cpuinfo' I get
different values (670 MIPS last time) on different emulator instances.
So, is there any way I could make the emulator run as close to a G1
but not faster at least?

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] Online Iphone & Mobile Programming Courses

2009-02-05 Thread dushyEDU

Hi,

If you're interested in learning how to develop top class games and
applications for the iPhone, HTC Touch (Android), Instinct, WinMobile,
or any other mobile device or platforms - then you should definitely
have a look at what they offer...

http://EDUmobile.org

The classes are taught as a combination of various online modules and
you get the ability to work on live industry projects, alongwith an
opportunity to be placed in top mobile gaming and mobile application
development software companies.

http://EDUmobile.org

Let me know how it goes, and if you need anything else.

Thanks

DushyEDU


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



[android-developers] Stopping HTTP client from another thread

2009-02-05 Thread Bill

I'm writing a multi-threaded app in which multiple threads will use
HttpClient to send client requests.  In my situation, it's possible a
request might be outstanding for a very long time as my server might
take as long as several minutes before responding.  (Don't ask.)

My problem: If my app needs to shut down, how can my main thread
cleanly shut down one of the threads blocked on an outstanding
request?

Specifically: I see that the HttpConnection:shutdown() looks exactly
like what I need, but I haven't been able to figure out how to expose
the HttpConnection object associated with an HttpClient request.

The best I can come up with is using
ThreadSafeClientConnManager:requestConnection() to first fetch an
HttpClientConnection object and then using HttpRequestExecutor:execute
(passing in the HttpRequest and HttpClientConnection), but that seems
a bit clunky and I was hoping there was a cleaner way.

Any suggestions?

As a follow-on question, could I use
ThreadSafeClientConnManager:shutdown() from the main thread to shut
down any outstanding HTTP requests in other threads?

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] Wikitude Source

2009-02-05 Thread Bart

Hi everybody.

Does anywone knows where the Wikitude application get it's content
from?
It says in the Marketplace description 'Wikipedia' and 'Panoramio'.
I'd like to know what wikipedia pages are used as a source.

Cheers
Bart

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



[android-developers] Processing audio

2009-02-05 Thread Natalie

I would like to be able to extract frequency/amplitude info from
incoming mic audio.  From looking at previous posts, it looks like the
way to do this with the current sdk is to write to a file, then tail
that file.  This means I need to be able to extract frequency/
amplitude information from .mp4 or 3gpp files, since these are the
audio formats supported by MediaRecorder.  Now, I'd really prefer not
to have to decode this data by hand.  :)  MediaPlayer is obviously
decoding the .mp4 files, so I was wondering if there is any way to tap
into this functionality, or some other way to get my .mp4 files
decoded?
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] why the onion option in the emulator?

2009-02-05 Thread Milk Run


There is an option to the emulator, -onion , which
allows you to pass in a png file
and that png file is layered on top of the emulator's display window
with 50% opacity.

Why? I tried it. It works. I am stumped for an example of why this
exists.

-- Frank



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



[android-developers] "Native code is not supported in the current SDK."

2009-02-05 Thread fructose

I keep seeing this quote everywhere whenever anybody asks a question
about about C code.

However I don't understand it, nor another quote which is used to
futher explain it "The SDK does not include support for native ARM
code".


I was under the impression it is possible to download the java source
code AND the C source code and build them all.

Is this therefore incorrect, you cannot build the existing C code for
a target platform and therefore make changes to it?


I want to know if it is possible to write some C code in, for example,
the Library layer, and then write some Java code in the Apllication/
Application framework that accesses that C code via JNI.

If this is not possible will it be possible in the future, and if so
at what point?

If its not possible does it just mean its not possible for 3rd party
developers to do but it is possible for device manufacturers to do?
Otherwise I don't understand how a device manufacturer can create a
device containing proprietary functionality if there is no ability to
write and access C code. Is Android forcing manufacturers to write
*everything* in Java?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 loading using JNI if C++ class has virtual function (vtable)

2009-02-05 Thread jima

I've been expanding on the example given here:
http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/
(thanks for that example!)

and have am getting Unresolved symbols when I have a class with a
virtual function.  I am using the java code given in the above
example. Here's the C++ code I am using:

#include "com_hp_CamDemo_Native.h"

class jj {
 virtual int func() {return 0;};// this line causes a failure
//   int func() {return 0;};// this line works
};

JNIEXPORT jlong JNICALL Java_com_hp_CamDemo_Native_add (JNIEnv * env,
jclass c, jlong a, jlong b) {

   jj *j = new jj;

   return a * b * 4;
}

There are two function definitions in the class jj.  The one with the
virtual keyword (which forces the class to have a vtable) results in
the UnsatisifiedLinkError exception being thrown, while the non-
virtual function works fine.

Here are the compile and link command lines I am using
arm-none-linux-gnueabi-g++  -MD -c -fpic   -I/usr/java/jdk1.6.0_11/
include/ -I/usr/java/jdk1.6.0_11/include/linux  -o obj/jini.o jini.cpp
arm-none-linux-gnueabi-ld -T armelf_linux_eabi.xsc  --error-unresolved-
symbols -static -shared -o libNative.so obj/jini.o

Is there a command line switch I'm missing that will allow this to be
used in android?

FWIW, I'm building the .so on Fedora Core 8 with the arm-2007q3
toolset and I'm running the android emulator on windowsXP.

Thanks for any insight or suggestions on how to find a solution for
this!
jim anderson

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



[android-developers] Text format in TextView

2009-02-05 Thread magicpig

Hi,
 Two questions here:
  1)
  newline is after space, could it be possible that newline comes
after the suitable character, not only space?
  For example:
  a string "X_X_" (X means a character. _ means space) is set
to textView, and suppose
  there is at most 5 characters per line in TextView.
  line 1  X_X__(line end)
  line 2  _(line end)

  What I expect is
  line 1  X_X_X(line end)
  line 2  XXX__(line end)

  How to achieve that?

  2) I am using TextView#setText(CharSequence text)  and
SpannableString to set the value.
  Also the  SpannableString#setSpan(Object what, int start, int
end, int flags) and imageSpan are used to set insert some image to the
correct position. But I find that the text and the image don't align
nicely.
For example, it comes out actually:

   line 1
   line 2
   line 3  ---  Text
   line 4  | |
   line 5  ---
   (image)

   As you can see above, the text is appear in the middle(line 3)
but don't align to the buttom as the image does. I expect it can be:
  a) align to the buttom
   line 1
   line 2
   line 3  ---
   line 4  | |
   line 5  ---  Text
   (image)

  OR
   b) align to the center.
   line 1
   line 2  ---
   line 3  | |  Text
   line 4  ---
   line 5
  (image)

  How to control such layout?

Thanks a lot for any help.


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



[android-developers] NO DISTINCT & NO GROUP BY in ContentResolver's query

2009-02-05 Thread 邓亮
hi~
i just wanna find the rencent contacts in the call log .
but what disappointed me is i couldn't do that with the ContentResolver.

no rawQuery() method and even no distinct & group by parameters in query...

i hope they can fix it in the next sdk.
or anyone can tell me how to do this with present SDK. Thx~

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



[android-developers] Re: Is it possible to have 2 launcher Activity in a single apk?

2009-02-05 Thread tauntz

On Tue, Feb 3, 2009 at 10:37 AM, Romain Guy  wrote:
> Yes :) Just put two activities in your manifest, both with the
> LAUNCHER category.

I tried that but it seems I'm still doing something wrong (see code at
the end of the message). The results I get are:
* Two launcher entries (Ativity A and Activity B) are placed in the
activity list in Home
* Clicking first on Activity A will start Activity A.
* Going back and clicking on Activity B will start Activity A again.
* If I click on Activity B the first time after install, B is started
and going back -> clicking on A, starts B again

Any hints on what I'm doing wrong?


LogCat:
INFO/ActivityManager(55): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER} flags=0x1020
comp={test.activity/test.activity.ActivityA} }
INFO/ActivityManager(55): Start proc test.activity for activity
test.activity/.ActivityA: pid=13716 uid=10036 gids={}
INFO/jdwp(13716): received file descriptor 10 from ADB
INFO/ActivityManager(55): Displayed activity test.activity/.ActivityA: 872 ms
INFO/ActivityManager(55): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.HOME} flags=0x1020
comp={com.android.launcher/com.android.launcher.Launcher} }
INFO/ActivityManager(55): Starting activity: Intent {
action=android.intent.action.MAIN
categories={android.intent.category.LAUNCHER} flags=0x1020
comp={test.activity/test.activity.ActivityB} }

Code:

http://schemas.android.com/apk/res/android";
  package="test.activity"
  android:versionCode="1"
  android:versionName="1.0.0">




















public class ActivityA extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("ActivityA");
setContentView(tv);
}

}


public class ActivityB extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("ActivityB");
setContentView(tv);
}
}

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

2009-02-05 Thread Mark Nuetzmann

I just tried adding an OnTouchListener to the webview and I get ALL
the touch events.  However, the links in the webview to not appear
selected/focused...  This seems really weird to me.  Anyone have an
idea why I would receive an OnTouch event for the view but the view
itself does not seem to respond to those events?

On Feb 5, 9:36 am, Mark Nuetzmann  wrote:
> I have an Activity that has a WebView that contains some simple html
> that allows me to display a Terms & Conditions link that if touched or
> clicked calls another activity.  My problem is unless the link in the
> WebView has focus (ie, the text is wrapped with that little orange
> focus) I cannot touch the link and have it work.  If any other view on
> the activity has focus, touching the WebView with the link does
> nothing.  The other Views that had focus loose focus, but the WebView
> does not receive focus.  I have tried calling setFocusable(true) and
> setFocusableInTouchMode(true) but that does not do any good...
>
> I would really like to know what you have to do to get a WebView to
> respond to touch events without using the trackball to scroll to the
> view before touching it.
>
> thank you,
> Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView responding to touch events

2009-02-05 Thread Mark Nuetzmann

I have an Activity that has a WebView that contains some simple html
that allows me to display a Terms & Conditions link that if touched or
clicked calls another activity.  My problem is unless the link in the
WebView has focus (ie, the text is wrapped with that little orange
focus) I cannot touch the link and have it work.  If any other view on
the activity has focus, touching the WebView with the link does
nothing.  The other Views that had focus loose focus, but the WebView
does not receive focus.  I have tried calling setFocusable(true) and
setFocusableInTouchMode(true) but that does not do any good...

I would really like to know what you have to do to get a WebView to
respond to touch events without using the trackball to scroll to the
view before touching it.

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