[android-developers] Including jar files

2010-01-28 Thread Chirayu Dalwadi
How to include .jar files in android for a perticular  application in which
KSOAP is implemented?

-- 
Warm Regards,
Chirayu Dalwadi

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

[android-developers] Sports & Actress

2010-01-28 Thread vijay rajan
Sachin Tendulkar cracks 45th Test hundred - Top Stories - India in ...
Asin| Actress Asin| Tamil Actress Asin Latest Pictures | Hot Asin ...
More info : http://123maza.com/50/rashers/

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

2010-01-28 Thread Jason
I just read an article about these guys:

http://www.mob4hire.com

They use some sort of "crowd" based testing process so you can test
apps on a variety of handsets.

Just wondering if anyone has had any experience with this, and whether
it's a viable solution for testing Android apps across multiple
devices?

Alternatively anyone got any bright ideas about how to effectively
ensure apps work on all major devices?  (other than asking your mate
to test it)

Seems to be a bit of a problem...

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


[android-developers] Re: How to send data along a phone call

2010-01-28 Thread kiran
Thanks kevln for u r reply.
Actually my interest in the data means just to send some string like a
name what u said.
But it is not working.
We can use intents to transfer data between activities so thats why
iam trying in this fashion.
In case of sms also we are using intent to transfer our message.
Can't we use same principle here?
Thank u once again

On Jan 29, 11:22 am, Kevin Duffey  wrote:
> I doubt it. I think the extra is for the intent receiver to make use of.
> That is, the phone call api, if it allowed for some extra data that it could
> use in some way, say a String name value for it to display in the panel
> instead of the phone number, that is what that is for. It's not going to
> send data along with the voice call over the wire to the other end. Unless
> the other end is an app that knows it's coming, it wouldn't know what to do
> with it anyway.
>
> On Thu, Jan 28, 2010 at 9:22 PM, saikiran n  wrote:
> > Hi,
> > I have implemented the application to send and receive calls.
> > I am making a call by an intent.
> > If we keep some data in this intent shall we receive at receiver side?
> > I am doing this but i got the null.
> > Where iam wrong my code is
>
> > for making call
> >  String phoneNumber="5554";  //here i used to emulators for testing
> >         Uri uri=Uri.fromParts("tel", phoneNumber,null);
> >         Intent callIntent=new Intent(Intent.ACTION_CALL,uri);
> >         //callIntent.putExtra("key", "My phone data");
> >         Intent data=new Intent(Intent.ACTION_SEND);
> >         data.putExtra("kay","this is my data");
> >         callIntent.putExtra(Intent.EXTRA_INTENT,data);
> >         callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> >         startActivity(callIntent);
>
> > on receiver side
> > public void onReceive(Context context, Intent intent) {
>
> >     // TODO Auto-generated method stub
>
> >     String data=intent.getStringExtra(key);
>
> >       if(data==null)
> >           Log.d("ur data","u received null;
> >       else
> >           Log.d("data",data);
> >       }
> > }
> > In the above case my receiver is invoking upon a incoming call but i didn't
> > get the data.
> > Please help me
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>

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


Re: [android-developers] Join Us In Protesting!

2010-01-28 Thread Kevin Duffey
I do agree that patenting the XOR process back in they day for animating
sprites was ridiculous. Progress bar? So legally someone could sue me for
using a progress bar in my app? The patents have gotten so ridiculous that
it would make it impossible for anyone but large corporations to license
them to build software. Personally, let them come sue me. I've got nothing
they can take. I seriously doubt I can't use tab indexing, page up/down,
etc. Are you sure you read the patents right? If so, then every web page,
most apps, etc are going to all have to come down and the person who owns
that patent will most likely be richer than all other countries combined. If
that were held up in the court of law, I can't imagine the ramifications of
such an action on the software/tech world.


On Thu, Jan 28, 2010 at 8:59 PM, Rohit Mishra wrote:

> Dear All!
>
> Greetings!
> What is this:
> Software is basically a language. An algorithm is an expression of an idea.
> Patenting it would be like patenting individual words of English. A huge
> hindrance to innovation. Copyright is ok! not software patent!
>
>
> Some Weird Software Patents:
>
>   1. Tab indexing
>   2. Page-up, Page-down
>   3. Progress Bars
>   4. Generate Key Via SMS
>   5. Order by cell phone
>
> It means you can not use them, in your products.There are many more!
>
> Why Shoud You Sign: This will make our illiterate politicians think before
> they make it a law, which will hamper the Indian software market. Please
> join us in protesting against Software patents! Click here
>
> http://petition.nosoftwarepatents.in/
>
>
> Note: Most of the countries around the world (as of now) do not allow for
> it,
> including the EU.
>
> Request: Please forward this to all the Indian s/w professionals you know!
> Rohit Mishra
> +91-9986478970
> Bangalore, India
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] How to send data along a phone call

2010-01-28 Thread Kevin Duffey
I doubt it. I think the extra is for the intent receiver to make use of.
That is, the phone call api, if it allowed for some extra data that it could
use in some way, say a String name value for it to display in the panel
instead of the phone number, that is what that is for. It's not going to
send data along with the voice call over the wire to the other end. Unless
the other end is an app that knows it's coming, it wouldn't know what to do
with it anyway.


On Thu, Jan 28, 2010 at 9:22 PM, saikiran n  wrote:

> Hi,
> I have implemented the application to send and receive calls.
> I am making a call by an intent.
> If we keep some data in this intent shall we receive at receiver side?
> I am doing this but i got the null.
> Where iam wrong my code is
>
> for making call
>  String phoneNumber="5554";  //here i used to emulators for testing
> Uri uri=Uri.fromParts("tel", phoneNumber,null);
> Intent callIntent=new Intent(Intent.ACTION_CALL,uri);
> //callIntent.putExtra("key", "My phone data");
> Intent data=new Intent(Intent.ACTION_SEND);
> data.putExtra("kay","this is my data");
> callIntent.putExtra(Intent.EXTRA_INTENT,data);
> callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> startActivity(callIntent);
>
> on receiver side
> public void onReceive(Context context, Intent intent) {
>
> // TODO Auto-generated method stub
>
>
> String data=intent.getStringExtra(key);
>
>   if(data==null)
>   Log.d("ur data","u received null;
>   else
>   Log.d("data",data);
>   }
> }
> In the above case my receiver is invoking upon a incoming call but i didn't
> get the data.
> Please help me
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Listeners

2010-01-28 Thread Bytes
Hi,

I've an application to get events from a service and I want to share
that information to interested parties (listeners) who registered with
me.

Should I must implement all these

EventClass - Which gets information from server periodically
DataStructures -
Listener interface
Listerner class
Notification firing class

as subclasses of EventListener , EventObject etc. ?

Can't I simply write my own classes and interfaces not extending any
standard 'Event' related classes ?

After browsing , or seeing the code I understand that no need to
extend from Event
classes ???

Just need confirmation.
Thanks
-Bytes

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


Re: [android-developers] How much time it will take to parse

2010-01-28 Thread Sasikumar.S
Hi frank,

Thank u for ur reply.
that question is for android only.
The url i sent is taking more than 3 minutes for me.
I'm using DOM for XML Parsing.

On Fri, Jan 29, 2010 at 11:19 AM, Frank Weiss  wrote:

> Is this and Android question? Anyway, on the Droid, using SAX, a 14 KB xml
> takes much less than one second off the net. On a 2GHz laptop, I've seen 8
> MB files parse in about one second. SAX is great. The pull XML parser is
> said to be slightly faster in many cases.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thanks & Regards
Sasikumar.S

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

2010-01-28 Thread andu
How are you

I would like to thank you for your support. I get some code that
enables me to send unicode character. I get it for the following site

http://since2006.com/blog/android-send-unicode-message/#

It may help others.

Thank you again

Andu



On Jan 25, 10:58 pm, Frank Weiss  wrote:
> Howdy. I didn't think the missing fonts would solve the problem, but I think
> they're ultimately necessary. If you try a latin character, chances are you
> will get the same reuslt, but I would try it to make sure. I still think the
> problem is either in how the messages are being sent or possibly a
> limitiation of the carrier. Unfortunately, I'm not coding an SMS
> application, which would allow me to help you better.
>
> Can you check the PDU metadata and see if the message is being restricted to
> 7-bit or 8-bit instead of UCS-16? You can find more technical details on the
> web, but here's some info I found on a quick 
> search:http://communication.howstuffworks.com/framed.htm?parent=sms.htm&url=...
> Note
> especially the "TP-DCS" field (follow the "data coding scheme" link. Bits 3
> and 2 define the character coding. I suspect you'll see either 00 or 01,
> which would explain why the U+1200, etc., characters you are trying to send
> are reduced to U+0020. I think you should expect bits 3 and 2 to be 10 for
> UCS2 (16-bit). I wish I could give you a more definite answer, but this is
> the best I can do without actually coding an SMS application myself.

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


Re: [android-developers] How much time it will take to parse

2010-01-28 Thread Frank Weiss
Is this and Android question? Anyway, on the Droid, using SAX, a 14 KB xml
takes much less than one second off the net. On a 2GHz laptop, I've seen 8
MB files parse in about one second. SAX is great. The pull XML parser is
said to be slightly faster in many cases.

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

2010-01-28 Thread Jags
Cant I receive sms directed to my android device in my application ?

On Jan 28, 4:04 pm, Jags  wrote:
> I hv a problem, I need some hints. I need to have my app receive
> certain kind of sms (say meant for my app). is it possible ?
>
> is it possible to receive all the sms in my app rather than default
> sms app ?
>
> how to config my app to receive sms ?
>
> please help with some links and stuff
>
> regards

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


[android-developers] How much time it will take to parse

2010-01-28 Thread Sasikumar.S
Hi,

Please see the below link

http://www.dpreview.com/feeds/news.xml

and tell how time it will take to parse this page?...

My system configuration is 1GB RAM.



-- 
Thanks & Regards
Sasikumar.S

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

Re: [android-developers] Re: Spinner Example

2010-01-28 Thread satish bhoyar
thanks pranav..



On Fri, Jan 29, 2010 at 10:22 AM, Pranav  wrote:

> Hi Satish,
>
> I have solution of you problem. Here is your code.
>
> ---
> import android.widget.Spinner;
>
> Spinner spinnerDay;
> String strSpinnerDay;
>
>public class SpinnerDemo extends Activity{
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>spinnerDay = (Spinner)findViewById(R.id.spinner_Day);
>ArrayAdapter adapterDay =
> ArrayAdapter.createFromResource(this, R.array.day,
> android.R.layout.simple_spinner_item);
>adapterDay.setDropDownViewResource
> (android.R.layout.simple_spinner_item);
>spinnerDay.setAdapter(adapterDay);
>
>//Day --- Listener
>spinnerDay.setOnItemSelectedListener(new OnItemSelectedListener
> (){
>@Override
>public void onItemSelected(AdapterView arg0, View
> arg1,
>int arg2, long arg3) {
>strSpinnerDay =
> spinnerDay.getSelectedItem().toString();
>Toast.makeText(SpinnerDemo.this, "You have
> selected
> "+strSpinnerDay, Toast.LENGTH_SHORT).show();
>}
>@Override
>public void onNothingSelected(AdapterView arg0) {
>}
>});
>}
> }
>
> Just do copy-paste this code, you will get your solution.
>
> Thanks,
>
> Regads,
> 
> Pranav
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Build Source on Windows

2010-01-28 Thread Thisara Rupasinghe
Hi all,

As i know Android source can not be build on Windows. Cant we work that on
windows too like its on Mac. Why is this can not build on windows? what are
the barriers? if there is anyone who is aware of this issue please let me
know what we have to do to build this on windows. i would like to contribute
to make this build-able on windows...

Thank You

-- 
Thanks & Regards,
Thisara.

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

2010-01-28 Thread Tony
2010/1/29 Tony 

> Hello ,all
>
> I am developing a sip-based  application,  I test  it on two emulators
> located the same host machine, how can I spell the sipURIs???
>
>
> "sip:andr...@10.0.02:5061" ???
>
>  is it right??? but it doesn't work! can anyone help me??
>

I  have tried  "sip:andr...@10.0.2.2:5061" ,it failed to send a invite
successfully.

-- 
I have a strong desire to become  to a android superior; let us work hard
together!

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

2010-01-28 Thread Tony
Hello ,all

I am developing a sip-based  application,  I test  it on two emulators
located the same host machine, how can I spell the sipURIs???


"sip:andr...@10.0.02:5061" ???

 is it right??? but it doesn't work! can anyone help me??

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

[android-developers] How to send data along a phone call

2010-01-28 Thread saikiran n
Hi,
I have implemented the application to send and receive calls.
I am making a call by an intent.
If we keep some data in this intent shall we receive at receiver side?
I am doing this but i got the null.
Where iam wrong my code is

for making call
 String phoneNumber="5554";  //here i used to emulators for testing
Uri uri=Uri.fromParts("tel", phoneNumber,null);
Intent callIntent=new Intent(Intent.ACTION_CALL,uri);
//callIntent.putExtra("key", "My phone data");
Intent data=new Intent(Intent.ACTION_SEND);
data.putExtra("kay","this is my data");
callIntent.putExtra(Intent.EXTRA_INTENT,data);
callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(callIntent);

on receiver side
public void onReceive(Context context, Intent intent) {

// TODO Auto-generated method stub


String data=intent.getStringExtra(key);

  if(data==null)
  Log.d("ur data","u received null;
  else
  Log.d("data",data);
  }
}
In the above case my receiver is invoking upon a incoming call but i didn't
get the data.
Please help me

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

[android-developers] Highlight Linearlayout

2010-01-28 Thread Sasikumar.S
Hi,

When I'm clicking the linear layout it should be highlighted.
How to do that?..

-- 
Thanks & Regards
Sasikumar.S

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

2010-01-28 Thread sunrises
Thank you Frank Weiss

On Jan 29, 8:11 am, Frank Weiss  wrote:
> It may also help you to look at Romain Guy's PhotoStream demo application.
> The source is available at code.android.com.

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


[android-developers] Re: show more photos

2010-01-28 Thread sunrises
Thank you Nerdrow

On Jan 29, 3:55 am, Nerdrow  wrote:
> - cache the images to disk
> - use a List to store the paths to the cached images
> - extend a BaseAdapter and use the List as your data source
> - add a setPage(int page) method to set which page of 10 images you're
> on
> - in getView() adjust the value of position to account for the page
> index
>
> quick example from memory:
>
> public class PagedPhotoAdapter extends BaseAdapter {
>
>   private static final int PHOTOS_PER_PAGE = 10;
>
>   private final LayoutInflater mInflater;
>   private final List mPhotoPaths;
>   private final int mPageCount;
>
>   private int mPage = 0;
>
>   public PagedPhotoAdapter(Context context, List photoPaths) {
>     mInflater = LayoutInflater.fromContext(context);
>
>     mPhotoPaths = photoPaths;
>
>     mPageCount = (mPageCount.size()/PHOTOS_PER_PAGE);
>   }
>
>   public void setPage(int page) {
>     mPage = page < 0 ? 0 : page > mPageCount ? mPageCount : page;
>   }
>   @Override public int getCount() {
>     return PHOTOS_PER_PAGE;
>   }
>   @Override public Object getItem(int position) {
>     return position;
>   }
>   @Override public int getItemId(int position) {
>     return position;
>   }
>   @Override public View getView(int position, View convertView,
> ViewGroup parent) {
>     final int adjPosition = ((PHOTOS_PER_PAGE * mPage)+position)-1;
>
>     final ImageView imageView =
>       (ImageView)(convertView==null?mInflater.inflate
> (R.layout.layout_id, null):convertView);
>
>     imageView.setImageBitmap(BitmapFactory.decodeFile(mPhotoPaths.get
> (adjPosition)));
>
>     return imageView;
>   }
>
> }
>
> On Jan 28, 4:40 am, surya prakash  wrote:
>
>
>
> > Hi
> > I am getting photos from website and display them in Grid view, but
> > here I do not want display all of them at time,
> > 1. I want show only 10 photos and a "more" link below the grid , but i
> > can display "more" link at top, how can I add it at bottom?
> > 2.when user click on "more" it should display the another 10 photos
> > only, I need to refresh the grid, how can we refresh the grid?
>
> > 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] Join Us In Protesting!

2010-01-28 Thread Rohit Mishra
Dear All!

Greetings!
What is this:
Software is basically a language. An algorithm is an expression of an idea. 
Patenting it would be like patenting individual words of English. A huge 
hindrance to innovation. Copyright is ok! not software patent!


Some Weird Software Patents:

   1. Tab indexing
   2. Page-up, Page-down
   3. Progress Bars
   4. Generate Key Via SMS
   5. Order by cell phone

It means you can not use them, in your products.There are many more!

Why Shoud You Sign: This will make our illiterate politicians think before they 
make it a law, which will hamper the Indian software market. Please join us in 
protesting against Software patents! Click here

http://petition.nosoftwarepatents.in/


Note: Most of the countries around the world (as of now) do not allow for it,
including the EU.

Request: Please forward this to all the Indian s/w professionals you know!
Rohit Mishra
+91-9986478970
Bangalore, India



  

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


[android-developers] include/asm Error when building kernel image with Ubuntu 9.10 (karmic)

2010-01-28 Thread Greeshma R K
Hello All,

I am facing an issue as below when building kernel image.

Toolchain exist in /opt/gcc-4.1.2-glibc-2.5-nptl-3, proceed to
build...
#
# configuration written to .config
#
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK include/linux/version.h
ERROR: include/asm is a directory but a symlink was expected
make: *** [include/asm] Error 1
-

Kernel build completed.
Please find the kernel at ../arch/arm/boot/zImage.nfs

Have fun!


==

Please help me out in resolving this issue as I am stuck :((

Thanks in advance.

Regards,
Greeshma R K




-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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:fastScrollEnabled="true": Is there more to getting the alphabetical index?

2010-01-28 Thread pawpaw17

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: Spinner Example

2010-01-28 Thread Pranav
Hi Satish,

I have solution of you problem. Here is your code.

---
import android.widget.Spinner;

Spinner spinnerDay;
String strSpinnerDay;

public class SpinnerDemo extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
spinnerDay = (Spinner)findViewById(R.id.spinner_Day);
ArrayAdapter adapterDay =
ArrayAdapter.createFromResource(this, R.array.day,
android.R.layout.simple_spinner_item);
adapterDay.setDropDownViewResource
(android.R.layout.simple_spinner_item);
spinnerDay.setAdapter(adapterDay);

//Day --- Listener
spinnerDay.setOnItemSelectedListener(new OnItemSelectedListener
(){
@Override
public void onItemSelected(AdapterView arg0, View 
arg1,
int arg2, long arg3) {
strSpinnerDay = 
spinnerDay.getSelectedItem().toString();
Toast.makeText(SpinnerDemo.this, "You have 
selected
"+strSpinnerDay, Toast.LENGTH_SHORT).show();
}
@Override
public void onNothingSelected(AdapterView arg0) {
}
});
}
}

Just do copy-paste this code, you will get your solution.

Thanks,

Regads,

Pranav

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

2010-01-28 Thread Sasikumar.S
OK android beginner.

If i got the solution i will inform you.

On Fri, Jan 29, 2010 at 9:39 AM, android beginner <
android.beginne...@gmail.com> wrote:

> Hi Sasikumar,
>
> Thanks for your email. But as mentioned in my first email, I do not want to
> set it with pixel size as I have couple of screen with different resolution.
>
> Thanks
>
> On Fri, Jan 29, 2010 at 2:47 PM, Sasikumar S 
> wrote:
>
>> Hi android beginner,
>>
>> you can set your edittext box width as 65PX. So that it will looks
>> like four character supporting box.
>> After you are entering text also it won't decrease or increase.
>>
>> On Jan 29, 7:49 am, android beginner 
>> wrote:
>> > Hi,
>> >
>> > I made the EditText to accept only 4 characters, but my question was
>> > different. sorry for not being clear.
>> >
>> > When the EditText comes up, by default its very small(equavalent to one
>> > character length) and on entering characters it re-sizes itself. I do
>> not
>> > want it to resize, but fixed size of 4 characters.
>> >
>> > Thanks
>> >
>> >
>> >
>> > On Fri, Jan 29, 2010 at 1:08 PM, Zsolt Vasvari 
>> wrote:
>> > > It helps reading the documentation, but here's your answer:
>> >
>> > >addFilter(view, new InputFilter.LengthFilter(maxLength));
>> >
>> > > On Jan 29, 7:00 am, android beginner 
>> > > wrote:
>> > >  > Hi,
>> >
>> > > > I need to have an EditText with maximum width for 4 characters. I do
>> not
>> > > > want set maximum width in pixels as I have my target with couple of
>> > > > different screen resolutions.
>> >
>> > > > Can anyone suggest me how to do this?
>> >
>> > > > Thanks
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Android Developers" group.
>> > > To post to this group, send email to
>> android-developers@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > android-developers+unsubscr...@googlegroups.com> cr...@googlegroups.com>
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/android-developers?hl=en
>>
>
>


-- 
Thanks & Regards
Sasikumar.S

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

2010-01-28 Thread android beginner
Hi Sasikumar,

Thanks for your email. But as mentioned in my first email, I do not want to
set it with pixel size as I have couple of screen with different resolution.

Thanks

On Fri, Jan 29, 2010 at 2:47 PM, Sasikumar S wrote:

> Hi android beginner,
>
> you can set your edittext box width as 65PX. So that it will looks
> like four character supporting box.
> After you are entering text also it won't decrease or increase.
>
> On Jan 29, 7:49 am, android beginner 
> wrote:
> > Hi,
> >
> > I made the EditText to accept only 4 characters, but my question was
> > different. sorry for not being clear.
> >
> > When the EditText comes up, by default its very small(equavalent to one
> > character length) and on entering characters it re-sizes itself. I do not
> > want it to resize, but fixed size of 4 characters.
> >
> > Thanks
> >
> >
> >
> > On Fri, Jan 29, 2010 at 1:08 PM, Zsolt Vasvari 
> wrote:
> > > It helps reading the documentation, but here's your answer:
> >
> > >addFilter(view, new InputFilter.LengthFilter(maxLength));
> >
> > > On Jan 29, 7:00 am, android beginner 
> > > wrote:
> > >  > Hi,
> >
> > > > I need to have an EditText with maximum width for 4 characters. I do
> not
> > > > want set maximum width in pixels as I have my target with couple of
> > > > different screen resolutions.
> >
> > > > Can anyone suggest me how to do this?
> >
> > > > Thanks
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: how to use style

2010-01-28 Thread NoraBora
Have you looked at ApiDemos?

It has lots of useful code examples.

On Jan 26, 7:07 am, saad bouchehboun  wrote:
> hy ,
>
> I need to use list selector , xml syntax , to custum my listview , can
> you help me find his full documentation .

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


Re: [android-developers] Re: controling the user language

2010-01-28 Thread Frank Weiss
Check this thread:
http://www.mail-archive.com/android-developers@googlegroups.com/msg21286.html

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

[android-developers] Re: code problem

2010-01-28 Thread NoraBora
If you want to show a splash screen.

http://www.anddev.org/simple_splash_screen_-_alternative-t815.html

You can get more info if you search with "splash screen" in this
group.

On Jan 25, 11:51 pm, "ho(AO4)"  wrote:
> hi
> I want to ask   how can i solve it if i create  "setContentView(new
> AnimationView(this));"    and i need to go the another page but used "
> setContentView(R.layout.main);"
>
> setContentView(new AnimationView(this));
>
>         new Thread()
>         {
>           public void run()
>           {
>             try
>             {
>               sleep(5000);
>             }
>             catch (Exception e)
>             {
>               e.printStackTrace();
>             }
>             finally
>             {
>                      setContentView(R.layout.main);
>             }
>           }
>         }.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


Re: [android-developers] Re: Listview Filter

2010-01-28 Thread Sasikumar.S
Its happen all the time for me.

My system configuration is 120GB hard disk & 1GB RAM.

Wat's Ur system configuration?.

My code for listview is

public class ListviewFilterExample extends Activity
{
 private ListView lv1;
 private String
lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","J2ME",
"Listview","ArrayAdapter","ListItem","Us","UK","India"};
@Override
 public void onCreate(Bundle icicle)
 {
 super.onCreate(icicle);
 setContentView(R.layout.main);
 lv1=(ListView)findViewById(R.id.ListView01);
 lv1.setAdapter(new
ArrayAdapter(this,android.R.layout.simple_list_item_1 , lv_arr));
 lv1.setTextFilterEnabled(true);
}
}

In this i added lest than 20 items in list.
But i'm having more than 2500 items.

Wat's the wrong with me?.


On Thu, Jan 28, 2010 at 7:30 PM, Brion Emde  wrote:

> It sounds like your problem to me.
>
> I am doing similar filtering via a web service (10K records on remote
> database) and have some latency associated with the network, but I'm
> talking a second or two, at the most, not minutes.
>
> I think you should take a look at how you are doing things to make
> sure there isn't something silly going on. It happens all the time.
>
>
> On Jan 28, 4:44 am, "Sasikumar.S"  wrote:
> > Hi,
> >
> > In my listview i'm adding more than 2500 items in list.
> > when i'm using text filter. It is taking more time to load the text
> starting
> > with the character i have given.
> >
> > ex:-
> >
> > If i'm giving 'sa' it is taking more than 2 minutes to show the items
> > starting with 'sa'.
> > Is this problem for me only or the problem is for all?..
> >
> > wat's the reason?..
> >
> > --
> > Thanks & Regards
> > Sasikumar.S
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Sasikumar.S

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

2010-01-28 Thread pramod.deore
Hello everybody,

Actually I am developing one application in that when application run
first time it will create one txt file and save IMSI number in that
file. when mobile boot it will matches it's current IMSI number with
IMSI number present in the txt file.But I don't know how to check that
file is exist or not.
Please help me
Thanks

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


[android-developers] Re: EditText - maximum width

2010-01-28 Thread Sasikumar S
Hi android beginner,

you can set your edittext box width as 65PX. So that it will looks
like four character supporting box.
After you are entering text also it won't decrease or increase.

On Jan 29, 7:49 am, android beginner 
wrote:
> Hi,
>
> I made the EditText to accept only 4 characters, but my question was
> different. sorry for not being clear.
>
> When the EditText comes up, by default its very small(equavalent to one
> character length) and on entering characters it re-sizes itself. I do not
> want it to resize, but fixed size of 4 characters.
>
> Thanks
>
>
>
> On Fri, Jan 29, 2010 at 1:08 PM, Zsolt Vasvari  wrote:
> > It helps reading the documentation, but here's your answer:
>
> >        addFilter(view, new InputFilter.LengthFilter(maxLength));
>
> > On Jan 29, 7:00 am, android beginner 
> > wrote:
> >  > Hi,
>
> > > I need to have an EditText with maximum width for 4 characters. I do not
> > > want set maximum width in pixels as I have my target with couple of
> > > different screen resolutions.
>
> > > Can anyone suggest me how to do this?
>
> > > Thanks
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Picking a contact and returning to the parent activity.

2010-01-28 Thread Android Development
Hello,

I wish to re-use the Contacts application in a way to enable the user to
pick a contact and return it to the parent activity (my application's
activity).

For achieving this, I want to inquire about the kind of Intent that will be
needed to launch the contacts application.

Intent i = new Intent(Intent.ACTION_GET_CONTENT, ???);
startActivityForResult(.);

What should be the second argument here ?

In the deprecated Contacts API, I could use the following snippet, but not
sure about ContactsContract:

Intent i= new Intent(Intent.ACTION_GET_CONTENT,People.CONTENT_URI);
startActivityForResult(i, reqCode);

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

2010-01-28 Thread jotobjects
Thanks - this sure looks like it might be useful if there was more
documentation :(

On Jan 28, 3:38 pm, Nerdrow  wrote:
> Not a lot of good, workable documentation about this.  This helped me
> out a lot:http://escomic.net/217
>
> On Jan 27, 3:59 pm, jotobjects  wrote:
>
> > Where is there information about the syntax of  xml files.
> > These can be used to define 2D graphics as I understand it.  There are
> > few spotty examples in the samples directory but that is all I have
> > found.

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

2010-01-28 Thread jotobjects
Do you know about the emulator console command "geo fix"?

http://developer.android.com/intl/fr/guide/developing/tools/emulator.html#geo

This works pretty well except it has been noted that there is
apparently a rounding bug in the emulator console (which is not
present in the DDMS setting).  So you may get a location that is a
hundred meters or so away from the value you give it.

On Jan 28, 2:56 pm, julius  wrote:
> Heh yeah I was coming to the conclusion it might be some kind of Timer
> setup for testing...
>
> Thanks for the reply.
>
> On Jan 29, 8:53 am, Robert Woodruff  wrote:
>
> > I have not found a way to do it in the emulator. All the GPS/location
> > testing I do on a real device. Sometimes I get in the car and drive around
> > to get more real world situation. Of course what you quickly discover is how
> > crummy the GPS works in a car (or in a mall) :-).
>
> > If you are testing with cellular locations rather than GPS locations you may
> > need to do alot more moving around as the cellular location system is not so
> > granular as real GPS.
>
> > You may want to rig up a little ticker inside your app to feed location
> > updates to the app for bench testing. Just put a sting array of coordinates
> > in the resource fork and use the Timer class to drive the coordinate
> > reader/feeder. It will simulate OK. But for location stuff actually getting
> > out and moving the device around has been important. It is alot of fun just
> > you and the stupid android and a laptop on the front seat stopping in parks
> > and parking lots to toy with Eclipse and DDMS.
>
> > Now if Google could just arrange for these apps to sell better...
>
> > On Thu, Jan 28, 2010 at 2:10 PM, julius  wrote:
> > > Thanks for the reply. I'm really trying to respond to changes.
>
> > > This is a good idea to kick things off, but I'd like to be able to
> > > show changes so I can turn the GPS service on/off. Is there a way to
> > > do fake this in the emulator?
>
> > > Regards,
> > > Julius.
>
> > > On Jan 29, 2:50 am, WoodManEXP  wrote:
> > > > Sure, simply hard code the test coordinate in your app at the point
> > > > you would otherwise call the LocationManager to get the last known
> > > > location. Not too elegant, but it has worked over here on many
> > > > occasions...
>
> > > > On Jan 27, 10:57 pm, julius  wrote:
>
> > > > > Hi,
>
> > > > > I have an application which uses the network as the location provider
> > > > > (rather than GPS eg.), however I can't seem to figure out how to send
> > > > > the emulator test coordinates. In DDMS I would usually send
> > > > > coordinates in the Emulator Control tab.
>
> > > > > Is there a place to simulate coordinates derived from the cell phone
> > > > > network provider?
>
> > > > > Thanks for any help.
>
> > > > > (If I try to get the last known location I get:
> > > > > java.lang.IllegalArgumentException: provider=network)
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: show more photos

2010-01-28 Thread Frank Weiss
It may also help you to look at Romain Guy's PhotoStream demo application.
The source is available at code.android.com.

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

[android-developers] Incoming Call

2010-01-28 Thread DAVIDT
Hi All

I have  one activity that capture when exist active call.
How to can active the speaker programatically ?
How to can active option  mute and option hold programatically ?

Thanks
David

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


[android-developers] Can I use the permission INJECT_EVENTS in a unit testing project?

2010-01-28 Thread Zhihong GUO
Hi All,

I am writing a unit test case based on the Instrumentation class. My
scenario is: in my activity to be tested, it will start the browser. Now I
want to send a "back" key event to the browser application and then I can go
back to my activity to continue the testing. But it seems that
the android.permission.INJECT_EVENTS not work for the testing project. Is it
possible?

Thanks

James

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

Re: [android-developers] How to avoid android service from being uninstalled

2010-01-28 Thread Frank Weiss
I think I understand what you're saying, but then how would the user
uninstall the service if he or she really wanted to?

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

[android-developers] Incoming Call

2010-01-28 Thread David Toledo
Hi All

I have  one activity that capture when exist incoming call.
How to can active the speaker programatically ?
How to can active option  mute and option hold programatically ?

Thanks
David

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

Re: [android-developers] java.lang.IllegalArgumentException while parsing xml file

2010-01-28 Thread Frank Weiss
Just to eliminate a couple of possibilities, what threading technique are
you using: AsyncTask, Service, your own? I suspect the latter, dur to the
"java.lang.Thread.run" at the bottom of the stacktrace.

The focus of the problems appears to be where
de.stefandahmen.android.navtrack.helper.Trackpoint.getTrkptLat calls
java.util.AbstractList.subList. This could well be due to a threading issue.
Which threads have access to the list and how are they synchonized?

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

Re: [android-developers] Re: EditText - maximum width

2010-01-28 Thread android beginner
Hi,

I made the EditText to accept only 4 characters, but my question was
different. sorry for not being clear.

When the EditText comes up, by default its very small(equavalent to one
character length) and on entering characters it re-sizes itself. I do not
want it to resize, but fixed size of 4 characters.

Thanks

On Fri, Jan 29, 2010 at 1:08 PM, Zsolt Vasvari  wrote:

> It helps reading the documentation, but here's your answer:
>
>addFilter(view, new InputFilter.LengthFilter(maxLength));
>
>
> On Jan 29, 7:00 am, android beginner 
> wrote:
>  > Hi,
> >
> > I need to have an EditText with maximum width for 4 characters. I do not
> > want set maximum width in pixels as I have my target with couple of
> > different screen resolutions.
> >
> > Can anyone suggest me how to do this?
> >
> > Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Multicast videostreaming

2010-01-28 Thread ehay66
Hi,

I need help for the following. I am trying to stream a video (webcam)
from my PC to my android phone  (HTC Magic/Vodaphone, Android 1.6) by
using multicast UDP. I have a second notebook in the network to check
the network  is OK.
The following configs works:
- Webcam ->quicktime broadcaster (encoder) -> quicktimestreaming
server -> upd unicast ->router (wlan) > android phone
- Webcam ->quicktime broadcaster (encoder) -> quicktimestreaming
server -> upd unicast ->router (wlan) > notebook w/ quicktimeplayer
- Webcam ->quicktime broadcaster (encoder) -> quicktimestreaming
server -> upd multicast ->router (wlan) > notebook w/quicktimeplayer

And the wanted config doens't work:
- Webcam ->quictime broadcaster (encoder) -> quicktimestreaming server
-> upd multicast ->router (wlan) > android phone

Did anyone try this before and can confirm it is working? Does
Android, and especially 1.6 on HTC magic support mulitcasting?  If
yes, some example code would be very useful.

The code I am using:

public class Streaming extends Activity implements

MediaPlayer.OnPreparedListener,

MediaPlayer.OnErrorListener,

MediaPlayer.OnCompletionListener {

/**
 * TODO: Set the path variable to a streaming video URL or a local
media
 * file path.
 */;
private String pathStr3 = "rtsp:///rtplive2.sdp";
private VideoView mVideoView;

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

WifiManager wm = (WifiManager)getSystemService
(getApplicationContext().WIFI_SERVICE);
MulticastLock wmmc = wm.createMulticastLock("mylock");

wmmc.acquire();

Toast.makeText(this,"Multicast (after) = "+wmmc.isHeld
(),Toast.LENGTH_LONG).show();

mVideoView = (VideoView) findViewById(R.id.mfsView_vv);

if (pathStr3 == "") {
// Tell the user to provide a media file URL/path.
Toast.makeText(
Streaming.this,
"Please edit VideoViewDemo Activity, and set path"
+ " variable to your media file URL/path",
Toast.LENGTH_LONG).show();

} else {

/*
 * Alternatively,for streaming media you can use
 * mVideoView.setVideoURI(Uri.parse(URLstring));
 */
Toast.makeText(this,"Path =
"+pathStr3,Toast.LENGTH_LONG).show();
mVideoView.setVideoURI(Uri.parse(pathStr3));
mVideoView.setOnPreparedListener(this);
mVideoView.setOnErrorListener(this);
mVideoView.setOnCompletionListener(this);
mVideoView.setMediaController(new MediaController(this));
mVideoView.requestFocus();
}
}

public void onPrepared(MediaPlayer mp) {
Toast.makeText(this, "MediaPlayer Started",Toast.LENGTH_LONG).show
();
mp.start();
}

public boolean onError(MediaPlayer mp, int what, int extra) {

Toast.makeText(this, "Sorry, can't play video. Error ="+
what,Toast.LENGTH_LONG).show();
return false;
}

public void onCompletion(MediaPlayer mp) {
Toast.makeText(this, "Done. Completed.
Finito!",Toast.LENGTH_LONG).show();
}

}


The rtplive.sdp file (available on a server):

v=0
o=- 51 3553371012 IN IP4 127.0.0.0
s=QuickTime
t=0 0
a=range:npt=now-
a=isma-compliance:2,2.0,2
m=audio 1 RTP/AVP 96
c=IN IP4 238.210.243.42/15
b=AS:8
a=rtpmap:96 mpeg4-generic/8000/1
a=fmtp:96 profile-level-id=15;mode=AAC-
hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1588
a=mpeg4-esid:101
m=video 10002 RTP/AVP 97
c=IN IP4 238.210.243.42/15
b=AS:220
a=rtpmap:97 H264/9
a=fmtp:97 packetization-mode=1;profile-level-id=4D400C;sprop-parameter-
sets=J01ADKkYKD9gDUGAQa2wrXvfAQ==,KN4JF6A=
a=mpeg4-esid:201
a=cliprect:0,0,240,320
a=framesize:97 320-240

Using the same audio/video codec in unicast session is working. So it
looks like if multicasting seems to be the blocking factor.

The corresponding logs:

01-28 18:24:40.363: VERBOSE/VideoView(14988): reset duration to -1 in
openVideo
01-28 18:24:40.363: DEBUG/MediaPlayer(14988): Couldn't open file on
client side, trying server side
01-28 18:24:40.932: INFO/ActivityManager(74): Displayed activity
de.pureP.myFirstStreaming/.Streaming: 1202 ms (total 1202 ms)
01-28 18:24:41.152: ERROR/PlayerDriver(51): Command PLAYER_INIT
completed with an error or info PVMFFailure
01-28 18:24:41.162: ERROR/MediaPlayer(14988): error (1, -1)
01-28 18:24:41.162: ERROR/MediaPlayer(14988): Error (1,-1)
01-28 18:24:41.162: DEBUG/VideoView(14988): Error: 1,-1
01-28 18:24:41.192: WARN/PlayerDriver(51):
PVMFInfoErrorHandlingComplete

If anyone could give me hint that would be really great.

Thx in advance.

eh

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

[android-developers] Important Undocumented styles

2010-01-28 Thread Erik Martino
An important part of creating an android application is making the gui
look right. However where do I find documentation for this. An example
of what I am looking for is something like this

style="@android:style/ButtonBar"

what other interesting styles does exist. The eclipse layout xml
editor knows about some of the @android:style/'s but not this one.
Where is all this documented?

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


[android-developers] In the Gallery from Intent.ACTION_PICK, can I override the longClick?

2010-01-28 Thread Arcantos
In my app i let the user select one image from the media gallery. To
do this i use the Intent.ACTION_PICK.
Like

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent, IMAGE_PICK);

The app works mostly fine, the users can select an image and the uri
correctly.

The matter is in the gallery. If the user does a tap on an image all
goes well, image is selected and uri returned.
But if the user does a long click on an image, be it accident or on
purpose, the phone vibrates a split sec, the image is focused, and
then nothing happens.
I understand on the formal gallery app this brings up a menu for a
longClick, but in this case it does nothing, and it can be confusing
to users, to think they tapped and see the app do nothing.

So the question is, can i do anything to change the behavior of the
long click in that screen? Like override the OnLongClick or set an
OnLongClickListener or something?

Thanks in advance, best regards.

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


[android-developers] Re: how to get RSSI (to get bluetooth signal strength)?

2010-01-28 Thread Chris
I'm running into the exact same issue you are.  Doing a general
discovery never gets a RSSI value and technically the EXTRA _RSSI
constant is only in the ACTION_FOUND intent isn't it?  So I wouldn't
assume that you'd need to be paired to get the value.

On Jan 27, 9:45 pm, Zhenan Hong  wrote:
> Hi,
>
>   I am working on Android platform 2.1 and trying to make an app that
> can get theBluetoothsignal strength from remote devices. It seems i
> should try to read the 'RSSI'
>
> something like : intrssi= intent.getIntExtra
> (BluetoothDevice.EXTRA_RSSI, Integer.MIN_VALUE);
>
> But it just keep returning the latter default value.
>
> Did anyone ever manage to get the value ofRSSI? Do we need to pair
> the device before getting theRSSI?
>
> Thanks!!

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


[android-developers] Problem getting Bluetooth RSSI (Signal Strength)

2010-01-28 Thread Chris
I'm trying to determine location via bluetooth beacons and while I can
discover and find all of the devices around me, when I try to grab the
EXTRA_RSSI that's supposed to come through it doesn't work.  Here's
the code I'm using and I get a 0 every time.

private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(ScannerActivity.this, "In BroadcastReceiver", 3);
String action = intent.getAction();
// When discovery finds a device
if (BluetoothDevice.ACTION_FOUND.equals(action)) {
// Get the BluetoothDevice object from the Intent
BluetoothDevice device = intent.getParcelableExtra
(BluetoothDevice.EXTRA_DEVICE);
int rssi = intent.getIntExtra
(BluetoothDevice.EXTRA_RSSI, 0);

// Add the name and address to an array adapter to
show in a ListView
if (device.getBondState() !=
BluetoothDevice.BOND_BONDED) {
//do something
}
}
   }
}

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

2010-01-28 Thread skonno
Hi Abhi,

I have already ported the following my UPnP framework into Android.

  CyberLink for Java
  http://www.cybergarage.org/cgi-bin/twiki/view/Main/CyberLinkForJava

To run the framework on Android, please get the latest source codes
from
the following SVN repository on SourceForge.net.

  https://sourceforge.net/projects/cgupnpjava/develop

Please check it :-)

Thanks,

Sastoshi Konno
http://www.cybergarage.org

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


[android-developers] Questions on Graphics/Resolutions

2010-01-28 Thread Jason Mawdsley
Good day everyone,

I have a few questions related to resolutions and graphics:
1. Is there a maximum resolution that Android supports?
1a. Will the layout engine support large resolutions such as
1280x1024?
1b. Will the layout engine support a resolution like 1920 * 1200?
1c. Will SurfaceFlinger be able to push that many pixels?
1d. Are there any plans to support such large resolutions on the road
map?
2. Are the widgets/views drawn by Android accelerated?
2b. Is there a way to accelerate them?
3. Are the Open GL Java bindings always accelerated? Or does it depend
on the EGL configure and the OEM?
4. Are there any plans to enforce a minimum set of hardware on the
Android platform?

Thanks everyone!
Jason

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


[android-developers] How to avoid android service from being uninstalled

2010-01-28 Thread Shiv
Hi ,
I am working on an Android service which will be OTA downloadable and
I have few questions about it.

I see that after OTA downloading and installing the “TestService.apk”
that I developed, I can go into settings->applications->Manage
Applications and remove the service from the device.

•   How to avoid an application or service from  being uninstalled from
the device by the user ?
•   Is there some setting that we could enable in the
AndroidManifest.xml to achieve this?
•   Can the above be achieved without any OEM integration?

I would appreciate any help in this regard.

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

2010-01-28 Thread Zsolt Vasvari
It helps reading the documentation, but here's your answer:

addFilter(view, new InputFilter.LengthFilter(maxLength));


On Jan 29, 7:00 am, android beginner 
wrote:
> Hi,
>
> I need to have an EditText with maximum width for 4 characters. I do not
> want set maximum width in pixels as I have my target with couple of
> different screen resolutions.
>
> Can anyone suggest me how to do this?
>
> Thanks

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


[android-developers] Re: OpenGL Fillrate Issues

2010-01-28 Thread Mario Zechner
@Ralf

i started testing on my gf's htc hero today and am getting some
strange results now as well concerning touch. First of all, the game
i'm working on will have the player constantly touch the screen more
or less (as oposed to for example replica island). As it is good
practice i insert a Thread.sleep(16) in my onTouch method when an
MotionEvent.ACTION_MOVE is triggered. This does absolutely not solve
the flooding issues of MotionEvents. Additionally as new MotionEvents
are generated permanently as long as the finger is on the screen the
garbage collector kicks in. This is on the latest HTC Hero ROM which
is Android 1.5 afaik. I had a look at the MotionEvent implementation
and it pretty much explains the memory leak (see MotionEvent.obtain
()). The trick with recycle gets rid of the garbage collector calls
but wrecks havok with the event queue as Dianne stated.

There doesn't seem to be an obvious solution and a lot of googling was
rather inconclusive. Robert has the same problems on G1 level hardware
with Android < 2.0. I notice the same effect in other twitch games
like Radiant. I guess that forces me to go all >= 2.0 for the next
game. I don't want angry players shouting at me calling me incompetent
when it's really a problem with the Android framework (not that i
implement everything perfectly, far from it :). In short Android is
awesome i just wished it was more game dev friendly).

On Jan 28, 4:24 pm, Mario Zechner  wrote:
> @mrchaz
>
> I check for "MB200"/"MB220"/"Behold". I use String.contains() for the
> behold. This is only a list for the dext/clique and behold. There
> might be other devices that have the same problem. Maybe Robert could
> share his settings.
>
> On 28 Jan., 15:15, MrChaz  wrote:
>
> > @Mario
> > Could you do me a favour and paste in the strings you're checking when
> > using android.os.Build.Model?  I don't have access to any phones other
> > than the G1.
> > It would be willing to bet that the couple of comments of missing
> > objects I've had are related to the VBO issue you mention.
>
> > Maybe the things I've produced just aren't cpu intensive for me to
> > notice the dip in frame-rate.  That said I've not kept a close eye on
> > it after I got to where it was smooth to me.
>
> > On Jan 26, 9:28 pm, Mario Zechner  wrote:
>
> > > @robert, i'd be more than willing to contribute to such a best
> > > practices/common pitfalls site for opengl and game development on
> > > android. I will also send you the code for the racer, boiled down to
> > > just rendering the racer itself so you can see and test the effect. In
> > > light racer 3d this effect is not noticeable, the same is true for
> > > first person games like toon warz. I'll check out light racer 2d.
> > > Expect an email soon :)
>
> > > @mrchaz you can detect on which device you are running by checking via
> > > the android.os.build.Build.Model String (writing this from the top of
> > > my head, just google for android build). I use the
> > > SimpleEglConfigChoser and don't react on specific devices apart for
> > > blur/dext/samsung behold 2 which seem to share a common bug. They
> > > report the VBO extension but throw errors when using any of the VBO
> > > related functions. Apart from that I wouldn't open that can of worms,
> > > coding up paths for individual devices that is. Also, the Pixelflinger
> > > OpebGL software renderer used in the emulator and on cyanogen mods
> > > doesn't like deleting VBO buffers and will crash (take that for your
> > > site robert :))
>
> > > I will try to finish translating my android game dev tutorial to
> > > english this week (I'm pretty busy with my day to day job and
> > > releasing the full version of Newton in the moment). Maybe you,
> > > Robert, could share that on your site too.
>
> > > Awesome discussion so far. Keep it up
>
> > > On 26 Jan., 21:41, MrChaz  wrote:
>
> > > > Am I right in thinking that the Galaxy likes a depth of 16?
> > > > I guess this might also be a good to place to ask how I'd find out the
> > > > type of phone the game or whatever is running on so that I can start
> > > > accounting for this stuff?
>
> > > > On Jan 26, 1:00 am, Ralf Schneider  wrote:
>
> > > > > I have just started playing around with OpenGL ES on the Nexus One.
> > > > > But this thread might be intresting for your problem:
>
> > > > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > > > The most important part might be this:
>
> > > > > It seems that DEPTH_SIZE of 24 is optimum on the Droid. I was kind
> > > > > thrown back a bit when I picked an EGLConfig with DEPTH_SIZE of 0 or
> > > > > another value (16, etc.) and rendering of a simple cube was at 40FPS.
> > > > > With an EGLConfig that has a DEPTH_SIZE of 24 the cube was rendering
> > > > > at 60FPS.
>
> > > > > Regards,
> > > > > Ralf
>
>

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

[android-developers] Re: Comparing dates in a sqlite database

2010-01-28 Thread Zsolt Vasvari
Except that long dates stored in the database are completely useless
for doing and understanding the results of SQL querries.

On Jan 29, 7:36 am, Nerdrow  wrote:
> All date/time in java is epoch based anyway, so I would just store it
> as a long until you need to display it then use a Date object to
> format the output, small & fast :)
>
> On Jan 27, 11:20 pm, Zsolt Vasvari  wrote:
>
>
>
> > Sorry, I take that back
>
> > I define my columns as DATETIME and then use the following static
> > class (feel free to use it as you wish) to convert 'long' values to
> > DateStamp format.  SQLite can sort on that format.
>
> > import java.util.Calendar;
> > import android.database.Cursor;
>
> > // This is a replacement for java.sql.Timestamp which is way too slow
> > final class Timestamp
> > {
> >     static Calendar calendar;
>
> >     static
> >     {
> >         calendar = Calendar.getInstance();
> >     }
>
> >     // Can't instantiate this class
> >     private Timestamp()
> >     {
> >         // Nothing to do
> >     }
>
> >     static CharSequence formatCurrentTimestamp()
> >     {
> >         return formatTimestamp(System.currentTimeMillis());
> >     }
>
> >     static CharSequence formatTimestamp(long time)
> >     {
> >         calendar.setTimeInMillis(time);
>
> >         int year = calendar.get(Calendar.YEAR);
> >         int month = calendar.get(Calendar.MONTH) + 1;
> >         int day = calendar.get(Calendar.DAY_OF_MONTH);
> >         int hour = calendar.get(Calendar.HOUR_OF_DAY);
> >         int minute = calendar.get(Calendar.MINUTE);
> >         int second = calendar.get(Calendar.SECOND);
> >         int millisecond = calendar.get(Calendar.MILLISECOND);
>
> >         // 01234567890123456789012
> >         // -MM-DD HH:MM:SS:MMM
> >         StringBuilder s = new StringBuilder(23);
> >         s.append(year);
> >         s.append('-');
> >         if (month < 10)
> >             s.append('0');
> >         s.append(month);
> >         s.append('-');
> >         if (day < 10)
> >             s.append('0');
> >         s.append(day);
> >         s.append(' ');
> >         if (hour < 10)
> >             s.append('0');
> >         s.append(hour);
> >         s.append(':');
> >         if (minute < 10)
> >             s.append('0');
> >         s.append(minute);
> >         s.append(':');
> >         if (second < 10)
> >             s.append('0');
> >         s.append(second);
> >         s.append('.');
> >         if (millisecond < 100)
> >             s.append('0');
> >         if (millisecond < 10)
> >             s.append('0');
> >         s.append(millisecond);
>
> >         return s;
> >     }
>
> >     static long parseTimestampOrZeroFromCursor(Cursor cursor, int
> > columnId)
> >     {
> >         long time;
> >         CharSequence s = cursor.getString(columnId);
>
> >         if ((s.length() == 1) && (s.charAt(0) == '0'))
> >             time = 0;
> >         else
> >             time = parseTimestampFromCursorCommon(s);
>
> >         return time;
> >     }
>
> >     static long parseTimestampFromCursor(Cursor cursor, int columnId)
> >     {
> >         return parseTimestampFromCursorCommon(cursor.getString
> > (columnId));
> >     }
>
> >     static private long parseTimestampFromCursorCommon(CharSequence s)
> >     {
> >         // 01234567890123456789012
> >         // -MM-DD HH:MM:SS:MMM
> >         int year = ((s.charAt(0) - '0') * 1000) + ((s.charAt(1) - '0')
> > * 100) + ((s.charAt(2) - '0') * 10) + (s.charAt(3) - '0');
> >         int month = ((s.charAt(5) - '0') * 10) + (s.charAt(6) - '0');
> >         int day = ((s.charAt(8) - '0') * 10) + (s.charAt(9) - '0');
> >         int hour = ((s.charAt(11) - '0') * 10) + (s.charAt(12) - '0');
> >         int minute = ((s.charAt(14) - '0') * 10) + (s.charAt(15) -
> > '0');
> >         int second = ((s.charAt(17) - '0') * 10) + (s.charAt(18) -
> > '0');
> >         int millisecond = ((s.charAt(20) - '0') * 100) + ((s.charAt
> > (21) - '0') * 10) + (s.charAt(22) - '0');
>
> >         calendar.set(Calendar.YEAR, year);
> >         calendar.set(Calendar.MONTH, month - 1);
> >         calendar.set(Calendar.DAY_OF_MONTH, day);
> >         calendar.set(Calendar.HOUR_OF_DAY, hour);
> >         calendar.set(Calendar.MINUTE, minute);
> >         calendar.set(Calendar.SECOND, second);
> >         calendar.set(Calendar.MILLISECOND, millisecond);
>
> >         return calendar.getTimeInMillis();
> >     }
>
> > }
>
> > On Jan 28, 3:16 pm, Zsolt Vasvari  wrote:
>
> > > I just store a "long", as returned from getTime()
>
> > > On Jan 28, 1:10 pm, Frank Weiss  wrote:
>
> > > > Another option for not-too-large databases is ISO-8601, like
> > > > 20100127T134900Z, or just 20100127, etc. It's designed to sort and 
> > > > compare
> > > > as simple strings. Downside is it takes more space in the database.- 
> > > > Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are s

[android-developers] Re: Parsing HTML

2010-01-28 Thread vellanova
The TagSoup HTML parser, which is very forgiving and very
customizable, is compiled into the Android runtime and used by the
TextView component to parse HTML. Unfortunately it is not exposed by
the SDK, but you can access it via introspection, with the caveat that
there is a slight chance that in some future version of android it
will go away or be replaced with something else.


On Jan 28, 4:31 pm, Frank Weiss  wrote:
> I've recommended nekohtml and several people have reported using it
> successfully on Android.
>
> On Jan 28, 2010 3:04 PM, "Marc Petit-Huguenin"  wrote:
>
> On 01/28/2010 02:31 PM, Allison Inouye wrote: > I am trying to parse an HTML
> document that is missin...
> I was able to parse badly written HTML (is there another kind?) as XML by
> using
> JTidy (not on Android so YMMV):
>
> import org.w3c.tidy.*;
>
> Tidy tidy = new Tidy();
> tidy.setXmlOut(true);
> tidy.setShowWarnings(false);
> tidy.setQuiet(true);
> tidy.parseDOM(connection.getInputStream(), null);
>
> -- You received this message because you are subscribed to the Google Groups
> "Android Developers" ...

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

2010-01-28 Thread Urban ArtFX
the emulator can only do so much.  I like to see if my apps have
problems when the phone is jam packed with apps.  having some apps on
the phone can cause problems to your apps.

On Jan 28, 5:39 pm, Wayne Wenthin  wrote:
> The emulator is a good friend to have.  It will save you from going bankrupt
> trying to keep up.  Unless your app makes alot of money.
>
>
>
>
>
> On Thu, Jan 28, 2010 at 2:27 PM, Urban ArtFX  wrote:
> > Please help.
>
> > On Jan 28, 2:05 pm, Urban ArtFX  wrote:
> > > I was just wondering. I was going to buy the DEV 2 but then i decided
> > > to just buy the Nexus One.  I want to troubleshoot my apps but i don't
> > > want to buy old technology.  as it is I am going to have to buy a new
> > > phone every 6 months to keep up with technology.  Any help would be
> > > great.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums

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

2010-01-28 Thread JP
Well I have to admit I almost adore this problem description. You can
try Paint.measureText()
http://developer.android.com/reference/android/graphics/Paint.html


On Jan 28, 5:12 pm, Tiger  wrote:
>     The string contains different kinds of characters.

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

2010-01-28 Thread aweisberg
IME you have to do both and try and read actual audio before you can
be %100 sure you have a working configuration. My app on first startup
tries a variety of combos and then records the best one that actually
works. When I only used GetMinBufferSize to validate a combo it would
pick an invalid configuration on 2.0.1 devices

Ariel

On Jan 28, 2:38 pm, Rico  wrote:
> Thank you Dan and Niko.  Both very useful pieces of info.
>
> I don't have a Moment anymore (had to borrow one from a user), but I'm
> almost certain it was on the older firmware based on the release date
> of that update.
>
> Just for clarification in case others find this thread helpful:
> You are supposed to do the check through AudioRecord.GetMinBufferSize,
> and not AudioTrack.GetMinBufferSize
>
> Again, thanks for the help.
>
> On Jan 24, 7:21 pm, niko20  wrote:
>
> > You're supposed to query the device with a GetMinBufferSize call
> > first, and then check that for any error codes. I'm guessing if you do
> > that you will get correct error codes. Don't rely on the AudioTrack
> > creation to give you the error codes for testing the device's
> > capabilities. Use AudioTrack.GetMinBufferSize first before you try to
> > create the AudioTrack.
>
> > -niko
>
> > On Jan 20, 9:51 pm, dan raaka  wrote:
>
> > > What build does this device have?
>
> > > There is new update for this device. Did you try on this build 
> > > ?http://community.sprint.com/baw/thread/26322?featured=true
>
> > > -Dan
>
> > > On Mon, Jan 18, 2010 at 12:02 PM, Rico  wrote:
> > > > When switching between the emulator (which supports 8KHz) and a real
> > > > phone like the G1 (which supports 16KHz), I used the following code to
> > > > set up a valid AudioRecord object:
>
> > > > AudioRecord ar;
>
> > > > // Try to construct at 16KHz
> > > > ar = new AudioRecord(
> > > >  MediaRecorder.AudioSource.MIC,
> > > >  16000,
> > > >  AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > > >  AudioFormat.ENCODING_PCM_16BIT,
> > > >  AUDIO_BUFFER_SIZE);
>
> > > > if (ar.getState() != AudioRecord.STATE_INITIALIZED) {
> > > >  // Unable to set up at 16KHz, try at 8KHz
> > > >  ar = new AudioRecord(
> > > >    MediaRecorder.AudioSource.MIC,
> > > >    8000,
> > > >    AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > > >    AudioFormat.ENCODING_PCM_16BIT,
> > > >    AUDIO_BUFFER_SIZE);
> > > > }
>
> > > > This seems to work just fine, and a 16KHz AudioRecord object is
> > > > instantiated on the G1, and a 8KHz object is instantiated on the
> > > > emulator.
>
> > > > However, on theSamsungMoment, which only supports 8KHz,
> > > > AudioRecord.getState() returns STATE_INITIALIZED when trying to
> > > > construct with 16KHz.  This ends up causing recording to fail since
> > > > it's trying to record at 16KHz, even though the phone doesn't support
> > > > it.  Also, I don't see any exceptions thrown when I try to wrap the
> > > > construction in a try-catch.
>
> > > > Does anyone know of a better way to detect 16KHz vs. 8KHz capabilities
> > > > on the device?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: IP Adress of android device

2010-01-28 Thread Tony
Bob Kerns and WoodManEXP  ,thank you very much.

Now ,I know what should I do next step,  Maybe ,I need more information on
network  than  android platform itself.
so ,I 've decided to read more about  network online. I am engaging in sip
development on android platfor ,  and I have wrote a sample  in sip, so I
need to test its function .

 thank you  for your advices.

Best regards.




2010/1/28 WoodManEXP 

> Yea, trying to communicate between any two Androids, or any devices
> for that matter, using their IP address is probably going to be next
> to impossible, in the general case.
>
> It would work OK inside an intranet where IP addresses are less
> volatile (like the way controllers communicate with robots over a
> local wireless LAN). Even then the devices are configured to have
> predetermined, unchanging IP addresses.
>
> Like Bob Kerns says you may way to consider using a server as
> intermediary, much the same way that instant messaging works. A
> reasonably dependable connection can be established between a server
> and the Android and then the server can pass messages between the two.
>
> If the Androids are in close proximity, like in the same small room,
> take a look at Bluetooth for establishing a connection. That works
> really well in such cases.
>
> BTW, you can determine an Android's IP address like this:
>
>public String getLocalIpAddress() {
>try {
>for (Enumeration en =
> NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
>NetworkInterface intf = en.nextElement();
>for (Enumeration enumIpAddr =
> intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
>InetAddress inetAddress = enumIpAddr.nextElement();
>if (!inetAddress.isLoopbackAddress()) {
>return inetAddress.getHostAddress().toString();
>}
>}
>}
>} catch (SocketException ex) {
>}
>return null;
>}
>
> But it is mostly useless as it is usually known only to the nearest
> DHCP server and not outside that sphere.
>
>
> On Jan 28, 7:44 am, Bob Kerns  wrote:
> > The IP addresses will be whatever the DHCP server on that subnet says
> > they should be. Often, the DHCP server role will be handled by your
> > router to the internet, but in a corporate environment, things may be
> > more complicated.
> >
> > When a device connects to an IP network, it usually broadcasts "who am
> > I?", and a DHCP server then tells it basic stuff like it's IP address.
> > This can be a pre-allocated address assigned to that device, or it can
> > be allocated dynamically from a pool of addresses.
> >
> > I would guess you don't want to require pre-assignment, because,
> > typically, users would not be able to do so.
> >
> > So how do the devices discover each other's IP addresses?
> >
> > Well, there are a lot of options there. You can have each user type in
> > the IP address. You can register the device dynamically under a DNS
> > server, and have them type in the DNS name. You can use a service
> > discovery protocol (like Apple's Bonjour service). You can roll your
> > own using broadcast or multicast messages. You can register each
> > device on a server -- and then even talk to each other THROUGH the
> > server. This last has the great advantage that it allows two devices
> > on incompatible networks to communicate. (I presume the disadvantages
> > are obvious).
> >
> > About the only thing I can say for sure is -- you're going to need to
> > know more about networking than you do today. It's learnable, and
> > there are resources out there to help. Most of what you need to know
> > is information that is not specific to the Android platform, so there
> > will be a wide array of sources of information. Google searches are
> > you friend.
> >
> > You can probably accomplish everything you're trying to do entirely
> > with the classes in the java.net package. So you can develop your
> > approach in any connected Java environment.
> >
> > On Jan 28, 1:56 am, Tony  wrote:
> >
> > > Hello ,all!
> >
> > > If I connect  two android pwer  real-devices   to  a LAN  through wifi,
> > > then what  are their  IP adress???
> >
> > > How can then find each other by IP address???
> >
> > > are  their IP address 192.168.0.* ??
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
I have a strong desire to become  to a android superior; let us work hard
together!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group

[android-developers] How to get the real width of pixels of a string?

2010-01-28 Thread Tiger
The string contains different kinds of characters.

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

2010-01-28 Thread Ian
Hello,

Unfortunately removing threading did not fix the problem but I was
eventually able to solve this by storing the vertices, normals, and
texture coordinates in 3 seperate VBOs instead of in one with offsets.

Thanks


On Jan 19, 10:10 am, String  wrote:
> On Jan 18, 3:47 am, Ian  wrote:
>
> > The application runs perfectly on the Nexus.
>
> > On the Magic, the application crashes >50% of the time on the first
> > frame with a segmentation fault (see end of post). If it does not
> > crash immediately, it runs fine and exits normally.
>
> This is only a guess, but are you doing any multithreading before 
> theOpenGLinit? In my experience, inconsistent bugs are often due to
> timing problems. It sounds to me like it could be some required init
> going on in another thread which the Droid's CPU can consistently
> finish (beforeOpenGLstarts), but the Ion can't.
>
> String

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


Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor

On Thu, Jan 28, 2010 at 6:30 PM, Jason Proctor
 wrote:

 XML parsers require closed tags.


No, not all of them do.  This is exactly the point you can't seem to
grasp.  There are many XML parsers that close tags for you.  Whether
you still consider them to actually be XML parsers doesn't matter,
they still parse XML, high quality or other.


there are pieces of code around which are forgiving when it comes to 
closing tags, for sure. however, the XML standard specifies that tags 
be closed. therefore, XML parsers must insist on this in order to be 
compliant. it's only because of HTML's rather loose formatting rules 
that anything is not compliant -- IMVHO!


however, as you point out, in weird and wonderful real browser world 
(tm), pretty much anything can and does go. i heard that due to 
conflicting issues with HTML/SGML/XML commenting syntax, Netscape 
would try various different parsing methods on each document, and 
render the version which resulted in the most visible content. i 
mean, ffs.


i've seen some shit in my time, but browsers... zomg.

--
jason.vp.engineering.particle

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


Re: [android-developers] Re: Why is HTC Hero using drawable-ldpi?

2010-01-28 Thread Dianne Hackborn
It does ignore it, and ends up with two resources that are equivalent so
picks one of them.

On Thu, Jan 28, 2010 at 3:07 PM, westmeadboy wrote:

> Then I would expect it to ignore it, but it doesn't.
>
> I think you misread my post, Dianne.
>
> On Jan 28, 11:55 pm, Dianne Hackborn  wrote:
> > Because this is a new configuration param that it doesn't know about, so
> > doesn't see, and wouldn't want to see, because it wouldn't know what to
> do
> > with it.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Parsing HTML

2010-01-28 Thread Greg Donald
On Thu, Jan 28, 2010 at 6:30 PM, Jason Proctor
 wrote:
> XML parsers require closed tags.

No, not all of them do.  This is exactly the point you can't seem to
grasp.  There are many XML parsers that close tags for you.  Whether
you still consider them to actually be XML parsers doesn't matter,
they still parse XML, high quality or other.


-- 
Greg Donald
destiney.com | gregdonald.com

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


Re: [android-developers] Emulator on Ubuntu problem running after first time starting emulator

2010-01-28 Thread Kevin Duffey
I will see if I can reproduce it consistently. I didn't notice it a few
weeks back when I first started on the app. I've not noticed it on some
"test" apps I've done while learning Android. I have only noticed it with
regards to the MapActivit project I am working on. I will try this.. I will
reboot my machine, load eclipse fresh, run my app via the debug command
without loading the UI AVD and starting the emulator that way. The debug
will start the emulator for me. I'll check the first run, make a change,
press debug again, see what happens. I assume I don't have to actually stop
the emulator each time.. that would kill development time for quick changes.
Should I stop the DDBS threads in the DDBS perspective before relaunching..
or is it ok to just make a change and relaunch every time? I was doing that
before with basic text widget button demo apps and that seemed to work fine.

I don't know if this is related..but I can't get any LogCat info out. I've
got Log.v("MAPS","it worked") logs at different locations, and when I filter
on MAPS or create a new filter, or look in the long initial start LogCat
list, I can't see anything. However, this issue of the emulator not working
ALSO did this before I ever put Log.v calls in there, so I don't think the
logging itself is the issue.

Do you guys have any idea what is causing this yet and working on a fix?

Thanks.


On Thu, Jan 28, 2010 at 3:46 PM, David Turner  wrote:

> This is an emulator bug that is unrelated to your application. I could
> never reproduce it but several people have reported it.
> Can you confirm that you have a 100% way to reproduce it ?
>
> On Thu, Jan 28, 2010 at 3:24 PM, Kevin Duffey  wrote:
>
>> Hi all,
>>
>> I've seen other posts on emulators, but none seem to match my issue.
>> Basically on a clean boot of my Ubuntu 9.04 64-bit system, I fire up
>> Eclipse, load my project, and run it in debug (or not) mode. Either way, the
>> emulator fires up, takes about 30 to 45 seconds to initialize, and my app
>> shows up. When I make some changes and rebuild my app, sometimes it reloads
>> properly. However, if I shut down the emulator at all, then relaunch it
>> fresh, I am constantly getting the following error in the console output:
>>
>> emulator: ERROR: unexpected qemud char. channel close
>>
>>
>> Now, I run in DDMS perspective as well, and I see a bunch of threads start
>> up. I also see my app being deployed. Then slowly, all the threads including
>> the normal ones like Alarm clock, etc disappear. Then that error line shows
>> up. At this point, my app somehow shows up in the emulator (it's a google
>> maps app), and I have NOT had to press the menu key to get past the normal
>> lock screen. Not sure why when this thing crashes like this, I've not had to
>> use the lock screen menu press to see my app like I usually do.
>>
>> I've not found any useful info on the specific error either.
>>
>> Thank you 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
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor

Browsers contain XML parsers (whatever you choose to call them, they
still parse XML).  Those parsers look for and close unclosed tags
before rendering.  My point stands.

There is also HTML Tidy which parses XML for errors.  It can and does
close unclosed tags if you ask it to.  So that's another case where
your analogy fails.


XML requires closed tags. XML parsers require closed tags. if your 
document requires pre-processing before it goes through the XML 
parser, then it isn't XML. and if your parser allows unclosed tags, 
then it's not an XML parser.


but the point i was making was that since the OP is looking to parse 
input which potentially contains unclosed tags, she can't use the 
DocumentBuilder interface, because that uses an XML parser. 
therefore, she will require either a preprocessor to make the 
document compliant before submitting it to the XML parser, or use a 
forgiving HTML parser to make a Document object.


and your post, pointing out that browsers will under some conditions 
(and not, by the way, if the document is declared to be XML or XHTML, 
otherwise they are noncompliant) close your tags for you, doesn't 
actually help or provide any useful information at all, DOES IT??


and no, HTML is most definitely *not* XML.

--
jason.vp.engineering.particle

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


Re: [android-developers] Parsing HTML

2010-01-28 Thread Greg Donald
On Thu, Jan 28, 2010 at 4:53 PM, Jason Proctor
 wrote:
>> On Thu, Jan 28, 2010 at 4:34 PM, Jason Proctor
>>  wrote:
>>>
>>>  there ain't no XML parser in the
>>>  world that will let an unclosed tag pass.
>>
>> You mean aside from every web browser ever built?
>
> ah good -- nice knee-jerk, miss-the-point, off-topic post, as usual.

It was good, very good in fact.  It shows you a case you didn't
consider before you posted your incorrect one-size fits all analogy.
HTML _is_ XML, so my point is dead-on and completely on-topic for this
thread.

> see, now i'm feeding the troll.

Fuck you.

> if a document declares itself as XML, or
> XHTML, but contains unclosed tags, and the parser allows it, then it's no
> XML parser. no matter what else you call it.

Browsers contain XML parsers (whatever you choose to call them, they
still parse XML).  Those parsers look for and close unclosed tags
before rendering.  My point stands.

There is also HTML Tidy which parses XML for errors.  It can and does
close unclosed tags if you ask it to.  So that's another case where
your analogy fails.


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] Re: Motorola Droid (possible android) multi-touch bug and how to reproduce

2010-01-28 Thread Mario Zechner
It seems Toon Warz, another game using multitouch also has some issues
on N1 and Droid. Can others confirm the problem with the code posted
above? Did anyone arrive at a solution? This is a pretty bad situation
for game developers as nothing freaks users more out than bad
controls. I think the code above is even a demo code from the android
framework so i find it kinda strange that the problem didn't pop up
during their testing phase. I also couldn't find any information on
the logcat output telling me about the drop of a bad pointer.

On 23 Jan., 19:39, mzechner  wrote:
> I can confirm this problem using the sample code above, my own code
> and playing multipong. I created two videos, one showing the problem
> for the sample code above and one showing it in multipong.
>
> http://www.youtube.com/watch?v=865cd2Ui0Co(sample 
> code)http://www.youtube.com/watch?v=glNWToF6aOI(multipong from market)
>
> Each time thepointergo crazy LogCat displays messages tagged
> "InputDevice" saying "droppingbadpointer#0", in all 3 cases (sample
> code, my code, multipong). ThepointerIds get mixed up, and as can be
> seen in the video for the sample code above the x coordinate for the
> secondpointeris wrong. I have a suspicion that this might be a
> driver related bug. In any way it makes writting games with multitouch
> impossible.
>
> The bug can be reproduced by quickly tapping around and then settle
> with 2 digits on the screen. It does not work always but often enough
> to be annoying in a game with a dual analog stick setup on screen
> (like in my code).
>
> I hope this gets fixed asap. If more people can confirm this i file a
> bug athttp://b.google.com/
>
> On 15 Jan., 21:32, Mirmathrax  wrote:
>
> > here is in the original text from the post, this explains how to make
> > the bug occur:
>
> >  1)  Touch screen with finger 1 and start doodling
> >      2)  Without removing finger 1, touch screen with finger 2 and
> > start doodling
> >      3)  Remove finger 1 from the screen (without removing finger 2)
> >      4)  Replace finger 1 on the screen and start doodling again
> > (never remove finger 2)
> >      5)  Voila, you will see the bug.  The drawn lines for finger 1
> > will suddeny connect to finger 2.
>
> > This is because  there is a bug when the first finger is placed back
> > down again, the event only has points for the wrong finger!  Even
> > though finger 1 went back down at a new location, the code thinks for
> > some reason that finger 2 is the one that went back down (but it never
> > went up).
>
> > -Colin
>
> > On Jan 15, 2:35 pm, rollbak  wrote:
>
> > > Can you please explain which the issue is?
>
> > > On Jan 15, 1:09 pm, Mirmathrax  wrote:
>
> > > > Multi-touch API is bugged (at least on Motorola Droid). Here is a
> > > > method to reproduce the error for analysis:
>
> > > > 1)  Create a new android project in Eclipse with the following fields:
>
> > > >  Project name:           PointerLocation
> > > >  Build target:              Android 2.0.1
> > > >  Application Name:     PointerLocation
> > > >  Package Name:        com.example.pointerlocation
> > > >  Create Activity:         PointerLocation
>
> > > > 2)  Copy the following code and paste this into the
> > > > PointerLocation.java file that is automatically created
>
> > > > /*
> > > >  * Copyright (C) 2007 The Android Open Source Project
> > > >  *
> > > >  * Licensed under the Apache License, Version 2.0 (the "License");
> > > >  * you may not use this file except in compliance with the License.
> > > >  * You may obtain a copy of the License at
> > > >  *
> > > >  *      http://www.apache.org/licenses/LICENSE-2.0
> > > >  *
> > > >  * Unless required by applicable law or agreed to in writing, software
> > > >  * distributed under the License is distributed on an "AS IS" BASIS,
> > > >  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> > > > implied.
> > > >  * See the License for the specific language governing permissions and
> > > >  * limitations under the License.
> > > >  */
>
> > > > package com.example.pointerlocation;
>
> > > > import android.app.Activity;
> > > > import android.content.Context;
> > > > import android.graphics.Canvas;
> > > > import android.graphics.Paint;
> > > > import android.graphics.Paint.FontMetricsInt;
> > > > import android.os.Bundle;
> > > > import android.util.Log;
> > > > import android.view.MotionEvent;
> > > > import android.view.ViewConfiguration;
> > > > import android.view.WindowManager;
> > > > import android.view.VelocityTracker;
> > > > import android.view.View;
>
> > > > import java.util.ArrayList;
>
> > > > /**
> > > >  * Demonstrates wrapping a layout in a ScrollView.
> > > >  *
> > > >  */
> > > > public class PointerLocation extends Activity {
> > > >     @Override
> > > >     protected void onCreate(Bundle icicle) {
> > > >         super.onCreate(icicle);
> > > >         setContentView(new MyView(this));
>
> > > >         // Make the screen full bright for this activity.
>

Re: [android-developers] Re: View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread Romain Guy
No, layout does NOT happen in onCreate(), it happens later.

On Thu, Jan 28, 2010 at 2:54 PM, ClarkBattle  wrote:
> But its in onStart() while the layout happens in onCreate().  There is
> no onFinishInflate() for Activities.  How do i make sure that the
> inflation has happened?
>
> On Jan 28, 2:52 pm, Romain Guy  wrote:
>> You are probably calling getLocationInWindow() before the layout happened.
>>
>>
>>
>> On Thu, Jan 28, 2010 at 2:50 PM, ClarkBattle  wrote:
>> > I have an app with the following code using android 2.0.1
>>
>> > int[] loc = new int[2];
>>
>> > Button btn = (Button) findViewById( R.id.btn3 );
>> > if( btn != null )
>> >    btn.getLocationInWindow( loc);
>>
>> > Log.i("Where?","x=" + where[0] + " y=" + where[1] );
>>
>> > This logs "x=0 y=88" but R.id.btn3 is in the middle of the screen!
>>
>> > I was experiencing this in android 2.0.1 so I wrote the following test
>> > app in android 2.1 that logs the XY coordinates of a button in the
>> > middle of the screen.
>>
>> > This logs "x=0 and y=0"
>>
>> > public class TestLoc extends Activity
>> > {
>> >       �...@override
>> >        public void onCreate( Bundle savedInstanceState )
>> >        {
>> >                super.onCreate( savedInstanceState );
>> >                setContentView( R.layout.main );
>> >        }
>>
>> >       �...@override
>> >        public void onStart()
>> >        {
>> >                super.onStart();
>>
>> >                int[] where = new int[2];
>> >                Button view = (Button) findViewById( R.id.btnThree );
>> >                if( view != null )
>> >                {
>> >                    view.getLocationInWindow( where );
>> >                    Log.i("Where?","x=" + where[0] + " y=" + where[1] );
>> >                }
>> >        }
>> > }
>>
>> > 
>> > > >    xmlns:android="http://schemas.android.com/apk/res/android";
>> >    android:layout_width="wrap_content"
>> >    android:layout_height="wrap_content" >
>>
>> >    
>> >      
>> >    
>>
>> >    
>> >      
>> >      
>> >    
>> > 
>>
>> > Wha's up?  Is there a reliable way to get the window coordinates of
>> > any view?
>>
>> > Thanks for reading,
>> > Clark
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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


Re: [android-developers] Emulator on Ubuntu problem running after first time starting emulator

2010-01-28 Thread David Turner
This is an emulator bug that is unrelated to your application. I could never
reproduce it but several people have reported it.
Can you confirm that you have a 100% way to reproduce it ?

On Thu, Jan 28, 2010 at 3:24 PM, Kevin Duffey  wrote:

> Hi all,
>
> I've seen other posts on emulators, but none seem to match my issue.
> Basically on a clean boot of my Ubuntu 9.04 64-bit system, I fire up
> Eclipse, load my project, and run it in debug (or not) mode. Either way, the
> emulator fires up, takes about 30 to 45 seconds to initialize, and my app
> shows up. When I make some changes and rebuild my app, sometimes it reloads
> properly. However, if I shut down the emulator at all, then relaunch it
> fresh, I am constantly getting the following error in the console output:
>
> emulator: ERROR: unexpected qemud char. channel close
>
>
> Now, I run in DDMS perspective as well, and I see a bunch of threads start
> up. I also see my app being deployed. Then slowly, all the threads including
> the normal ones like Alarm clock, etc disappear. Then that error line shows
> up. At this point, my app somehow shows up in the emulator (it's a google
> maps app), and I have NOT had to press the menu key to get past the normal
> lock screen. Not sure why when this thing crashes like this, I've not had to
> use the lock screen menu press to see my app like I usually do.
>
> I've not found any useful info on the specific error either.
>
> Thank you 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

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

2010-01-28 Thread 3pei
I have encountered this too.

On Jan 28, 7:11 am, Arron  wrote:
> I took the example from the API:
>
> MediaRecorder recorder = new MediaRecorder();
>  recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
>  recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
>  recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
>  recorder.setOutputFile(PATH_NAME);
>  recorder.prepare();
>  recorder.start();   // Recording is now started
>
> When I try to run this, I get the following:
> ERROR/audio_input(30): unsupported parameter: x-pvmf/media-input-node/
> cap-config-interface;valtype=key_specific_value
>
> Anyone knows what's wrong?
>
> Additionally the code example in the dev guide is completely wrong.
> It uses code that don't even exist in the API.
>
> 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: docs for shape xml syntax

2010-01-28 Thread Nerdrow
Not a lot of good, workable documentation about this.  This helped me
out a lot: http://escomic.net/217


On Jan 27, 3:59 pm, jotobjects  wrote:
> Where is there information about the syntax of  xml files.
> These can be used to define 2D graphics as I understand it.  There are
> few spotty examples in the samples directory but that is all I have
> found.

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

2010-01-28 Thread Nerdrow
All date/time in java is epoch based anyway, so I would just store it
as a long until you need to display it then use a Date object to
format the output, small & fast :)

On Jan 27, 11:20 pm, Zsolt Vasvari  wrote:
> Sorry, I take that back
>
> I define my columns as DATETIME and then use the following static
> class (feel free to use it as you wish) to convert 'long' values to
> DateStamp format.  SQLite can sort on that format.
>
> import java.util.Calendar;
> import android.database.Cursor;
>
> // This is a replacement for java.sql.Timestamp which is way too slow
> final class Timestamp
> {
>     static Calendar calendar;
>
>     static
>     {
>         calendar = Calendar.getInstance();
>     }
>
>     // Can't instantiate this class
>     private Timestamp()
>     {
>         // Nothing to do
>     }
>
>     static CharSequence formatCurrentTimestamp()
>     {
>         return formatTimestamp(System.currentTimeMillis());
>     }
>
>     static CharSequence formatTimestamp(long time)
>     {
>         calendar.setTimeInMillis(time);
>
>         int year = calendar.get(Calendar.YEAR);
>         int month = calendar.get(Calendar.MONTH) + 1;
>         int day = calendar.get(Calendar.DAY_OF_MONTH);
>         int hour = calendar.get(Calendar.HOUR_OF_DAY);
>         int minute = calendar.get(Calendar.MINUTE);
>         int second = calendar.get(Calendar.SECOND);
>         int millisecond = calendar.get(Calendar.MILLISECOND);
>
>         // 01234567890123456789012
>         // -MM-DD HH:MM:SS:MMM
>         StringBuilder s = new StringBuilder(23);
>         s.append(year);
>         s.append('-');
>         if (month < 10)
>             s.append('0');
>         s.append(month);
>         s.append('-');
>         if (day < 10)
>             s.append('0');
>         s.append(day);
>         s.append(' ');
>         if (hour < 10)
>             s.append('0');
>         s.append(hour);
>         s.append(':');
>         if (minute < 10)
>             s.append('0');
>         s.append(minute);
>         s.append(':');
>         if (second < 10)
>             s.append('0');
>         s.append(second);
>         s.append('.');
>         if (millisecond < 100)
>             s.append('0');
>         if (millisecond < 10)
>             s.append('0');
>         s.append(millisecond);
>
>         return s;
>     }
>
>     static long parseTimestampOrZeroFromCursor(Cursor cursor, int
> columnId)
>     {
>         long time;
>         CharSequence s = cursor.getString(columnId);
>
>         if ((s.length() == 1) && (s.charAt(0) == '0'))
>             time = 0;
>         else
>             time = parseTimestampFromCursorCommon(s);
>
>         return time;
>     }
>
>     static long parseTimestampFromCursor(Cursor cursor, int columnId)
>     {
>         return parseTimestampFromCursorCommon(cursor.getString
> (columnId));
>     }
>
>     static private long parseTimestampFromCursorCommon(CharSequence s)
>     {
>         // 01234567890123456789012
>         // -MM-DD HH:MM:SS:MMM
>         int year = ((s.charAt(0) - '0') * 1000) + ((s.charAt(1) - '0')
> * 100) + ((s.charAt(2) - '0') * 10) + (s.charAt(3) - '0');
>         int month = ((s.charAt(5) - '0') * 10) + (s.charAt(6) - '0');
>         int day = ((s.charAt(8) - '0') * 10) + (s.charAt(9) - '0');
>         int hour = ((s.charAt(11) - '0') * 10) + (s.charAt(12) - '0');
>         int minute = ((s.charAt(14) - '0') * 10) + (s.charAt(15) -
> '0');
>         int second = ((s.charAt(17) - '0') * 10) + (s.charAt(18) -
> '0');
>         int millisecond = ((s.charAt(20) - '0') * 100) + ((s.charAt
> (21) - '0') * 10) + (s.charAt(22) - '0');
>
>         calendar.set(Calendar.YEAR, year);
>         calendar.set(Calendar.MONTH, month - 1);
>         calendar.set(Calendar.DAY_OF_MONTH, day);
>         calendar.set(Calendar.HOUR_OF_DAY, hour);
>         calendar.set(Calendar.MINUTE, minute);
>         calendar.set(Calendar.SECOND, second);
>         calendar.set(Calendar.MILLISECOND, millisecond);
>
>         return calendar.getTimeInMillis();
>     }
>
> }
>
> On Jan 28, 3:16 pm, Zsolt Vasvari  wrote:
>
>
>
> > I just store a "long", as returned from getTime()
>
> > On Jan 28, 1:10 pm, Frank Weiss  wrote:
>
> > > Another option for not-too-large databases is ISO-8601, like
> > > 20100127T134900Z, or just 20100127, etc. It's designed to sort and compare
> > > as simple strings. Downside is it takes more space in the database.- Hide 
> > > quoted text -
>
> > - Show quoted text -

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


Re: [android-developers] Parsing HTML

2010-01-28 Thread Frank Weiss
I've recommended nekohtml and several people have reported using it
successfully on Android.

On Jan 28, 2010 3:04 PM, "Marc Petit-Huguenin"  wrote:

On 01/28/2010 02:31 PM, Allison Inouye wrote: > I am trying to parse an HTML
document that is missin...
I was able to parse badly written HTML (is there another kind?) as XML by
using
JTidy (not on Android so YMMV):

import org.w3c.tidy.*;

Tidy tidy = new Tidy();
tidy.setXmlOut(true);
tidy.setShowWarnings(false);
tidy.setQuiet(true);
tidy.parseDOM(connection.getInputStream(), null);

-- You received this message because you are subscribed to the Google Groups
"Android Developers" ...

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

[android-developers] Emulator on Ubuntu problem running after first time starting emulator

2010-01-28 Thread Kevin Duffey
Hi all,

I've seen other posts on emulators, but none seem to match my issue.
Basically on a clean boot of my Ubuntu 9.04 64-bit system, I fire up
Eclipse, load my project, and run it in debug (or not) mode. Either way, the
emulator fires up, takes about 30 to 45 seconds to initialize, and my app
shows up. When I make some changes and rebuild my app, sometimes it reloads
properly. However, if I shut down the emulator at all, then relaunch it
fresh, I am constantly getting the following error in the console output:

emulator: ERROR: unexpected qemud char. channel close


Now, I run in DDMS perspective as well, and I see a bunch of threads start
up. I also see my app being deployed. Then slowly, all the threads including
the normal ones like Alarm clock, etc disappear. Then that error line shows
up. At this point, my app somehow shows up in the emulator (it's a google
maps app), and I have NOT had to press the menu key to get past the normal
lock screen. Not sure why when this thing crashes like this, I've not had to
use the lock screen menu press to see my app like I usually do.

I've not found any useful info on the specific error either.

Thank you 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] Re: Why is HTC Hero using drawable-ldpi?

2010-01-28 Thread westmeadboy
Then I would expect it to ignore it, but it doesn't.

I think you misread my post, Dianne.

On Jan 28, 11:55 pm, Dianne Hackborn  wrote:
> Because this is a new configuration param that it doesn't know about, so
> doesn't see, and wouldn't want to see, because it wouldn't know what to do
> with it.

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


[android-developers] Background from PreferenceActivity is not applied to sub-PreferenceScreen

2010-01-28 Thread Wouter
Hi,

I am testing my application on a Nexus One and i have some problems.
My theme is Light and when an sub PreferenceScreen is displayed, the
window background becomes black instead of keeping the
PreferenceActivity's one.


...




What is the problem?

Wouter

You can find my code here:

http://pastie.org/798564

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


Re: [android-developers] Parsing HTML

2010-01-28 Thread Marc Petit-Huguenin
On 01/28/2010 02:31 PM, Allison Inouye wrote:
> I am trying to parse an HTML document that is missing an end tag on
> one of the elements (input tag). Anyone know how to get the parser to
> ignore that it doesn't have an end tag and just read an attribute
> value?
> 
> DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
> DocumentBuilder builder = dbf.newDocumentBuilder();
> Document dom = builder.parse(url.openStream()); //ERROR HERE
> 
> Error:
> 01-28 21:34:38.384: WARN/System.err(12108):
> org.xml.sax.SAXParseException: expected: /input read: div
> (position:END_TAG @21:10 in java.io.inputstreamrea...@432749f8)
> 

I was able to parse badly written HTML (is there another kind?) as XML by using
JTidy (not on Android so YMMV):

import org.w3c.tidy.*;

Tidy tidy = new Tidy();
tidy.setXmlOut(true);
tidy.setShowWarnings(false);
tidy.setQuiet(true);
tidy.parseDOM(connection.getInputStream(), null);

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


[android-developers] EditText - maximum width

2010-01-28 Thread android beginner
Hi,

I need to have an EditText with maximum width for 4 characters. I do not
want set maximum width in pixels as I have my target with couple of
different screen resolutions.

Can anyone suggest me how to do this?

Thanks

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

[android-developers] Re: android:fastScrollEnabled="true": Is there more to getting the alphabetical index?

2010-01-28 Thread Nerdrow
There's an SDK sample on this:  platforms\android-?.?\samples\ApiDemos
\src\com\example\android\apis\view\List9.java

On Jan 27, 10:28 pm, pawpaw17  wrote:
> Hi Guys,
>
> I added android:fastScrollEnabled="true" to the xml description of my
> listview class.
> I was (probably mistakenly) expecting this to magically transform the
> scrolling of my
> really huge listview so that the thumb button and the indexes display
> on the right side.
>
> Is there more to hooking up the listview so that the framework knows
> what its alphabetizing?
> I have custom defined cells.
>
> If anyone knows, or knows a good example, please let me know.
>
> Thanks!!
>
> pawpaw17

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


Re: [android-developers] "android update sdk" on headless linux

2010-01-28 Thread Xavier Ducrohet
It's not supported at the moment.

Xav

On Thu, Jan 28, 2010 at 11:01 AM, focuser  wrote:
> Has anybody succeeded in updating/installing Android SDK platforms on
> a headless Linux server?  All I got is the following error:
>
> It seems like the action "update sdk" is actually not supported?  I
> searched around but couldn't find anything yet..
>
>    ~/android-sdk-linux_86/tools$ ./android --verbose update sdk
>    No command line parameters provided, launching UI.
>    See 'android --help' for operations from the command line.
>    Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-
> pi-gtk-3550 or swt-pi-gtk in swt.library.path, java.library.path or
> the jar file
>            at org.eclipse.swt.internal.Library.loadLibrary(Unknown
> Source)
>            at org.eclipse.swt.internal.Library.loadLibrary(Unknown
> Source)
>            at org.eclipse.swt.internal.gtk.OS.(Unknown
> Source)
>            at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown
> Source)
>            at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown
> Source)
>            at org.eclipse.swt.widgets.Display.(Unknown
> Source)
>            at
> com.android.sdkuilib.internal.repository.UpdaterWindowImpl.open
> (UpdaterWindowImpl.java:93)
>            at com.android.sdkuilib.repository.UpdaterWindow.open
> (UpdaterWindow.java:110)
>            at com.android.sdkmanager.Main.showMainWindow(Main.java:
> 281)
>            at com.android.sdkmanager.Main.doAction(Main.java:251)
>            at com.android.sdkmanager.Main.run(Main.java:92)
>            at com.android.sdkmanager.Main.main(Main.java:81)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

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


Re: [android-developers] Register a new MIME-type with Android

2010-01-28 Thread Dianne Hackborn
The API you are calling is just for the web kit when running in your own
process.  If you want other apps to be able to see what you can do, that is
what AndroidManifest.xml is for.

On Thu, Jan 28, 2010 at 6:08 AM, Varun Khaneja  wrote:

> Hi,
>
> I want to register my application for files of a certain popular and
> well-documented MIME-type.
> The problem is that Android does not seem to recognize this MIME-type.
>
> The following sample code demonstrates this:
>
> package com.example.helloandroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.util.Log;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>/** Called when the activity is first created. */
> @Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
> TextView tv = new TextView(this);
>tv.setText("Hello, Android");
>setContentView(tv);
>String extn =
> android.webkit.MimeTypeMap.getFileExtensionFromUrl("/data/a.xyz");
>String xyzMimeType =
> android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension
> (extn);
>Log.d ("HelloAndroid", "extn: " + extn + " | xyzMimeType: " +
> xyzMimeType);
>}
> }
>
> The MIME-type returned by this API is NULL although it correctly
> returns the extension (extn = "xyz").
>
> So in my main application, if I skip the  /> line in the manifest file, the application does not receive the
> intent which means it is not launched.
> And there seems to be no way to specify android:mimeType as NULL.
>
> I also tried using , but with that, I get
> an error saying "Malformed XML".
> (Read about it here:
>
> http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension
> )
>
> Could someone please throw some light on this?
>
> Thanks,
> -Varun
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Testing location using network as location provider?

2010-01-28 Thread julius
Heh yeah I was coming to the conclusion it might be some kind of Timer
setup for testing...

Thanks for the reply.


On Jan 29, 8:53 am, Robert Woodruff  wrote:
> I have not found a way to do it in the emulator. All the GPS/location
> testing I do on a real device. Sometimes I get in the car and drive around
> to get more real world situation. Of course what you quickly discover is how
> crummy the GPS works in a car (or in a mall) :-).
>
> If you are testing with cellular locations rather than GPS locations you may
> need to do alot more moving around as the cellular location system is not so
> granular as real GPS.
>
> You may want to rig up a little ticker inside your app to feed location
> updates to the app for bench testing. Just put a sting array of coordinates
> in the resource fork and use the Timer class to drive the coordinate
> reader/feeder. It will simulate OK. But for location stuff actually getting
> out and moving the device around has been important. It is alot of fun just
> you and the stupid android and a laptop on the front seat stopping in parks
> and parking lots to toy with Eclipse and DDMS.
>
> Now if Google could just arrange for these apps to sell better...
>
> On Thu, Jan 28, 2010 at 2:10 PM, julius  wrote:
> > Thanks for the reply. I'm really trying to respond to changes.
>
> > This is a good idea to kick things off, but I'd like to be able to
> > show changes so I can turn the GPS service on/off. Is there a way to
> > do fake this in the emulator?
>
> > Regards,
> > Julius.
>
> > On Jan 29, 2:50 am, WoodManEXP  wrote:
> > > Sure, simply hard code the test coordinate in your app at the point
> > > you would otherwise call the LocationManager to get the last known
> > > location. Not too elegant, but it has worked over here on many
> > > occasions...
>
> > > On Jan 27, 10:57 pm, julius  wrote:
>
> > > > Hi,
>
> > > > I have an application which uses the network as the location provider
> > > > (rather than GPS eg.), however I can't seem to figure out how to send
> > > > the emulator test coordinates. In DDMS I would usually send
> > > > coordinates in the Emulator Control tab.
>
> > > > Is there a place to simulate coordinates derived from the cell phone
> > > > network provider?
>
> > > > Thanks for any help.
>
> > > > (If I try to get the last known location I get:
> > > > java.lang.IllegalArgumentException: provider=network)
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: show more photos

2010-01-28 Thread Nerdrow
- cache the images to disk
- use a List to store the paths to the cached images
- extend a BaseAdapter and use the List as your data source
- add a setPage(int page) method to set which page of 10 images you're
on
- in getView() adjust the value of position to account for the page
index

quick example from memory:


public class PagedPhotoAdapter extends BaseAdapter {

  private static final int PHOTOS_PER_PAGE = 10;

  private final LayoutInflater mInflater;
  private final List mPhotoPaths;
  private final int mPageCount;

  private int mPage = 0;

  public PagedPhotoAdapter(Context context, List photoPaths) {
mInflater = LayoutInflater.fromContext(context);

mPhotoPaths = photoPaths;

mPageCount = (mPageCount.size()/PHOTOS_PER_PAGE);
  }


  public void setPage(int page) {
mPage = page < 0 ? 0 : page > mPageCount ? mPageCount : page;
  }
  @Override public int getCount() {
return PHOTOS_PER_PAGE;
  }
  @Override public Object getItem(int position) {
return position;
  }
  @Override public int getItemId(int position) {
return position;
  }
  @Override public View getView(int position, View convertView,
ViewGroup parent) {
final int adjPosition = ((PHOTOS_PER_PAGE * mPage)+position)-1;

final ImageView imageView =
  (ImageView)(convertView==null?mInflater.inflate
(R.layout.layout_id, null):convertView);

imageView.setImageBitmap(BitmapFactory.decodeFile(mPhotoPaths.get
(adjPosition)));

return imageView;
  }

}


On Jan 28, 4:40 am, surya prakash  wrote:
> Hi
> I am getting photos from website and display them in Grid view, but
> here I do not want display all of them at time,
> 1. I want show only 10 photos and a "more" link below the grid , but i
> can display "more" link at top, how can I add it at bottom?
> 2.when user click on "more" it should display the another 10 photos
> only, I need to refresh the grid, how can we refresh the grid?
>
> 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


Re: [android-developers] Re: Why is HTC Hero using drawable-ldpi?

2010-01-28 Thread Dianne Hackborn
Because this is a new configuration param that it doesn't know about, so
doesn't see, and wouldn't want to see, because it wouldn't know what to do
with it.

On Thu, Jan 28, 2010 at 12:29 PM, westmeadboy wrote:

> Thanks Lance.
>
> But why doesn't 1.5 just ignore drawable-ldpi altogether?
>
> On Jan 28, 9:21 pm, Lance Nanek  wrote:
> > The new density specifiers are for Android 1.6 up. You need to hide
> > them from Android 1.5 by using version specifiers. Example: "drawable-
> > ldpi-v4".
> >
> > On Jan 28, 2:06 pm, westmeadboy  wrote:
> >
> >
> >
> > > Here is a summary of my manifest:
> >
> > >  >
> > >  > > android:normalScreens="true" android:largeScreens="true"
> > > android:anyDensity="true"/>
> >
> > > I was trying to implement the launcher icon by having a 72pixel icon
> > > in drawable-hdpi, 48 pixel in drawable-mdpi, 36 pixel in drawable-
> > > ldpi.
> >
> > > But then I noticed the launcher icon was all fuzzy on the Hero.
> > > Suspecting the ldpi icon had been scaled up, I deleted the drawable-
> > > ldpi folder and placed a 48 pixel icon in drawable. The problem was
> > > then fixed.
> >
> > > I read somewhere else that the Hero uses hdpi, so 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
>



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

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

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

[android-developers] Re: View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread ClarkBattle
But its in onStart() while the layout happens in onCreate().  There is
no onFinishInflate() for Activities.  How do i make sure that the
inflation has happened?

On Jan 28, 2:52 pm, Romain Guy  wrote:
> You are probably calling getLocationInWindow() before the layout happened.
>
>
>
> On Thu, Jan 28, 2010 at 2:50 PM, ClarkBattle  wrote:
> > I have an app with the following code using android 2.0.1
>
> > int[] loc = new int[2];
>
> > Button btn = (Button) findViewById( R.id.btn3 );
> > if( btn != null )
> >    btn.getLocationInWindow( loc);
>
> > Log.i("Where?","x=" + where[0] + " y=" + where[1] );
>
> > This logs "x=0 y=88" but R.id.btn3 is in the middle of the screen!
>
> > I was experiencing this in android 2.0.1 so I wrote the following test
> > app in android 2.1 that logs the XY coordinates of a button in the
> > middle of the screen.
>
> > This logs "x=0 and y=0"
>
> > public class TestLoc extends Activity
> > {
> >       �...@override
> >        public void onCreate( Bundle savedInstanceState )
> >        {
> >                super.onCreate( savedInstanceState );
> >                setContentView( R.layout.main );
> >        }
>
> >       �...@override
> >        public void onStart()
> >        {
> >                super.onStart();
>
> >                int[] where = new int[2];
> >                Button view = (Button) findViewById( R.id.btnThree );
> >                if( view != null )
> >                {
> >                    view.getLocationInWindow( where );
> >                    Log.i("Where?","x=" + where[0] + " y=" + where[1] );
> >                }
> >        }
> > }
>
> > 
> >  >    xmlns:android="http://schemas.android.com/apk/res/android";
> >    android:layout_width="wrap_content"
> >    android:layout_height="wrap_content" >
>
> >    
> >      
> >    
>
> >    
> >      
> >      
> >    
> > 
>
> > Wha's up?  Is there a reliable way to get the window coordinates of
> > any view?
>
> > Thanks for reading,
> > Clark
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor

On Thu, Jan 28, 2010 at 4:34 PM, Jason Proctor
 wrote:

 there ain't no XML parser in the
 world that will let an unclosed tag pass.


You mean aside from every web browser ever built?


ah good -- nice knee-jerk, miss-the-point, off-topic post, as usual.

see, now i'm feeding the troll. if a document declares itself as XML, 
or XHTML, but contains unclosed tags, and the parser allows it, then 
it's no XML parser. no matter what else you call it.



--
jason.vp.engineering.particle

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread ClarkBattle
Sorry, in that first example I meant;

Log.i("Where?","x=" + loc[0] + " y=" + loc[1] );

not

Log.i("Where?","x=" + where[0] + " y=" + where[1] );

Copy/paste user error :)

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


Re: [android-developers] View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread Romain Guy
You are probably calling getLocationInWindow() before the layout happened.

On Thu, Jan 28, 2010 at 2:50 PM, ClarkBattle  wrote:
> I have an app with the following code using android 2.0.1
>
> int[] loc = new int[2];
>
> Button btn = (Button) findViewById( R.id.btn3 );
> if( btn != null )
>    btn.getLocationInWindow( loc);
>
> Log.i("Where?","x=" + where[0] + " y=" + where[1] );
>
> This logs "x=0 y=88" but R.id.btn3 is in the middle of the screen!
>
> I was experiencing this in android 2.0.1 so I wrote the following test
> app in android 2.1 that logs the XY coordinates of a button in the
> middle of the screen.
>
> This logs "x=0 and y=0"
>
> public class TestLoc extends Activity
> {
>       �...@override
>        public void onCreate( Bundle savedInstanceState )
>        {
>                super.onCreate( savedInstanceState );
>                setContentView( R.layout.main );
>        }
>
>       �...@override
>        public void onStart()
>        {
>                super.onStart();
>
>                int[] where = new int[2];
>                Button view = (Button) findViewById( R.id.btnThree );
>                if( view != null )
>                {
>                    view.getLocationInWindow( where );
>                    Log.i("Where?","x=" + where[0] + " y=" + where[1] );
>                }
>        }
> }
>
> 
>     xmlns:android="http://schemas.android.com/apk/res/android";
>    android:layout_width="wrap_content"
>    android:layout_height="wrap_content" >
>
>    
>      
>    
>
>    
>      
>      
>    
> 
>
> Wha's up?  Is there a reliable way to get the window coordinates of
> any view?
>
> Thanks for reading,
> Clark
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] View.getLocationInWindow() only returns Y (and sometimes not even X)

2010-01-28 Thread ClarkBattle
I have an app with the following code using android 2.0.1

int[] loc = new int[2];

Button btn = (Button) findViewById( R.id.btn3 );
if( btn != null )
btn.getLocationInWindow( loc);

Log.i("Where?","x=" + where[0] + " y=" + where[1] );

This logs "x=0 y=88" but R.id.btn3 is in the middle of the screen!

I was experiencing this in android 2.0.1 so I wrote the following test
app in android 2.1 that logs the XY coordinates of a button in the
middle of the screen.

This logs "x=0 and y=0"

public class TestLoc extends Activity
{
@Override
public void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
setContentView( R.layout.main );
}

@Override
public void onStart()
{
super.onStart();

int[] where = new int[2];
Button view = (Button) findViewById( R.id.btnThree );
if( view != null )
{
view.getLocationInWindow( where );
Log.i("Where?","x=" + where[0] + " y=" + where[1] );
}
}
}


http://schemas.android.com/apk/res/android";
android:layout_width="wrap_content"
android:layout_height="wrap_content" >


  



  
  



Wha's up?  Is there a reliable way to get the window coordinates of
any view?

Thanks for reading,
Clark

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


[android-developers] Re: Register a new MIME-type with Android

2010-01-28 Thread schwiz
Im not entirely sure but I think you need to implement a broadcast
receiver for that mimetype

On Jan 28, 8:08 am, Varun Khaneja  wrote:
> Hi,
>
> I want to register my application for files of a certain popular and
> well-documented MIME-type.
> The problem is that Android does not seem to recognize this MIME-type.
>
> The following sample code demonstrates this:
>
> package com.example.helloandroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.util.Log;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         TextView tv = new TextView(this);
>         tv.setText("Hello, Android");
>         setContentView(tv);
>         String extn =
> android.webkit.MimeTypeMap.getFileExtensionFromUrl("/data/a.xyz");
>         String xyzMimeType =
> android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension
> (extn);
>         Log.d ("HelloAndroid", "extn: " + extn + " | xyzMimeType: " +
> xyzMimeType);
>     }
>
> }
>
> The MIME-type returned by this API is NULL although it correctly
> returns the extension (extn = "xyz").
>
> So in my main application, if I skip the  /> line in the manifest file, the application does not receive the
> intent which means it is not launched.
> And there seems to be no way to specify android:mimeType as NULL.
>
> I also tried using , but with that, I get
> an error saying "Malformed XML".
> (Read about it 
> here:http://stackoverflow.com/questions/1733195/android-intent-filter-for-...)
>
> Could someone please throw some light on this?
>
> Thanks,
> -Varun

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


Re: [android-developers] Parsing HTML

2010-01-28 Thread Greg Donald
On Thu, Jan 28, 2010 at 4:34 PM, Jason Proctor
 wrote:
> there ain't no XML parser in the
> world that will let an unclosed tag pass.

You mean aside from every web browser ever built?


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] Re: What is the difference between rooted and Developer phone?

2010-01-28 Thread schwiz
The dev phone is for making custom builds of Android not for debugging
APKs you can debug with ANY android phone.

On Jan 28, 4:40 pm, Wayne Wenthin  wrote:
> Or look at moto's stuff.  They have some sort of way you can "rent" time on
> a real phone.   Not really sure its Moto but they are the ones pushing it
> right now the hardest.
>
>
>
>
>
> On Thu, Jan 28, 2010 at 2:39 PM, Wayne Wenthin  wrote:
> > The emulator is a good friend to have.  It will save you from going
> > bankrupt trying to keep up.  Unless your app makes alot of money.
>
> > On Thu, Jan 28, 2010 at 2:27 PM, Urban ArtFX wrote:
>
> >> Please help.
>
> >> On Jan 28, 2:05 pm, Urban ArtFX  wrote:
> >> > I was just wondering. I was going to buy the DEV 2 but then i decided
> >> > to just buy the Nexus One.  I want to troubleshoot my apps but i don't
> >> > want to buy old technology.  as it is I am going to have to buy a new
> >> > phone every 6 months to keep up with technology.  Any help would be
> >> > great.
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com >>  cr...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Writing code is one of few things
> > that teaches me I don't know everything.
>
> > Join the Closed Beta of Call Girl Manager
> >http://www.fuligin.com/forums
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums

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


Re: [android-developers] Re: What is the difference between rooted and Developer phone?

2010-01-28 Thread Wayne Wenthin
Or look at moto's stuff.  They have some sort of way you can "rent" time on
a real phone.   Not really sure its Moto but they are the ones pushing it
right now the hardest.

On Thu, Jan 28, 2010 at 2:39 PM, Wayne Wenthin  wrote:

> The emulator is a good friend to have.  It will save you from going
> bankrupt trying to keep up.  Unless your app makes alot of money.
>
>
> On Thu, Jan 28, 2010 at 2:27 PM, Urban ArtFX wrote:
>
>> Please help.
>>
>> On Jan 28, 2:05 pm, Urban ArtFX  wrote:
>> > I was just wondering. I was going to buy the DEV 2 but then i decided
>> > to just buy the Nexus One.  I want to troubleshoot my apps but i don't
>> > want to buy old technology.  as it is I am going to have to buy a new
>> > phone every 6 months to keep up with technology.  Any help would be
>> > great.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Manager
> http://www.fuligin.com/forums
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

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

Re: [android-developers] Re: What is the difference between rooted and Developer phone?

2010-01-28 Thread Wayne Wenthin
The emulator is a good friend to have.  It will save you from going bankrupt
trying to keep up.  Unless your app makes alot of money.

On Thu, Jan 28, 2010 at 2:27 PM, Urban ArtFX  wrote:

> Please help.
>
> On Jan 28, 2:05 pm, Urban ArtFX  wrote:
> > I was just wondering. I was going to buy the DEV 2 but then i decided
> > to just buy the Nexus One.  I want to troubleshoot my apps but i don't
> > want to buy old technology.  as it is I am going to have to buy a new
> > phone every 6 months to keep up with technology.  Any help would be
> > great.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

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

Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor
DocumentBuilder uses an XML parser, and there ain't no XML parser in 
the world that will let an unclosed tag pass.


if you really need to parse potentially badly formed HTML, take a 
look at some of the free/shareware HTML parsers around. Google etc.


hth



I am trying to parse an HTML document that is missing an end tag on
one of the elements (input tag). Anyone know how to get the parser to
ignore that it doesn't have an end tag and just read an attribute
value?

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = dbf.newDocumentBuilder();
Document dom = builder.parse(url.openStream()); //ERROR HERE

Error:
01-28 21:34:38.384: WARN/System.err(12108):
org.xml.sax.SAXParseException: expected: /input read: div
(position:END_TAG @21:10 in java.io.inputstreamrea...@432749f8)

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



--
jason.vp.engineering.particle

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


[android-developers] Parsing HTML

2010-01-28 Thread Allison Inouye
I am trying to parse an HTML document that is missing an end tag on
one of the elements (input tag). Anyone know how to get the parser to
ignore that it doesn't have an end tag and just read an attribute
value?

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = dbf.newDocumentBuilder();
Document dom = builder.parse(url.openStream()); //ERROR HERE

Error:
01-28 21:34:38.384: WARN/System.err(12108):
org.xml.sax.SAXParseException: expected: /input read: div
(position:END_TAG @21:10 in java.io.inputstreamrea...@432749f8)

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

2010-01-28 Thread Urban ArtFX
Please help.

On Jan 28, 2:05 pm, Urban ArtFX  wrote:
> I was just wondering. I was going to buy the DEV 2 but then i decided
> to just buy the Nexus One.  I want to troubleshoot my apps but i don't
> want to buy old technology.  as it is I am going to have to buy a new
> phone every 6 months to keep up with technology.  Any help would be
> great.

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


Re: [android-developers] Re: How do I kill a blocking thread?

2010-01-28 Thread Edward Hinchliffe
oh, ignore me, just scrolled down!
Interrupt is not the solution, just closing the socket. Thanks for the link.


On 28 January 2010 22:15, Edward Hinchliffe  wrote:
> from the page you quoted:
> " More precisely, if the thread is blocked at one of the methods
> Object.wait, Thread.join, or Thread.sleep, it receives
> anInterruptedException, thus terminating the blocking method
> prematurely."
>
> I'm aware of sending an interrupt while it's asleep, but if I'm
> blocking on a bufferedreader.readLine(); it won't get interrupted.
> Is there any way around this?
>
> On 28 January 2010 21:50, theSmith  wrote:
>>
>> Send it an interrupt and handle it appropriately.
>> http://articles.techrepublic.com.com/5100-10878_11-5144546.html
>>
>> -theSmith
>>
>> On Jan 28, 3:59 pm, redders  wrote:
>> > I have a thread listening on a TCP port. When there's nothing coming
>> > in on that port, the thread blocks. This is fine, and the behaviour I
>> > want, but how do I kill said thread while it's blocking?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>

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


Re: [android-developers] Re: How do I kill a blocking thread?

2010-01-28 Thread Edward Hinchliffe
from the page you quoted:
" More precisely, if the thread is blocked at one of the methods
Object.wait, Thread.join, or Thread.sleep, it receives
anInterruptedException, thus terminating the blocking method
prematurely."

I'm aware of sending an interrupt while it's asleep, but if I'm
blocking on a bufferedreader.readLine(); it won't get interrupted.
Is there any way around this?

On 28 January 2010 21:50, theSmith  wrote:
>
> Send it an interrupt and handle it appropriately.
> http://articles.techrepublic.com.com/5100-10878_11-5144546.html
>
> -theSmith
>
> On Jan 28, 3:59 pm, redders  wrote:
> > I have a thread listening on a TCP port. When there's nothing coming
> > in on that port, the thread blocks. This is fine, and the behaviour I
> > want, but how do I kill said thread while it's blocking?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] how do you do the equivalent of hitting the "home" button in s/w

2010-01-28 Thread sdphil
subject says it all.  i want to do the equivalent of hitting the
"home" button programmatically.

tia.

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


  1   2   3   >