[android-developers] Re: How do I pass data in an intent from an activity started from the launcher?

2009-03-24 Thread Dianne Hackborn
http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String,%20int)

And all of the other overloaded methods for various types.

On Mon, Mar 23, 2009 at 10:40 PM, me tun a...@tpg.com.au wrote:


 How can I do that?  Is there a reference you can point me to?

 On Mar 24, 4:35 pm, Dianne Hackborn hack...@android.com wrote:
  Please don't make up URI schemes.  If you are passing app-private data,
 you
  should probably just put it in as extra fields of whatever type you want.
 
  On Mon, Mar 23, 2009 at 10:20 PM, me tun a...@tpg.com.au wrote:
 
   Hello,
 
   I've tried something similar to this, intent.setData(Uri.parse
   (screenmode://android.ds/ActivityType=MY_ACTIVITY));
 
   Can I just put anything, or is there a specific format I need to
   follow i.e. screenmode: something else, something else etc...
 
   Cheers guys.
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support.  All such questions should be posted on public
  forums, where I and others can see and answer them.
 



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

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

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



[android-developers] Urgent help in getting screen coordinatesof a view

2009-03-24 Thread kavitha

Hi All,

I need help in getting coordinates of a view on screen.

I tried to print the view coordinates,they print value as 0.

If i say v.getLeft()  even that print it's value  as 0.

I am not understanding.Please help on this regard.

Here is my code.I am trying to print view values in onStart()

package com.android.table;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.graphics.Rect;

public class GameDemo extends Activity {
   public static int idLayout = 1;
   public static int screenheight = 0;
   public static int screenwidth = 0;
   public AddPegHoles adp = new AddPegHoles(this);
   public Hole h;
   public static int holeid = 0;
   Hole[] holeArray = new Hole[3];
   FrameLayout l1,l2,l3,l4,;
   RelativeLayout layout;
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);
   layout=(RelativeLayout) findViewById(R.id.tableviewback);
   layout.setBackgroundResource(R.drawable.woodenbackground);

   Display display;
   display =
((WindowManager)getSystemService(WINDOW_SERVICE)).getDefaultDisplay();
   screenheight = display.getHeight();
   screenwidth = display.getWidth();

   l1=(FrameLayout)findViewById(R.id.frame1);
   adp.addPegHoles(l1, 1,0);
   createHole(holeid,true,R.id.frame1,1);
   l2=(FrameLayout)findViewById(R.id.frame2);
   adp.addPegHoles(l2, 1, leftpadding+l1.getWidth());
   holeid++;   createHole(holeid,true,R.id.frame2,1);
   l3=(FrameLayout)findViewById(R.id.frame3);
   adp.addPegHoles(l3, 1, leftpadding+l1.getWidth());
   holeid++;   createHole(holeid,true,R.id.frame3,1);


   int  leftpadding=(screenwidth/7);
   int  toppadding=(screenheight/7);

ViewGroup child=(ViewGroup)layout.getChildAt(0);//frame1
 child.setPadding(45*2, 45, 0, 0);
 child=(ViewGroup)layout.getChildAt(1); // frame2
 child.setPadding(45*3, 45, 0, 0);
 child=(ViewGroup)layout.getChildAt(2); //frame3
  child.setPadding(45*4, 45, 0, 0);

  }

  public void onStart(){
super.onStart();
int[] loc=new int[2];
 View v = layout.getChildAt(1);
 v.getLocationOnScreen(loc);
   System.out.println(loc[0]+loc[1]);
   System.out.println(v.getLeft());
System.out.println(v.getRight());


  v=(FrameLayout)findViewById(R.id.frame1);
 v.getLocationOnScreen(loc);
   System.out.println(loc[0]+loc[1]);
   System.out.println(v.getLeft());
System.out.println(v.getRight());

 }

   public void createHole(int holeid, boolean filled,
int parent_frame_id,
int parentrow) {
h = new Hole(holeid);
h.setHoleId(R.drawable.hole);
h.setHoleIndex(0);
h.setFilled(filled);
h.setParentFrameId(parent_frame_id);
h.setParentRow(parentrow);
h.setMarbleId(R.drawable.marble);
h.setMarbleIndex(1);
holeArray[holeid] = h;

}
}

And I am adding imageviews for frame in AddPegHoles.java looks like
this

package com.android.table;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;

public class AddPegHoles {

public Context context;
public static int id=0;

AddPegHoles(Context c){
super();
this.context=c;

}

public void addPegHoles(ViewGroup v,int row,int leftpadding){

ImageView iv1=new ImageView(context);
iv1.setImageResource(R.drawable.hole);
ImageView iv11=new ImageView(context);
iv11.setImageResource(R.drawable.marble);
id++; v.setId(id);
v.addView(iv1,0);v.addView(iv11,1);

}

}






And my AndroidManifest.xml looks like this
?xml version=1.0 encoding=utf-8?

RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
 android:layout_height=fill_parent
 android:layout_width=fill_parent
 android:background=#44
 android:id=@+id/tableviewback
 

 FrameLayout android:layout_height=wrap_content
android:layout_width=wrap_content android:id=@+id/frame1/
FrameLayout
 FrameLayout android:layout_height=wrap_content
android:layout_width=wrap_content android:id=@+id/frame2/
FrameLayout
 FrameLayout android:layout_height=wrap_content
android:layout_width=wrap_content 

[android-developers] Re: How to login to the root of Android Dev Phone 1?

2009-03-24 Thread havexz

THANKS ITS WOKRING..:)

BTW is there a way i can access using the UI DDMS which comes with
eclipse IDE.?

On Mar 23, 10:40 pm, Jean-Baptiste Queru j...@android.com wrote:
 Run su in your shell, and you'll be running a root shell.

 JBQ



 On Mon, Mar 23, 2009 at 7:45 PM, havexz bali.param...@gmail.com wrote:

  Also tried login to shell using adb but i am unable to browse to that
  directory.. the error is given below:
  $ ls
  ls
  sqlite_stmt_journals
  cache
  sdcard
  etc
  init
  default.prop
  logo.rle
  init.trout.rc
  data
  system
  init.goldfish.rc
  sys
  proc
  init.rc
  sbin
  root
  dev
  $ ls data
  ls data
  opendir failed, Permission denied
  $

  On Mar 23, 9:43 pm, havexz bali.param...@gmail.com wrote:
  I am unable to copy the files from the data folder of the Android Dev
  Phone 1. I used to do that on the Emulator. I need to back up the
  application data so that I can restore it.

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

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Error code

2009-03-24 Thread Eric Wong (hdmp4.com)

That's a great idea.
Probably doesn't work work for Google when all employee have free food
to start with..(right?)

Cheers
Eric

On Mar 22, 6:42 pm, Al Sutton a...@funkyandroid.com wrote:
 I used to work for a company where anyone who checked in code that broke
 the build and didn't fix it within a couple of hours had to buy a round
 of cakes or doughnuts for the dev team.

 Amazingly enough it reduced broken builds as opposed to increasing
 wastelines.

 Al.



 Jean-Baptiste Queru wrote:
  Heh.

  Jason Parks is my manager at Google, he's a member of the Core
  Technical Team for the Android Open-Source Project, and he is
  responsible for the overall performance and stability of the Android
  platform.

  He broke it because, well, that's what he does ;-)

  JBQ

  On Fri, Mar 20, 2009 at 4:40 PM, grube...@gmail.com grube...@gmail.com 
  wrote:

  Who is JPARKS and why did he break it ??

 --

 * Written an Android App? - List it athttp://andappstore.com/*

 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is Android browser supports Content-Encoding : gzip ???

2009-03-24 Thread Dilli

HI all

I am developing a application which launches automatically when the
user clicks on any link of pls / m3u in browser it works fine.

But some links the response from server is like bellow  it dos't
launches my activity

i founded that the difference is only Content-Encoding: gzip is extra
in those not working links

The android browser also dos't support these links


url : http://dir.xiph.org/by_format/MP3


HTTP/1.1 200 OK
Date: Tue, 24 Mar 2009 06:22:48 GMT
Server: Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3
X-Powered-By: PHP/5.2.3-1ubuntu6.3
Content-Disposition: inline; filename=listen.m3u
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 82
Connection: close
Content-Type: audio/x-mpegurl



How can i specify the Content-Encoding in intent filter

is Android browser supports Content-Encoding : gzip

Need help

Thank you
Dilli



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

2009-03-24 Thread Harishkumar V
Hi,

I have android running on beagle.

I have usb webcam Logitect QuickCam Express connected to beagle board.

The v4l2 driver recognizes the camera.
Using v4l-info i can query the video device.

Now, from android, if i run Camera.apk, only black and white checked screens
(as like in emulator) comes.

how to test the usb webcam using android.

Thanks and Regards,
HarishKumar.V

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



[android-developers] Returning from HTTP Intent.ACTION_VIEW

2009-03-24 Thread Chris Streeter
I have an application that needs to have a user visit a web page to
authorize it.  After spending time in the Browser the user should
return the my application.

Currently, I'm launching the Browser with:

Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url.toString()));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);

After using the browser, I can go back home and launch my application,
which stacks a new Activity on top of the previous stack of Activities
that were being used in the application. For example. If the user
launches the app, they have Activity A in the stack. From there we
navigate to Activity B which then launches the Browser. Then, the next
time we enter the app, we launch Activity A, which is pushed onto the
stack that already contains an A and B.

My question is then, how can I just go back to the previous stack?
Basically, do I have to create a new Activity? Is there a better way
to launch the Browser, and then come back to my application?

Also, I've been using the Intent.FLAG_ACTIVITY_NEW_TASK when I start
the Browser activity so that my app stays running. Is this a good way
to go about solving this problem?

Thanks in advance, any help is greatly appreciated,

- Chris

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

2009-03-24 Thread guishenl...@gmail.com

Hi all,
I'm working at an application about network and faced some
problem.I did a client which will send some data to the server.But, if
the server is not open, my client will in trouble. Here is the code
and exact state:
try{
Socket netSocket = new Socket(10.0.2.2, 9001);  /
*Problem is in this line*/
/*
At this line, when I try to create a socket binding to the local PC,
the program will pause for very long time(almost 5 mins) and then go
to IOExcption handling code where shows The operation timed
out..When the server in my local PC is running, everything is OK.I
need the program can response immediately, can anyone help me?
*/
..
 }
catch (UnknownHostException e)
{
Log.d(SoControl, UnknownHostException :  +
e.getLocalizedMessage());
}
catch (IOException e)
{
Log.d(SoControl, IOException :  +
e.getLocalizedMessage());
}

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

2009-03-24 Thread Anton

Thomas, I just tested this using the glGetIntegerv method that
takes an int array instead of a Buffer.  It also returned 0 for me.
So I dug into the source and found that the implementation of
glGetIntegerv doesn't have a case for GL_MATRIX_MODE.  And it sets the
GL error to GL_INVALID_ENUM (1280).  And sure enough, 1280 is returned
by a call to glGetError right after the call to glGetIntegerv.  So it
looks like you can't get the GL_MATRIX_MODE that way on Android.

And upon further looking through the code I don't see anywhere
that the matrixMode state variable is accessed.  So I doubt that
you'll have any luck getting it from the java API.

If you control all of your OpenGL code you can work around this by
using a wrapper to change GL state.  It's not ideal, but it should
work.  That wrapper class could then be queried for the current matrix
mode.

-Anton

On Mar 23, 7:39 am, tcassany tcass...@betomorrow.com wrote:
 Hello,

 I just would to know how can I get the currentmatrixmode. I try whit
 this :

 ByteBuffer buffer = ByteBuffer.allocate(4);
 buffer.order(ByteOrder.nativeOrder());
 IntBuffer matrixMode = buffer.asIntBuffer();
 gl.glGetIntegerv(GL11.GL_MATRIX_MODE, matrixMode);

 ..

 gl.glMatrixMode(matrixMode.get(0))

 But it's alway return 0 instead of GL_MODELVIEW(5888) in my case.

 Thanks,

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

2009-03-24 Thread dillirao malipeddi
int SOCKET_TIMEOUT = 1; //10 sec
InetSocketAddress myAddRess = new InetSocketAddress(url_connect,port );
//InetSocketAddress(InetAddress address, int port)
   try
{
//1. creating a socket to connect to the server
   Log.i(connecting to :+url_connect+], at port [+port+]);
 //requestSocket.setSoTimeout(SOCKET_TIMEOUT); //set time out for this
scoket
//if(myDebug.debug_Log)Log.i(SetSocketTimeOut,---WHILE CONNECTING SET
TO 10 sec);
requestSocket = new Socket();//(url_connect, port);
   try
  {
  Log.i(Try,To connect in 10 sec);
  requestSocket.connect(myAddRess, SOCKET_TIMEOUT);
}
catch (SocketTimeoutException SE)
{
 Log.i(SocketTimeoutException,---+SE.toString());
 requestSocket.close();
 requestSocket = null;
}

   }
catch(Exception e)
{
Log.i(Exception,--is+e.tostring());
}


This will try to connect with in 10 sec if not connected the timeout
exception will raise



On Tue, Mar 24, 2009 at 12:55 PM, guishenl...@gmail.com 
guishenl...@gmail.com wrote:


 Hi all,
I'm working at an application about network and faced some
 problem.I did a client which will send some data to the server.But, if
 the server is not open, my client will in trouble. Here is the code
 and exact state:
 try{
Socket netSocket = new Socket(10.0.2.2, 9001);  /
 *Problem is in this line*/
 /*
 At this line, when I try to create a socket binding to the local PC,
 the program will pause for very long time(almost 5 mins) and then go
 to IOExcption handling code where shows The operation timed
 out..When the server in my local PC is running, everything is OK.I
 need the program can response immediately, can anyone help me?
 */
..
 }
catch (UnknownHostException e)
{
Log.d(SoControl, UnknownHostException :  +
e.getLocalizedMessage());
}
catch (IOException e)
{
Log.d(SoControl, IOException :  +
 e.getLocalizedMessage());
}

 



-- 
Dilli Rao. M

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread tauntz

I just hope that this time the release date for the official SDK will
be BEFORE the update hits the masses. Not like it was with the 1.1SDK
- it was released way after 1.1 was released to end-users (the
argument from Google was something in the lines of Hey, this is a
small release with no mayor changes so don't whine that you get it so
late). Maybe I'm the only one who thinks that this is ridiculous..
One of the reasons why we don't have the official 1.5 (or cupcake or
however it will be officially called) SDK is that It's not stable
enough - fair enough but I really hope that you guys @ Google will
release it as soon as the code is stable enough (eg the code is tested
and ready to be released to the operators). That would give us a week
(maybe more) before the operators push it to the end-users.

And don't come with the you can build your own SDK from the
opensource tree if you want - the last releases didn't come from the
opensource tree so even if I wanted, i couldn't build the SDK based on
the code that's shipped to the end-users. And even if this release
will actually come from the public tree, you can't expect all app
developers to build their own SDK, can you? We need an official SDK -
and we need it as soon as the tree is stable enough (and way before
it's pushed to the carriers/end-users)


Tauno


On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com wrote:

 Not if you stay anonymous (hint, hint) ;-)

 On Mar 23, 7:58 pm, Anonymous Anonymous firewallbr...@googlemail.com
 wrote:
  Someone from Google?  makes it official i guess :D

 On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com wrote:

  Can someone capable just compile the SDK and post it online for
  everyone? Someone from Google? I dont really care if it's not
  official, i just dont want to download the source tree just to build
  the SDK, plus i need to do the tricks you mentioned to make it work on
  windows.

  On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
   I certainly hope there aren't a lot of applications that use
   reflection and private APIs.

   On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel zl25dre...@gmail.com
  wrote:

Cupcake is coming, and as you know it will break a lot of apps in the
market, those that use reflection  private api. So where is the
Cupcake SDK/emulator for us to try our apps?

I know we can download the source codes and build it, and I know apps
wont break if they dont use undocumented api, blah blah blah, but we
should get an official SDK/emulator for cupcake, dont you think,
google?
 


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



[android-developers] Re: how to color key 2d sprite backgound?

2009-03-24 Thread Tazzer

A very interesting idea :) although I have my doubts that drawing with
AvoidXfermode is not slower then drawing with alpha. Especially when
drawing the complete background in this mode. If I have the time I
certainly would like to try it. I now have the alpha issue working
using the solution above.

Cheers


On Mar 23, 3:35 am, Sarnoth jesse.st...@gmail.com wrote:
 I have been frustrated by the lack of support for sprites, but I came
 up with an idea that is backwards (literally) but might work. I
 haven't tested it to make sure it works as expected or to evaluate its
 speed. If you try it yourself I would be interested in the results.

 Use the same key color for all of your sprites. To draw a frame, clear
 the canvas to the key color. Then draw each sprite starting with the
 front most and ending with the back most, and finally draw the
 background image. When drawing use AvoidXfermode with opColor set to
 your key color, tolerance set to 0, and mode set to TARGET. Drawing
 bitmaps of format 565 (no alpha channel) is by far the fastest way to
 draw, so hopefully drawing color keyed bitmaps of this type will
 produce nice results.

 On Mar 19, 2:23 am, Tazzer arjenvanha...@gmail.com wrote:

  Hi,

  I am working on a 2d library for creating  a game including sprite
  collisions, sorting and animation converting (.spr to Java classes/
  bmp's).

  At first I used png's with the background color being transparant (24
  bits png image) but I want to use 256 color bitmaps with the
  background color being transparant.

  Is this possible to do color keying in android? I looked at several
  other threads about this topic but the all ended without a solution.

  Also I am now using the canvas.drawBitmap to render my sprites, but
  will using opengl be faster?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 on creating Socket

2009-03-24 Thread guishenl...@gmail.com

Thanks for your help, Dillirao!
I have made it work!
Here is my final code which can response within 10 seconds:
try{
 Socket netSocket = null;
 SOCKET_TIMEOUT = 1;
 InetSocketAddress myAddress = new InetSocketAddress(10.0.2.2,
9001 );
 netSocket = new Socket();
 netSocket.connect(myAddress, SOCKET_TIMEOUT);
..
 }
catch (UnknownHostException e)
{
Log.d(SoControl, UnknownHostException : 
+
e.getLocalizedMessage());
}
catch (IOException e)
{
Log.d(SoControl, IOException :  +
e.getLocalizedMessage());
}







On Mar 24, 3:42 pm, dillirao malipeddi dillir...@arijasoft.com
wrote:
 int SOCKET_TIMEOUT = 1; //10 sec
 InetSocketAddress myAddRess = new InetSocketAddress(url_connect,port );
 //InetSocketAddress(InetAddress address, int port)
    try
     {
 //1. creating a socket to connect to the server
        Log.i(connecting to :+url_connect+], at port [+port+]);
      //requestSocket.setSoTimeout(SOCKET_TIMEOUT); //set time out for this
 scoket
     //if(myDebug.debug_Log)Log.i(SetSocketTimeOut,---WHILE CONNECTING SET
 TO 10 sec);
     requestSocket = new Socket();//(url_connect, port);
    try
   {
   Log.i(Try,To connect in 10 sec);
   requestSocket.connect(myAddRess, SOCKET_TIMEOUT);}

 catch (SocketTimeoutException SE)
 {
  Log.i(SocketTimeoutException,---+SE.toString());
  requestSocket.close();
  requestSocket = null;

 }

    }
 catch(Exception e)
 {
     Log.i(Exception,--is+e.tostring());

 }

 This will try to connect with in 10 sec if not connected the timeout
 exception will raise

 On Tue, Mar 24, 2009 at 12:55 PM, guishenl...@gmail.com 





 guishenl...@gmail.com wrote:

  Hi all,
     I'm working at an application about network and faced some
  problem.I did a client which will send some data to the server.But, if
  the server is not open, my client will in trouble. Here is the code
  and exact state:
  try{
             Socket netSocket = new Socket(10.0.2.2, 9001);      /
  *Problem is in this line*/
  /*
  At this line, when I try to create a socket binding to the local PC,
  the program will pause for very long time(almost 5 mins) and then go
  to IOExcption handling code where shows The operation timed
  out..When the server in my local PC is running, everything is OK.I
  need the program can response immediately, can anyone help me?
  */
                                 ..
                                  }
                 catch (UnknownHostException e)
                 {
                         Log.d(SoControl, UnknownHostException :  +
         e.getLocalizedMessage());
                 }
                 catch (IOException e)
                 {
                         Log.d(SoControl, IOException :  +
  e.getLocalizedMessage());
                 }

 --
 Dilli Rao. M- Hide quoted text -

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



[android-developers] Re: ListActivity.onListItemClick() only responds to trackball/dpad clicks

2009-03-24 Thread matthias

Hi,

On Mar 23, 7:52 pm, droozen droozenr...@gmail.com wrote:
 Have you tried following the Notepad tutorial and this line in your
 onCreate method?

         registerForContextMenu(getListView());


Why would I want to do that, I do not need a context menu. Maybe I
didn't make myself clear enough about the problems I run into. It's
really simple actually: I have a ListActivity, and in the list that is
hosted by this activity I render list items using a custom
RelativeLayout. Nothing fancy at all.

Now, of course I want those items to be selectable and clickable by
the user. And that doesn't work. The user has to scroll to an item
first using the dpad/trackball to focus it, and only then is able to
click it. I want the item to be directly pressable, however, using a
touch motion. But that event never reaches the list view, and thus
onListItemClick() is not called. It seems that for some reason, my
list items consume all touch gestures before they are able to
propagate up to the view and be able to be interpreted as a click. But
that's just a wild guess. I have absolutely no idea how this is even
possible, especially since it works in other ListActivities I use.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how can i pick audio in startActivityForResult

2009-03-24 Thread zeeshan

Hi Experts,

i need to select audio from my playlist


which intent can help me?



On Mar 23, 5:37 pm, zeeshan genx...@gmail.com wrote:
 Hi Experts,

 i need to select audio from my playlist

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



[android-developers] Re: ListActivity.onListItemClick() only responds to trackball/dpad clicks

2009-03-24 Thread matthias

I found the problem:

Removing the call to textView.setMovementMethod
(LinkMovementMethod.getInstance()); in a TextView I use in the list
item layout fixed the problem.

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



[android-developers] Re: Multiple ListViews in one Activity

2009-03-24 Thread Wouter

Hey,

Thank you for your answers!
Indeed I am using a ListActivty..
The problem was I couldn't click on my listviews when i made several
listviews..

But I made onclicklisteners for every listview and now it is working!

THX

On Mar 23, 7:56 pm, Romain Guy romain...@google.com wrote:
  And it's a bit off topic, but yes, a ListView handles scrolling, which
  is messed up when in a ScrollView, but I really would have liked my
  list to be at the bottom of an interface that happened to scroll off
  the screen, just like this scrollable text box I'm typing in is at the
  bottom of a web page, which also happens to be scrollable. It seems
  ridiculous to me that that can't be done. But that is my side rant
  that belongs in another discussion, I guess.

 ListView was not meant for that. Just don't use a ListView.





  On Mar 23, 12:54 pm, Romain Guy romain...@google.com wrote:
   Short Answer: I don't think you can

  Yes you can.

   ListActivity hosts a ListView object that can be bound to different
   data sources. -- Note the singular a, as in one

  That's with a *ListActivity*. You can use a regular Activity instead.
  And actually even with a ListActivity you can use several ListViews.

   I've had my own problems with ListViews and ListActivitys, as well,
   including not being able to put a ScrollView around it and still have
   the ListView scroll. Instead, the ListView now permanently has to take
   up a chunk of the screen real estate, and everything else has to be
   wrapped in a ScrollView on another section of the screen. Oh well.

  A ListView already handles scrolling, do not put it in a ScrollView.
  And it has nothing to do with ListActivity.

   On Mar 23, 6:44 am, Wouter wouterg...@gmail.com wrote:
   Hey,

   I want to have multiple listviews in my activity. Every listview will
   have a different adapter and every item in the listview must be
   clickable (other actions for every listview).

   So my problem now is that I can't create multiple clickable
   listviews.
   I have one listview like this ListView android:id=@android:id/
   list..
   and the other listview looks like this ListView android:id=@+id/
   flightList

   The first listview looks like this in my activity
   hotelList = (ListView)findViewById(android.R.id.list);

   the second:
    listView = (ListView) findViewById(R.id.flightList);

   I can click on the first list and it does what it has to do, but i
   cant do anything with the second list..
   probably because it hasn't the android:id/list declaration :(

   does someone knows how I can solve this problem or other suggestions
   how I can get multiple lists in 1 activity!

   Thank you,

   Wouter

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

 --
 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] android:ellipsize for multi-line text?

2009-03-24 Thread Matthias

Hi,

I noticed that android:ellipsize will always ellipsize a single line
as soon as it doesn't fit the width of a TextView. That makes no sense
however for multi-line TextViews, since you will then get something
like this:

some very long tex...
this line fits.
this one does not f...

you get the idea. What I want instead is this:

some very long
text. this line fits.
this one does not f...

the ellipsis should always be at the end of the *text*, not at the end
of the current line.

Is this possible with Android or do I have to write something myself
(which I am not particularly eager to do to be honest)?

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



[android-developers] Bundles and serializable objects - what is actually stored?

2009-03-24 Thread Matthias

Hi,

I was wondering about the behavior of Bundles and serializable
objects. If I put a serializable object into a bundle, what is
serialized then, the reference to the object or the object itself?

I always assumed that the object itself would be serialized to a byte
stream when calling putExtra() and re-created from that representation
when calling getSerializableExtra(), but I recently stumbled upon a
piece of code that put an entire view into a Bundle in thread A,
retrieved it from that bundle in thread B, performed a modification on
it and this modification actually became visible. This can only happen
if the reference to that view was stored, not the view itself, right?
Otherwise, the modification had been applied to a copy of that view
and would be meaningless.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Multiple ListViews in one Activity

2009-03-24 Thread Wouter

I have one more question!
I now have different Listviews and I have different contextmenu's for
these listviews because they need different actions.
But i want to do this for the options menu to. Can i create a
different options menu listener for every listview?

Wouter

On Mar 24, 10:17 am, Wouter wouterg...@gmail.com wrote:
 Hey,

 Thank you for your answers!
 Indeed I am using a ListActivty..
 The problem was I couldn't click on my listviews when i made several
 listviews..

 But I made onclicklisteners for every listview and now it is working!

 THX

 On Mar 23, 7:56 pm, Romain Guy romain...@google.com wrote:

   And it's a bit off topic, but yes, a ListView handles scrolling, which
   is messed up when in a ScrollView, but I really would have liked my
   list to be at the bottom of an interface that happened to scroll off
   the screen, just like this scrollable text box I'm typing in is at the
   bottom of a web page, which also happens to be scrollable. It seems
   ridiculous to me that that can't be done. But that is my side rant
   that belongs in another discussion, I guess.

  ListView was not meant for that. Just don't use a ListView.

   On Mar 23, 12:54 pm, Romain Guy romain...@google.com wrote:
Short Answer: I don't think you can

   Yes you can.

ListActivity hosts a ListView object that can be bound to different
data sources. -- Note the singular a, as in one

   That's with a *ListActivity*. You can use a regular Activity instead.
   And actually even with a ListActivity you can use several ListViews.

I've had my own problems with ListViews and ListActivitys, as well,
including not being able to put a ScrollView around it and still have
the ListView scroll. Instead, the ListView now permanently has to take
up a chunk of the screen real estate, and everything else has to be
wrapped in a ScrollView on another section of the screen. Oh well.

   A ListView already handles scrolling, do not put it in a ScrollView.
   And it has nothing to do with ListActivity.

On Mar 23, 6:44 am, Wouter wouterg...@gmail.com wrote:
Hey,

I want to have multiple listviews in my activity. Every listview will
have a different adapter and every item in the listview must be
clickable (other actions for every listview).

So my problem now is that I can't create multiple clickable
listviews.
I have one listview like this ListView android:id=@android:id/
list..
and the other listview looks like this ListView android:id=@+id/
flightList

The first listview looks like this in my activity
hotelList = (ListView)findViewById(android.R.id.list);

the second:
 listView = (ListView) findViewById(R.id.flightList);

I can click on the first list and it does what it has to do, but i
cant do anything with the second list..
probably because it hasn't the android:id/list declaration :(

does someone knows how I can solve this problem or other suggestions
how I can get multiple lists in 1 activity!

Thank you,

Wouter

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

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

  Note: please don't send private questions to me, as I don't have time
  to provide private support.  All such questions should be posted on
  public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can an app own two langues (English and German)

2009-03-24 Thread jokamax


https://groups.google.com/group/android-developers/web/localizing-android-apps-draft

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



[android-developers] When is the Android Market available in the EU?

2009-03-24 Thread sdz

Hi,

do you know when Merchants are able to sell their applications via the
market from germany or other EU-Countries?

I've heard that it will be announced till 30.03. Is this correct? Do
you have any other information about it?

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



[android-developers] Re: Is Android browser supports Content-Encoding : gzip ???

2009-03-24 Thread sdz

AFAIK you can't access gzip via Android OS, because your webserver
delivers a Content audio/x-mpegurl.

On 24 Mrz., 07:51, Dilli dilliraomca...@gmail.com wrote:
 HI all

 I am developing a application which launches automatically when the
 user clicks on any link of pls / m3u in browser it works fine.

 But some links the response from server is like bellow  it dos't
 launches my activity

 i founded that the difference is only Content-Encoding: gzip is extra
 in those not working links

 The android browser also dos't support these links

 url :http://dir.xiph.org/by_format/MP3

 HTTP/1.1 200 OK
 Date: Tue, 24 Mar 2009 06:22:48 GMT
 Server: Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3
 X-Powered-By: PHP/5.2.3-1ubuntu6.3
 Content-Disposition: inline; filename=listen.m3u
 Content-Encoding: gzip
 Vary: Accept-Encoding
 Content-Length: 82
 Connection: close
 Content-Type: audio/x-mpegurl

 How can i specify the Content-Encoding in intent filter

 is Android browser supports Content-Encoding : gzip

 Need help

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

2009-03-24 Thread Nithin

Thanks Romain for that input, actually i tried some weird things...
anyway thanks for the information..

Nithin


On Mar 19, 8:26 pm, Romain Guy romain...@google.com wrote:
 Note that the hardware also won't let you do more than 60 frames per
 second, so any duration lower than 15ms is useless.



 On Thu, Mar 19, 2009 at 8:26 AM, Romain Guy romain...@google.com wrote:
  It's normal, 15ms is the resolution of the clock on the G1. It's the
  same kind of resolution you can expect on desktop machines.

  On Thu, Mar 19, 2009 at 2:05 AM, Nithin nithin.war...@gmail.com wrote:

  Hi,

  In Frame Animation, in item tag, when i am putting
  android:duration=5, its not working. 15ms is the minimum which i
  tried and working. Is it a bug in Android ?. Anybody else got the same
  kind of problem.

  Thanks
  Nithin

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

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

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: When is the Android Market available in the EU?

2009-03-24 Thread bouvetloz...@gmail.com

http://tinyurl.com/dnh8j4
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When is the Android Market available in the EU?

2009-03-24 Thread sdz

So will I be able to sell applications at 1.04.09 in germany?

On 24 Mrz., 12:21, bouvetloz...@gmail.com bouvetloz...@gmail.com
wrote:
 http://tinyurl.com/dnh8j4
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Mark Murphy

tauntz wrote:
 We need an official SDK -
 and we need it as soon as the tree is stable enough (and way before
 it's pushed to the carriers/end-users)

Please understand that Android is open source. There is no pushed to
the carriers/end users -- hardware manufacturers are welcome to pull
from the tree whenever they see fit.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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: Multiple ListViews in one Activity

2009-03-24 Thread Mark Murphy

Wouter wrote:
 I now have different Listviews and I have different contextmenu's for
 these listviews because they need different actions.
 But i want to do this for the options menu to. 

The options menu is for the activity. Context menus are for the widget.

 Can i create a
 different options menu listener for every listview?

No.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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] How can i check the mode of orientation?

2009-03-24 Thread Suman

Hi all...


 Thanks for replies. Can any one tell me by which
method i can check the screen orientation? I mean i want to check
whether it is land-scap mode or portrait mode. Thanks in advance.

 
Suman.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When is the Android Market available in the EU?

2009-03-24 Thread bouvetloz...@gmail.com

Very unlikely. This is the latest official roadmap promised 3 months
ago, but I'm totally sceptic.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Get scroll position in a list activity

2009-03-24 Thread Mark Murphy

Ivan Soto wrote:
 Do you have any article/tutorial about the placeholder images to share?
 I'm trying to find one with no luck.

I have used the technique, but not in code I'm allowed to share. I do
need to more formally write this up at some point, but I do not have
anything immediately handy.

The gist of it is that you create your adapter and set it up, in
getView() or newView()/bindView() (depending on adapter choice), to see
if the thumbnail has been downloaded. If so, use it for the list row
being inflated/updated; if not, leave the ImageView in the row pointing
to some placeholder Drawable resource. This means as the user scrolls,
she will pick up the thumbnails. Also, at the end, you can quickly
iterate over the rows (ListView is a ViewGroup, IIRC, so there are
methods to iterate its children) and ensure each of those rows'
ImageViews are using their associated thumbnails.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread tauntz

Did you just say that Google is not pushing code/releases to tmo and
that tmo pulls the public source at random points in time, adds dream
specific bits and releases it to end-users? You do realize that all
releases till today have come from a closed source project and not
AOSP?


(Even if Google doesn't actually push the code/release to tmo, they
certainly do tell tmo (and other carriers) when the code in the repo
is stable enough so they can pull and release. What I'm asking for,
is that at this point in time (eg Google has designated the code as
stable enough to release) we get an official SDK - is that too much
to ask?)

Tauno

On Tue, Mar 24, 2009 at 1:47 PM, Mark Murphy mmur...@commonsware.com wrote:

 tauntz wrote:
 We need an official SDK -
 and we need it as soon as the tree is stable enough (and way before
 it's pushed to the carriers/end-users)

 Please understand that Android is open source. There is no pushed to
 the carriers/end users -- hardware manufacturers are welcome to pull
 from the tree whenever they see fit.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Mark Murphy

tauntz wrote:
 Did you just say that Google is not pushing code/releases to tmo

Of course Google doesn't push code/releases to T-Mobile. T-Mobile is a
mobile carrier.

 and
 that tmo pulls the public source at random points in time, adds dream
 specific bits and releases it to end-users?

HTC pulls source at whatever time schedule they deem appropriate. HTC
engineers are working on the code constantly and can make their own
decisions vis a vis their product lines. Neither you nor I, nor possibly
Google, is in position to tell HTC what they can or cannot do.

Now, if HTC is sensible, they will primarily stick to major releases
plus milestone bug fix updates, but that's not something you should be
relying upon.

 You do realize that all
 releases till today have come from a closed source project and not
 AOSP?

HTC may have access to a private *repository*, but AFAIK, the bits are
still open source. Open source is a matter of licensing, not a statement
of public collaborative development.

 (Even if Google doesn't actually push the code/release to tmo, they
 certainly do tell tmo (and other carriers) when the code in the repo
 is stable enough so they can pull and release.

I certainly would hope so.

 What I'm asking for,
 is that at this point in time (eg Google has designated the code as
 stable enough to release) we get an official SDK - is that too much
 to ask?)

Of course it is. A point in time is infinitesimally short.

Assuming you were being loose with your terms, how long would you
consider a point in time to be? A second? A minute? An hour? A day? A
week? A month? A year?

Let us suppose that they tag whatever repository HTC works from for each
major release. Once they tag the firmware release -- in effect,
designating the code as stable enough to release -- they still need to
build, test, fix, package, and release the SDK. That will take some
time, even if they have been doing some of that work along the way,
because up until now, the firmware has been a moving target, and the
apps that ship with the firmware are not built on the SDK. For example,
they may not test on Windows routinely due to the hassles involved in
building the Windows version of the SDK.

Should that take months? No. Might it take weeks? Possibly, depending on
what is all involved and how many people are doing the work.

Now, the *right* answer is for this to be a true public collaborative
development project, so nightly builds of emulator images and
corresponding SDKs are available, so we can apply tinderbox and smoke
testing sessions and the like. In time, we should be able to cut the
time between tagging the final shipping firmware and releasing the
corresponding SDK with emulator images to be hours, not weeks. And
perhaps it's at that level already, and I just haven't seen it since we
haven't had all that many releases yet.

But this still does not prevent hardware manufacturers from doing what
they want. As evidenced by pre-N wireless routers, hardware
manufacturers are not necessarily constrained by what would seem to be
common sense to us out here. They'll do what they do.

So if a device (e.g., G2) contains bits of cupcake in advance of an
official cupcake-based release shipping, that was the manufacturer's
decision.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] HttpUrlConnection - Authentication

2009-03-24 Thread nEx.Software

I am beating my head against a wall trying to figure out why I cannot
get Authenticated on my server whilst using HttpUrlConnection. I need
to post a file in a post method and it seems I cannot do so with the
DefaultHttpClient and a regular HttpPost (unless I am completely
missing something?). I can get DefaultHttpClient to authenticate just
fine using setCredentials() but the same doesn't exist for
HttpUrlConnection so I try to set through setRequestProperty:
conn.setRequestProperty(Authorization, Basic  +
Base64EncodedUserNamePassword); to no avail. Can anyone offer some
insight? Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PendingIntent problem

2009-03-24 Thread info+farm

Hello Mr. Murphy,

I searched for it before sending my post and looked at

http://groups.google.com/group/android-developers/browse_thread/thread/6c0d72904ab4234e/9cc2ad4d8795e9a6?lnk=gstq=PendingIntent#9cc2ad4d8795e9a6
and
http://groups.google.com/group/android-developers/browse_thread/thread/547048aa824e9e46/1bc5784756209062?lnk=gstq=PendingIntent#1bc5784756209062

But both of them could not find the answer to the problem.

I am afraid PendingIntent has different Intent initialization(start
()), from the normal startActivity().

I am a little bit confused,

Regards,
info+farm

On Mar 23, 11:32 pm, Mark Murphy mmur...@commonsware.com wrote:
 info+farm wrote:
  Am I the only one who is having this problem?
  Actually, I am going to find a workaround for this problem, but I
  would like to know what I am doing wrong.

 I do not remember the answer, but I do know this was discussed on this
 list within the past few months. Search the list forPendingIntentand
 you will probably find it.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: HttpUrlConnection - Authentication

2009-03-24 Thread Mark Murphy

nEx.Software wrote:
 I am beating my head against a wall trying to figure out why I cannot
 get Authenticated on my server whilst using HttpUrlConnection. I need
 to post a file in a post method and it seems I cannot do so with the
 DefaultHttpClient and a regular HttpPost (unless I am completely
 missing something?). I can get DefaultHttpClient to authenticate just
 fine using setCredentials() but the same doesn't exist for
 HttpUrlConnection so I try to set through setRequestProperty:
 conn.setRequestProperty(Authorization, Basic  +
 Base64EncodedUserNamePassword); to no avail. Can anyone offer some
 insight? Thanks in advance.

I don't have a direct answer, but JTwitter uses HttpUrlConnection, uses
the same general technique you're describing, and it works on Android.
Take a peek at their code and perhaps you'll see something that helps.

http://www.winterwell.com/software/jtwitter.php

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Disconnect
On Tue, Mar 24, 2009 at 8:58 AM, Mark Murphy mmur...@commonsware.comwrote:


 tauntz wrote:
  Did you just say that Google is not pushing code/releases to tmo

 Of course Google doesn't push code/releases to T-Mobile. T-Mobile is a
 mobile carrier.

  and
  that tmo pulls the public source at random points in time, adds dream
  specific bits and releases it to end-users?

 HTC pulls source at whatever time schedule they deem appropriate. HTC
 engineers are working on the code constantly and can make their own
 decisions vis a vis their product lines. Neither you nor I, nor possibly
 Google, is in position to tell HTC what they can or cannot do.


HTC provides the radio images to google engineers. Beyond that, 90+% of the
work is done by google. (And before everyone starts jumping up and down
claiming android isn't google, take a look at the paychecks... they're
signed by google.)



 Now, if HTC is sensible, they will primarily stick to major releases
 plus milestone bug fix updates, but that's not something you should be
 relying upon.


That would be those things everyone is asking about. When is the milestone
and major release for Android? After someone has already shipped a closed
source version off the secret tree? All the its not us crap breaks down
when you accept that the changes that become 1.1 (and 1.5 and beyond) go
into the open tree AFTER they go to the closed trees, and in many cases
after they go to an actual released product...


  You do realize that all
  releases till today have come from a closed source project and not
  AOSP?

 HTC may have access to a private *repository*, but AFAIK, the bits are
 still open source. Open source is a matter of licensing, not a statement
 of public collaborative development.


Its not accessible to anyone else, thereby making it closed. Thats the
beauty of apache, you can have it both ways if you wish hard enough and wave
enough marketing material around.

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



[android-developers] ClassLoader.isAncestorOf(ClassLoader) Bug

2009-03-24 Thread Daniel Janev

Hello All,

Please someone from Google to comment this issue!

My colleagues has found a bug in the java.lang.ClassLoader
implementation of the cupcake tag of the Android platform. Here is a
short descriptions:

We try to invoke ClassLoader.getSystemClassLoader() in one of our OSGi
implementation classes and afterwards we have endless loop. Here are the
bodies of the methods:

public static ClassLoader getSystemClassLoader() {
  SecurityManager smgr = System.getSecurityManager();

  if (smgr != null) {
ClassLoader caller = VMStack.getCallingClassLoader();
if (caller != null  !caller.isAncestorOf(SystemClassLoader.loader)) {
  smgr.checkPermission(new RuntimePermission(getClassLoader));
}
  }
  return SystemClassLoader.loader;
}
...
and in isAncestorOf method we have:

final boolean isAncestorOf(ClassLoader child) {
  for (ClassLoader current = child; current != null; current =
child.parent) {
if (current == this) {
  return true;
}
  }
  return false;
}

In a dynamic environment like an OSGi implementation with set security
manager the isAncestorOf(...) follows to an endless loop. As you can see
- if the child is a custom class loader, which has another class loader
as a parent. The problem is that current is always is set to
child.parent but the child is never changed. The following code fixes
the problem:

final boolean isAncestorOf(ClassLoader child) {
  for (ClassLoader current = child; current != null; current =
current.parent) {
if (current == this) {
  return true;
}
  }
  return false;
}

I hope that you will be able to fix this as soon as possible and to
update the cupcake branch too. Please notify me when this is ready.

Thanks in advance!!

-- 

Best Regards,
Daniel
---
Daniel Janev · Department Manager/Core Platform and Smart Home
ProSyst Software GmbH
1606 Sofia, Bulgaria · Vladajska Str. 48
Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17
Mobile Phone +359 (0)888 678 670
http://www.prosyst.com · d.ja...@prosyst.com
---
stay in touch with your product.
---

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Building user interfaces at runtime with layouts from server

2009-03-24 Thread Daniel

Thanks for your response. My use case is as follows:
We have a server application which allows to be extended by plugins.
Each plugin contributes a view and some logic. Until now, the only
client we support is a web client. Every plugin contributes a jsf
based xhtml page plus some java beans.
What we want to do now is to support a native android client. A part
of its user interface should be fixed, another part should be provided
by the mentioned plugins. By adding a new plugin on the server, the
user should be able use the new functionality immediately.  To make
that working, a plugin needs to provide a kind of an android user
interface description. And of course, the android client needs to be
able to render this user interface description, register generic
listeners on the given ui and handle events appropriately (by sending
a response to a web service for instance).

The point is now: Android already has this user interface description
(layout.xml) and the code which inflates such a description (in
preprocessed form) to a user interface. It would be awesome to reuse
this code!

Thanks. Daniel


On Mar 23, 6:25 pm, droozen droozenr...@gmail.com wrote:
 We might have to know why you want to build this way. There could be
 other possibilities, including using a much simpler xml that you could
 parse yourself and add UI elements programmatically. Or have a variety
 of layouts available that you could set, depending on a value you've
 downloaded, though I get the feeling you want something more dynamic
 than that.

 On Mar 23, 2:10 am,Danieldaniel.kro...@gmail.com wrote:

  Hi all,

  Q: What is the recommended way to build user interfaces on the device
  based on layouts provided by a server at runtime?

  I am aware of this:
  snip source=http://developer.android.com/reference/android/view/
  LayoutInflater.html
  For performance reasons, view inflation relies heavily on pre-
  processing of XML files that is done at build time. Therefore, it is
  not currently possible to use LayoutInflater with an XmlPullParser
  over a plain XML file at runtime; it only works with an XmlPullParser
  returned from a compiled resource (R.something file.)
  /snip

  I could imagine these possibilities:
  - Parse XML by myself and build the ui tree. (Seems inappropriate to
  me since there is already maintained code which is able to do this.)

  - Transform XML on server to a simpler format which is cheaper to
  parse on the device. (Inappropriate  as above.)

  - Preprocess the XML layout on the server the same way the build does.
  Transmit it to the client, and then try to load it. But how?
  android.content.res.XMLBlock is hidden (@hide) and I don't know how
  to
  classify the stuff in package com.android.layoutlib.bridge.

  Any help would be appreciated.
 Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: ClassLoader.isAncestorOf(ClassLoader) Bug

2009-03-24 Thread Mark Murphy

Daniel Janev wrote:
 My colleagues has found a bug in the java.lang.ClassLoader
 implementation of the cupcake tag of the Android platform.

Did you file this on http://b.android.com? That is the issue tracker for
Android. I do not see your issue out there, so I strongly encourage you
to file it there.

 I hope that you will be able to fix this as soon as possible and to
 update the cupcake branch too. Please notify me when this is ready.

If you would take the time to file this on http://b.android.com, you
will automatically be notified of progress on the issue.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: Three Android Books, Plus Updates, $35/Year

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

2009-03-24 Thread nEx.Software

Thanks for the lead Mark. I really appreciate it. I hope it gives me
some insight. So, is my assessment right in that the HttpPost/
HttpClient route is not possible for this sort of thing currently? I
see there used to be a MultipartEntity class which was removed with
the 1.0 SDK. That looks like it might have been what I needed. Anyway
thanks again.

On Mar 24, 6:17 am, Mark Murphy mmur...@commonsware.com wrote:
 nEx.Software wrote:
  I am beating my head against a wall trying to figure out why I cannot
  get Authenticated on my server whilst using HttpUrlConnection. I need
  to post a file in a post method and it seems I cannot do so with the
  DefaultHttpClient and a regular HttpPost (unless I am completely
  missing something?). I can get DefaultHttpClient to authenticate just
  fine using setCredentials() but the same doesn't exist for
  HttpUrlConnection so I try to set through setRequestProperty:
  conn.setRequestProperty(Authorization, Basic  +
  Base64EncodedUserNamePassword); to no avail. Can anyone offer some
  insight? Thanks in advance.

 I don't have a direct answer, but JTwitter uses HttpUrlConnection, uses
 the same general technique you're describing, and it works on Android.
 Take a peek at their code and perhaps you'll see something that helps.

 http://www.winterwell.com/software/jtwitter.php

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: HttpUrlConnection - Authentication

2009-03-24 Thread Mark Murphy

nEx.Software wrote:
 Thanks for the lead Mark. I really appreciate it. I hope it gives me
 some insight. So, is my assessment right in that the HttpPost/
 HttpClient route is not possible for this sort of thing currently?

If by this sort of thing you mean pre-emptive HTTP authentication, it
definitely can be done. In my tutorials book, I show creating a Twitter
client using HttpClient and pre-emptive HTTP authentication (nasty!),
then ripping all that out and replacing it with JTwitter (crisp and
clean!). While I like HttpClient in general, pre-emptive HTTP
authentication is not one of its strong suits.

 I
 see there used to be a MultipartEntity class which was removed with
 the 1.0 SDK. That looks like it might have been what I needed. Anyway
 thanks again.

I think others have just grabbed an edition of that from
http://hc.apache.org.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: Get scroll position in a list activity

2009-03-24 Thread Streets Of Boston

I've done the same in my apps for ListView (whether they be in
ListActivity or in a plain Activity) with good success.

I use the java.util.concurrent's ExecutorService to obtain images:

1. Your getView(..) (or bindView/newView/etc) needs to assign an image/
thumbnail (bitmap) to an ImageView. But you don't have the bitmap yet.
If you do have it (store in a limited size cache), just set it .
2. If not, obtain a FutureTask from the ExecutorService and this
FutureTask then will download the image, create a thumbnail from it
and creates a Bitmap from this thumbnail. Remember the id of the image
(can be an id, Uri, URL, whatever, as long as it is unique) and assign
it to the ImageView (setTag()).
3. When ready, the FutureTask will 'post' back to the main-thread that
it has an new thumbnail.
4. On the 'post'-back, loop through the children of ListView, get the
appropriate ImageView, the one whose tag (getTag()) is equal to the
one that FutureTask you got the image for, assign the Bitmap to this
ImageView. This is it.

For myself I created a sub-system of ExecutorService and FutureTask,
called 'Cancelable' tasks, which make it easier to cancel queued up
tasks when they're no longer necessary. But this is an optimization.

On Mar 24, 8:06 am, Mark Murphy mmur...@commonsware.com wrote:
 Ivan Soto wrote:
  Do you have any article/tutorial about the placeholder images to share?
  I'm trying to find one with no luck.

 I have used the technique, but not in code I'm allowed to share. I do
 need to more formally write this up at some point, but I do not have
 anything immediately handy.

 The gist of it is that you create your adapter and set it up, in
 getView() or newView()/bindView() (depending on adapter choice), to see
 if the thumbnail has been downloaded. If so, use it for the list row
 being inflated/updated; if not, leave the ImageView in the row pointing
 to some placeholder Drawable resource. This means as the user scrolls,
 she will pick up the thumbnails. Also, at the end, you can quickly
 iterate over the rows (ListView is a ViewGroup, IIRC, so there are
 methods to iterate its children) and ensure each of those rows'
 ImageViews are using their associated thumbnails.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.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: ClassLoader.isAncestorOf(ClassLoader) Bug

2009-03-24 Thread Daniel Janev

Thanks Mark,

I've posted the bug there.

Mark Murphy wrote:
 Daniel Janev wrote:
 My colleagues has found a bug in the java.lang.ClassLoader
 implementation of the cupcake tag of the Android platform.
 
 Did you file this on http://b.android.com? That is the issue tracker for
 Android. I do not see your issue out there, so I strongly encourage you
 to file it there.
 
 I hope that you will be able to fix this as soon as possible and to
 update the cupcake branch too. Please notify me when this is ready.
 
 If you would take the time to file this on http://b.android.com, you
 will automatically be notified of progress on the issue.
 


-- 

Best Regards,
Daniel
---
Daniel Janev · Department Manager/Core Platform and Smart Home
ProSyst Software GmbH
1606 Sofia, Bulgaria · Vladajska Str. 48
Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17
Mobile Phone +359 (0)888 678 670
http://www.prosyst.com · d.ja...@prosyst.com
---
stay in touch with your product.
---

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

2009-03-24 Thread david liu
Hi All,

Here I have one question about I want to get the handle for one popup
dialog, such as, there is one Delete alertDialog pop up when you want to
delete one picture.  So could anyone have the good idea about this?

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] Re: Multiple ListViews in one Activity

2009-03-24 Thread Wouter

Ok thanks

On Mar 24, 12:48 pm, Mark Murphy mmur...@commonsware.com wrote:
 Wouter wrote:
  I now have different Listviews and I have different contextmenu's for
  these listviews because they need different actions.
  But i want to do this for the options menu to.

 The options menu is for the activity. Context menus are for the widget.

  Can i create a
  different options menu listener for every listview?

 No.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.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: custom cleanup on application uninstall

2009-03-24 Thread kingtut

Did anyone figure it out yet? I wanna do the same thing.

On Feb 5, 5:34 am, shahzad ahmad shahzad.s.ah...@gmail.com wrote:
 Is there any mechanism in android to perform post uninstall functions ? Are
 there any functions which an application can override to perform custom
 cleanup when it is being uninstalled ? Actually  i want  to delete  some
 application specific files on uninstall

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

2009-03-24 Thread nEx.Software

I saw that, but it adds so much unnecessary weight to my apk to
include additional jars.
I'll give the JTwitter thing a shot. Thanks.

On Mar 24, 7:10 am, Mark Murphy mmur...@commonsware.com wrote:
 nEx.Software wrote:
  Thanks for the lead Mark. I really appreciate it. I hope it gives me
  some insight. So, is my assessment right in that the HttpPost/
  HttpClient route is not possible for this sort of thing currently?

 If by this sort of thing you mean pre-emptive HTTP authentication, it
 definitely can be done. In my tutorials book, I show creating a Twitter
 client using HttpClient and pre-emptive HTTP authentication (nasty!),
 then ripping all that out and replacing it with JTwitter (crisp and
 clean!). While I like HttpClient in general, pre-emptive HTTP
 authentication is not one of its strong suits.

  I
  see there used to be a MultipartEntity class which was removed with
  the 1.0 SDK. That looks like it might have been what I needed. Anyway
  thanks again.

 I think others have just grabbed an edition of that fromhttp://hc.apache.org.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Multiplayer game

2009-03-24 Thread suhas

Hi All,
I have developed a sports game which is single player.
Now I want to have one more game mode which is multiplayer.
My question is how can i do device to device connection in android
using sets of api which can be :

1.Bluetooth - whose APIs are not currently available.
2.gtalkservice - removed from sdk1.0
3.wifi - I dont knw how to connect 2 devices using wifi apis . I have
asked about wifi because we have developed a game on iphone which used
wifi connection for multiplayer stuff.

Or  is there any other apis which can be used for implementation of
multiplayer in game ?

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

2009-03-24 Thread Streets Of Boston

Here is a code-snippet. I may not compile, but i think you'll get the
idea :-)

[code]
ExecutorService EXECUTOR = Executors.newFixedThreadPool(3); // max 3
worker threads.
...
public View getView(final AbsListView listView, View convertView, int
pos, long id) {

  ...
  ...

  final String imgUrl = ...
  ...
  final ImageView imgView = ...
  ...
  Bitmap bm = mBitmapCache.get(imgUrl);
  if (bm != null)
imgView.setImageBitmap(bm);
  else {
imgView.setTag(imgUrl);
FutureTask? task = EXECUTOR.submit(new Runnable() {
  public void run() {
final Bitmap newBM = getImageFrom(imgUrl); // you have to
write this method
if (newBM == null)
  return;

// be sure that mBitmapCache is thread-safe.
mBitmapCache.put(imgUrl, newBM);

// instead of 'listView', you could use a new Handler
instance.
listView.post(new Runnable() {
  public void run() {
  String checkUrl = (String)imgView.getTag();
  if (checkUrl != null  !checkUrl.equals(imgUrl))
return;

  imgView.setImageBitmap(newBM);
  }
});
  }

  private Bitmap getImageFrom(String url) {
// download the data from imgUrl.
// create a bitmap from it.
return bitMap;
  }
});
  }

  // if you want, you can hold on to 'task' and call 'cancel' on it if
necessary, e.g.
  // when this convertView is about to be re-used and to be assigned
to a different image.
  return convertView;
}
[/code]

On Mar 24, 10:13 am, Streets Of Boston flyingdutc...@gmail.com
wrote:
 I've done the same in my apps for ListView (whether they be in
 ListActivity or in a plain Activity) with good success.

 I use the java.util.concurrent's ExecutorService to obtain images:

 1. Your getView(..) (or bindView/newView/etc) needs to assign an image/
 thumbnail (bitmap) to an ImageView. But you don't have the bitmap yet.
 If you do have it (store in a limited size cache), just set it .
 2. If not, obtain a FutureTask from the ExecutorService and this
 FutureTask then will download the image, create a thumbnail from it
 and creates a Bitmap from this thumbnail. Remember the id of the image
 (can be an id, Uri, URL, whatever, as long as it is unique) and assign
 it to the ImageView (setTag()).
 3. When ready, the FutureTask will 'post' back to the main-thread that
 it has an new thumbnail.
 4. On the 'post'-back, loop through the children of ListView, get the
 appropriate ImageView, the one whose tag (getTag()) is equal to the
 one that FutureTask you got the image for, assign the Bitmap to this
 ImageView. This is it.

 For myself I created a sub-system of ExecutorService and FutureTask,
 called 'Cancelable' tasks, which make it easier to cancel queued up
 tasks when they're no longer necessary. But this is an optimization.

 On Mar 24, 8:06 am, Mark Murphy mmur...@commonsware.com wrote:



  Ivan Soto wrote:
   Do you have any article/tutorial about the placeholder images to share?
   I'm trying to find one with no luck.

  I have used the technique, but not in code I'm allowed to share. I do
  need to more formally write this up at some point, but I do not have
  anything immediately handy.

  The gist of it is that you create your adapter and set it up, in
  getView() or newView()/bindView() (depending on adapter choice), to see
  if the thumbnail has been downloaded. If so, use it for the list row
  being inflated/updated; if not, leave the ImageView in the row pointing
  to some placeholder Drawable resource. This means as the user scrolls,
  she will pick up the thumbnails. Also, at the end, you can quickly
  iterate over the rows (ListView is a ViewGroup, IIRC, so there are
  methods to iterate its children) and ensure each of those rows'
  ImageViews are using their associated thumbnails.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Android App Developer Books:http://commonsware.com/books.html- Hide quoted 
  text -

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



[android-developers] Re: Get scroll position in a list activity

2009-03-24 Thread Ivan Soto
Thanks for explaining.
Right now I'm using the efficient list method used on the ApiDemos so when
the user scrolls it will refreshes the images that didn't load before. But
if you don't move anything, even if the image is downloaded it won't redraw
in the imageview.

I will start reading about that FutureTask/ExecutorService


Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Tue, Mar 24, 2009 at 8:13 AM, Streets Of Boston
flyingdutc...@gmail.comwrote:


 I've done the same in my apps for ListView (whether they be in
 ListActivity or in a plain Activity) with good success.

 I use the java.util.concurrent's ExecutorService to obtain images:

 1. Your getView(..) (or bindView/newView/etc) needs to assign an image/
 thumbnail (bitmap) to an ImageView. But you don't have the bitmap yet.
 If you do have it (store in a limited size cache), just set it .
 2. If not, obtain a FutureTask from the ExecutorService and this
 FutureTask then will download the image, create a thumbnail from it
 and creates a Bitmap from this thumbnail. Remember the id of the image
 (can be an id, Uri, URL, whatever, as long as it is unique) and assign
 it to the ImageView (setTag()).
 3. When ready, the FutureTask will 'post' back to the main-thread that
 it has an new thumbnail.
 4. On the 'post'-back, loop through the children of ListView, get the
 appropriate ImageView, the one whose tag (getTag()) is equal to the
 one that FutureTask you got the image for, assign the Bitmap to this
 ImageView. This is it.

 For myself I created a sub-system of ExecutorService and FutureTask,
 called 'Cancelable' tasks, which make it easier to cancel queued up
 tasks when they're no longer necessary. But this is an optimization.

 On Mar 24, 8:06 am, Mark Murphy mmur...@commonsware.com wrote:
  Ivan Soto wrote:
   Do you have any article/tutorial about the placeholder images to share?
   I'm trying to find one with no luck.
 
  I have used the technique, but not in code I'm allowed to share. I do
  need to more formally write this up at some point, but I do not have
  anything immediately handy.
 
  The gist of it is that you create your adapter and set it up, in
  getView() or newView()/bindView() (depending on adapter choice), to see
  if the thumbnail has been downloaded. If so, use it for the list row
  being inflated/updated; if not, leave the ImageView in the row pointing
  to some placeholder Drawable resource. This means as the user scrolls,
  she will pick up the thumbnails. Also, at the end, you can quickly
  iterate over the rows (ListView is a ViewGroup, IIRC, so there are
  methods to iterate its children) and ensure each of those rows'
  ImageViews are using their associated thumbnails.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Android App Developer Books:http://commonsware.com/books.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] http proxy and chunked encoding with emulator

2009-03-24 Thread m5p3nc3r

Hi All

I am having a specific problem that is preventing me using the android
SDK from work.  We are using a MS Proxy here that all internet traffic
has to go through.  The problem seems to be when the emulator is
trying to access a site that uses 'Transfer-Encoding: chunked'

If I attempt to download www.nds.com (no chunked encoding) into the
browser, it works fine.

However if I try to go to www.google.com (uses chunked encoding), the
browser fails with the message:
  can't determine content length, and client wants to keep connection
opened

My feeling (and I'm no expert in this area) is that the underlying
code managing the communication through the proxy is not dealing with
the null terminator on the chunk encoded response when the connection
to the proxy is being kept open?

Does anyone have any experience in this area?  Is the source to the
emulator available so I can try and understand what is going on here?

Cheers

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



[android-developers] Alias custom view path in XML

2009-03-24 Thread Ward Willats

Is there a way to alias the path to my custom view class (perhaps in 
its styleable) so I can say

MyGreatView

in the XML, instead of

com.myco.myapps.MyGreatView

(I played around with the months ago, namespaces and what-not, but 
never found a solution.)

Just a nice to have thing.

Thanks

-- Ward

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

2009-03-24 Thread Ivan Soto
I think that's what I'm looking for. Can't wait to give it a try after work.
Although, I have another thread in my main Activity downloading all
pictures.
Thanks, I will give it a try.


Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Tue, Mar 24, 2009 at 8:37 AM, Streets Of Boston
flyingdutc...@gmail.comwrote:


 Here is a code-snippet. I may not compile, but i think you'll get the
 idea :-)

 [code]
 ExecutorService EXECUTOR = Executors.newFixedThreadPool(3); // max 3
 worker threads.
 ...
 public View getView(final AbsListView listView, View convertView, int
 pos, long id) {

  ...
  ...

  final String imgUrl = ...
  ...
  final ImageView imgView = ...
  ...
  Bitmap bm = mBitmapCache.get(imgUrl);
  if (bm != null)
imgView.setImageBitmap(bm);
  else {
imgView.setTag(imgUrl);
FutureTask? task = EXECUTOR.submit(new Runnable() {
  public void run() {
final Bitmap newBM = getImageFrom(imgUrl); // you have to
 write this method
if (newBM == null)
  return;

// be sure that mBitmapCache is thread-safe.
mBitmapCache.put(imgUrl, newBM);

// instead of 'listView', you could use a new Handler
 instance.
listView.post(new Runnable() {
  public void run() {
  String checkUrl = (String)imgView.getTag();
  if (checkUrl != null  !checkUrl.equals(imgUrl))
return;

  imgView.setImageBitmap(newBM);
  }
});
  }

  private Bitmap getImageFrom(String url) {
// download the data from imgUrl.
// create a bitmap from it.
return bitMap;
  }
});
  }

  // if you want, you can hold on to 'task' and call 'cancel' on it if
 necessary, e.g.
  // when this convertView is about to be re-used and to be assigned
 to a different image.
  return convertView;
 }
 [/code]

 On Mar 24, 10:13 am, Streets Of Boston flyingdutc...@gmail.com
 wrote:
  I've done the same in my apps for ListView (whether they be in
  ListActivity or in a plain Activity) with good success.
 
  I use the java.util.concurrent's ExecutorService to obtain images:
 
  1. Your getView(..) (or bindView/newView/etc) needs to assign an image/
  thumbnail (bitmap) to an ImageView. But you don't have the bitmap yet.
  If you do have it (store in a limited size cache), just set it .
  2. If not, obtain a FutureTask from the ExecutorService and this
  FutureTask then will download the image, create a thumbnail from it
  and creates a Bitmap from this thumbnail. Remember the id of the image
  (can be an id, Uri, URL, whatever, as long as it is unique) and assign
  it to the ImageView (setTag()).
  3. When ready, the FutureTask will 'post' back to the main-thread that
  it has an new thumbnail.
  4. On the 'post'-back, loop through the children of ListView, get the
  appropriate ImageView, the one whose tag (getTag()) is equal to the
  one that FutureTask you got the image for, assign the Bitmap to this
  ImageView. This is it.
 
  For myself I created a sub-system of ExecutorService and FutureTask,
  called 'Cancelable' tasks, which make it easier to cancel queued up
  tasks when they're no longer necessary. But this is an optimization.
 
  On Mar 24, 8:06 am, Mark Murphy mmur...@commonsware.com wrote:
 
 
 
   Ivan Soto wrote:
Do you have any article/tutorial about the placeholder images to
 share?
I'm trying to find one with no luck.
 
   I have used the technique, but not in code I'm allowed to share. I do
   need to more formally write this up at some point, but I do not have
   anything immediately handy.
 
   The gist of it is that you create your adapter and set it up, in
   getView() or newView()/bindView() (depending on adapter choice), to see
   if the thumbnail has been downloaded. If so, use it for the list row
   being inflated/updated; if not, leave the ImageView in the row pointing
   to some placeholder Drawable resource. This means as the user scrolls,
   she will pick up the thumbnails. Also, at the end, you can quickly
   iterate over the rows (ListView is a ViewGroup, IIRC, so there are
   methods to iterate its children) and ensure each of those rows'
   ImageViews are using their associated thumbnails.
 
   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   Android App Developer Books:http://commonsware.com/books.html- Hide
 quoted text -
 
  - Show quoted text -
 


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



[android-developers] Re: Alias custom view path in XML

2009-03-24 Thread Mark Murphy

Ward Willats wrote:
 Is there a way to alias the path to my custom view class (perhaps in 
 its styleable) so I can say
 
 MyGreatView
 
 in the XML, instead of
 
 com.myco.myapps.MyGreatView
 
 (I played around with the months ago, namespaces and what-not, but 
 never found a solution.)
 
 Just a nice to have thing.

Not that I'm aware of. Otherwise, I would have expected Google to avail
itself of the technique with MapView. Right now, we have to spell out
the whole fully-qualified class name when putting MapView in our layouts
(unless something changed on that front that I missed).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: http proxy and chunked encoding with emulator

2009-03-24 Thread David Turner
That very well could be a bug in the chunk encoding support of the http
rewriter within the emulator's proxy code.
I could not test it against a lot of cases.

Can you dump the output of emulator -debug-proxy when you try to connect
to www.google.com through your proxy ?
This will print out the exact messages exchanged.

On Tue, Mar 24, 2009 at 3:39 PM, m5p3nc3r matt...@thespencers.me.uk wrote:


 Hi All

 I am having a specific problem that is preventing me using the android
 SDK from work.  We are using a MS Proxy here that all internet traffic
 has to go through.  The problem seems to be when the emulator is
 trying to access a site that uses 'Transfer-Encoding: chunked'

 If I attempt to download www.nds.com (no chunked encoding) into the
 browser, it works fine.

 However if I try to go to www.google.com (uses chunked encoding), the
 browser fails with the message:
  can't determine content length, and client wants to keep connection
 opened

 My feeling (and I'm no expert in this area) is that the underlying
 code managing the communication through the proxy is not dealing with
 the null terminator on the chunk encoded response when the connection
 to the proxy is being kept open?

 Does anyone have any experience in this area?  Is the source to the
 emulator available so I can try and understand what is going on here?

 Cheers

 Matt
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Drawing ViewGroup content on a SurfaceView/SurfaceHolder Canvas

2009-03-24 Thread bleucalme

I want to do something similar. Did you find a solution?

On Mar 13, 7:33 pm, Zia zia.cha...@gmail.com wrote:
 Hi,

 Wanted to know if its possible to draw ViewGroup contents on
 SurfaceView/SurfaceHolder canvas?  I'm trying to achieve fast 2D
 animation (using SurfaceView) alongside Android UI components on the
 screen.

 Since SurfaceView punches a hole in the app window, I tried creating
 SurfaceView, and inside there I created LinearLayout and added couple
 of controls (Button and ImageView). Now I tried calling mLayout.draw
 (canvas) from SurfaceHolder canvas, it doesn't render anything. Am i
 missing something here?

 I wonder if that would yield better performance then calling
 invalidate from Activity.runOnUiThread().

 Please advice.

 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] How to read MMS messages? Possible or not?

2009-03-24 Thread Sebastian

Hello,

i am unable to find updated information on how to read mms messages in
android.
I am able to query content://sms and content://mms.
Content://mms contains a bunch of columns which i don't find
information for.
Atleast the returned Cursors seem to point to the mms in my phone.
Now, how can i read the actual mms data?
Is it intended that the official documentation contains no information
at all?!
As far as i understand it: The included Messaging/MMS application on
my G1 is not part of android (the open source project)? So it's closed
source and provided to the carrier by google/whoever?
It'd be really nice to have some statement on this because i need to
know whether i can read mms or not (which would be ridiculous).

Regards, Sebastian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Injecting HTTP header into all requests issued by the emulator

2009-03-24 Thread David Turner
the http proxy support code is in external/qemu/proxy/proxy_http_rewriter.c
you should be able to modify it to inject the header you need.

Apart from that, this is not supported by the current binary, so an
alternative is to use a different proxy to do that.

You can still use -debug-proxy to dump the messages exchanged between the
emulator and the proxy. This
can be useful to debug problems there.

On Tue, Mar 17, 2009 at 7:18 PM, Greg Krimer gkri...@gmail.com wrote:


 Hi everyone,

 Is there an easy way to inject a header into all HTTP request sent
 from the emulator, including HTTP requests made by my app and also by
 the built-in web browser? I need this ability to model the behavior of
 a carrier gateway. I tried running the emulator through Fiddler as a
 proxy because I know how to manipulate HTTP requests in Fiddler, but
 that that didn't work. The emulator was successfully able to make the
 first HTTP request, but choked on subsequent ones. Reading this list,
 it seems that getting the emulator to use a proxy is not is not that
 easy. If this is the only way to do what I need, then I'll certainly
 give it another shot and post details about any problems I encounter.
 I am just wondering if perhaps there is an easier way to inject a
 header.

 Thanks,

 Greg
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 config G1 to make both browser and MMS work?

2009-03-24 Thread David Turner
On Thu, Mar 19, 2009 at 4:46 AM, Weizhong xwz7...@gmail.com wrote:


 If I leave apn type to blank, is that same to default? Actually I
 have tested with cmnet apn type blank, and cmwap apn type mms, it's
 not working either.


I have been told that a blank is not the same than default. You must set it
explicitely.



 On Mar 19, 3:18 am, David Turner di...@android.com wrote:
  when you want to use different APNs for both data and MMS, you need to
 set
  the apn type field for the system to make a difference between them and
  use them both.
 
  use apn type=default for the data APN.
  and apn type=mms for the MMS one.
 
  Hope this helps
 
 
 
  On Wed, Mar 18, 2009 at 12:38 AM, FayGU gqm...@gmail.com wrote:
 
   I have a G1 phone and use it in mainland China.
   But I can't config it to work with browser and MMS at the same time.
   However with different APN, the browser and MMS can work seperately.
   For browser, I use following APN config:
   ---
   name:cmnet
   apn: cmnet
   proxy:blank
   port:blank
   username:blank
   password:blank
   server:blank
   mmsc:blank
   mms proxy:blank
   mms port:blank
   mcc:460
   mnc:00
   apn type:blank
   --
 
   For MMS, I use following APN config:
   --
   name:cmwap
   apn: cmwap
   proxy:blank
   port:blank
   username:blank
   password:blank
   server:blank
   mmsc:http://mmsc.monternet.com
   mms proxy:010.000.000.172
   mms port:80
   mcc:460
   mnc:00
   apn type:blank
   ---
 
   When above two APNs both exists, only browser can work. MMS doesn't
   work any more.
 
   Does any google export know that how to config G1 to make both browser
   and MMS work?
   If it's a known issue, is there any roadmap to fix it?
   Thanks!- Hide quoted text -
 
  - Show quoted text -

 


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



[android-developers] Re: Google dev phone G1 activation problem

2009-03-24 Thread David Turner
Have you tried removing the mms related settings from the default APN,
then add them back to the mms one ?

On Thu, Mar 19, 2009 at 10:00 AM, HalfAsleep chri...@gmail.com wrote:


 If anyone gets their phone set up with telenor, including MMS, please
 let us know.  I have got my phone working too now, with these
 settings...

 name: Telenor
 apn: telenor
 username:
 password:
 mmsc: http://mmsc/
 mms proxy: 10.10.10.11
 mms port: 8080
 mcc:242
 mnc:01
 apn type: default


 The only thing that will not work is MMS.  Adding a second apn that
 looks identical, with apn type of MMS does not help either.
 I would love to get MMS working, so please let me know if you have
 Telenor Norway subscription and have MMS working (and of course, how
 you did it :))

 HalfAsleep

 On 11 Mar, 10:38, Stian slind...@gmail.com wrote:
  No, it still does not ship directly to Norway. I got it shipped here
  through our US office. I guess Jetpak will work as well.
 
  Now, I've been getting a few mails from people having the same
  activation problem as I had so I figured I should post an update here.
  After lots of trials and errors I finally managed to activate the
  phone, but I had to use WLAN.
 
  To get that going you first need to install the USB driver for the
  phone and connect it to your computer.
  Run adb devices to verify that the device is connected correctly
  (HTC-something should show up under List of devices attached). Then
  run adb shell and am start -a android.intent.action.MAIN -n
  com.android.settings/.Settings from the shell prompt to get the WiFI-
  configuration screen up. Now configure your WIFI and activate the
  phone. Once you get that done you can go to Settings, Wireless
  controls-Mobile networks and register your SIM card on the mobile
  network!
 
  The APN settings I mentioned are correct (the only thing you need is
  to set telenor as apn name for Telenor). MMS doesn't seem to work,
  but I don't care.
 
  Good luck!
 
  Best regards,
  Stian
 
  On Feb 26, 12:06 pm, HalfAsleep chri...@gmail.com wrote:
 
 
 
   How do you go about getting the dev phone in Norway?  It still does
   not ship directly to Norway does it?
 
   Cheers,
   HalfAsleep
 
   On Feb 18, 10:21 pm, Mandrake0 francis.tyrone.pime...@gmail.com
   wrote:
 
look at:http://www.taniwha.org.uk/gprs.html
 
Network APN Username
  Password
DNS   SMTP
Server
   TelenorMobil   internet.telenor.no guest   guest   212.17.131.3
smtp.euromail.no
 
48.122.161.2
 
On Feb 18, 7:22 pm, slind...@gmail.com slind...@gmail.com wrote:
 
 I've got the Google dev phone from USA and I'm trying to activate
 it
 onTelenorinNorway. I've tried a whole bunch of different APN
 settings but nothing seems to be working.
 
 After filling in my username and password it tries to connect to
 google servers foractivationa couple of minutes before it reports
 an
 error There is a problem communicating with the Google servers.
 I've
 tried to delete all APNs and adding a new one. The settings I'm
 using
 now is:
 
 Name:telenor
 APN:telenor
 MCC: 242
 MNC: 01
 
 The rest is unset. I've also tried with username/password dj/dj
 and
 wap/wap. And also changing the APN value to internet.
 
 Any suggestions?– Skjul sitert tekst –
 
  – Vis sitert tekst –
 


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

2009-03-24 Thread m5p3nc3r

Sorry for the large blob, but here goes:

http_service_connect: trying to connect to 209.85.229.147 on port 80
http_service_connect: using HTTP rewriter
tcp:209.85.229.147:80(16): connecting
tcp:209.85.229.147:80(16): connected to proxy
tcp:209.85.229.147:80(16): socket pair created
tcp:209.85.229.147:80(16): received 'GET / HTTP/1.1'
tcp:209.85.229.147:80(16): request first line ok
tcp:209.85.229.147:80(16): received 'Host: www.google.co.uk'
tcp:209.85.229.147:80(16): received 'Accept-Encoding: gzip'
tcp:209.85.229.147:80(16): received 'Accept: text/xml,application/
xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/
*;q=0.5'
tcp:209.85.229.147:80(16): received 'User-Agent: Mozilla/5.0 (Linux;
U; Android 1.1; en-us; generic) AppleWebKit/525.10+ (KHTML, like
Gecko) Version/3.0.4 Mobile Safari/523.12.2'
tcp:209.85.229.147:80(16): received 'cookie:
PREF=ID=9b27b0c4bb3ccab7:TM=1237904551:LM=1237904551:S=cv8iLxR5b3eOgTYD;
MPRF=H4sIAKvY-
eDjsWaVLiaGSUwKKcZmxpYmyUnmFpYGxsYpyamWxmbmxgaWxgaphmkpZpYAq0QklS0'
tcp:209.85.229.147:80(16): received 'Accept-Language: en-US'
tcp:209.85.229.147:80(16): received 'Accept-Charset: utf-8,
iso-8859-1, utf-16, *;q=0.7'
tcp:209.85.229.147:80(16): received ''
tcp:209.85.229.147:80(16): request headers ok
tcp:209.85.229.147:80(16): sending 643 bytes:
 47 45 54 20 68 74 74 70 3a 2f 2f 77 77 77 2e 67GET http://www.g
 6f 6f 67 6c 65 2e 63 6f 2e 75 6b 2f 20 48 54 54oogle.co.uk/ HTT
 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 77 77 77P/1.1..Host: www
 2e 67 6f 6f 67 6c 65 2e 63 6f 2e 75 6b 0d 0a 41.google.co.uk..A
 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20ccept-Encoding:
 67 7a 69 70 0d 0a 41 63 63 65 70 74 3a 20 74 65gzip..Accept: te
 78 74 2f 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69xt/xml,applicati
 6f 6e 2f 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69on/xml,applicati
 6f 6e 2f 78 68 74 6d 6c 2b 78 6d 6c 2c 74 65 78on/xhtml+xml,tex
 74 2f 68 74 6d 6c 3b 71 3d 30 2e 39 2c 74 65 78t/html;q=0.9,tex
 74 2f 70 6c 61 69 6e 3b 71 3d 30 2e 38 2c 69 6dt/plain;q=0.8,im
 61 67 65 2f 70 6e 67 2c 2a 2f 2a 3b 71 3d 30 2eage/png,*/*;q=0.
 35 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d5..User-Agent: M
 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 4c 69 6e 75ozilla/5.0 (Linu
 78 3b 20 55 3b 20 41 6e 64 72 6f 69 64 20 31 2ex; U; Android 1.
 31 3b 20 65 6e 2d 75 73 3b 20 67 65 6e 65 72 691; en-us; generi
 63 29 20 41 70 70 6c 65 57 65 62 4b 69 74 2f 35c) AppleWebKit/5
 32 35 2e 31 30 2b 20 28 4b 48 54 4d 4c 2c 20 6c25.10+ (KHTML, l
 69 6b 65 20 47 65 63 6b 6f 29 20 56 65 72 73 69ike Gecko) Versi
 6f 6e 2f 33 2e 30 2e 34 20 4d 6f 62 69 6c 65 20on/3.0.4 Mobile
 53 61 66 61 72 69 2f 35 32 33 2e 31 32 2e 32 0dSafari/523.12.2.
 0a 63 6f 6f 6b 69 65 3a 20 50 52 45 46 3d 49 44.cookie: PREF=ID
 3d 39 62 32 37 62 30 63 34 62 62 33 63 63 61 62=9b27b0c4bb3ccab
 37 3a 54 4d 3d 31 32 33 37 39 30 34 35 35 31 3a7:TM=1237904551:
 4c 4d 3d 31 32 33 37 39 30 34 35 35 31 3a 53 3dLM=1237904551:S=
 63 76 38 69 4c 78 52 35 62 33 65 4f 67 54 59 44cv8iLxR5b3eOgTYD
 3b 20 4d 50 52 46 3d 48 34 73 49 41 41 41 41 41; MPRF=H4sIA
 41 41 41 41 4b 76 59 2d 65 44 6a 73 57 61 56 4cKvY-eDjsWaVL
 69 61 47 53 55 77 4b 4b 63 5a 6d 78 70 59 6d 79iaGSUwKKcZmxpYmy
 55 6e 6d 46 70 59 47 78 73 59 70 79 61 6d 57 78UnmFpYGxsYpyamWx
 6d 62 6d 78 67 61 57 78 67 61 70 68 6d 6b 70 5ambmxgaWxgaphmkpZ
 70 59 41 71 30 51 6b 6c 53 30 41 41 41 41 0d 0apYAq0QklS0..

tcp:209.85.229.147:80(16): request sent, waiting for reply
tcp:209.85.229.147:80(16): received 'HTTP/1.1 200 OK'
tcp:209.85.229.147:80(16): reply first line ok
tcp:209.85.229.147:80(16): received 'Via: 1.1 UKPROXY06'
tcp:209.85.229.147:80(16): received 'Connection: Keep-Alive'
tcp:209.85.229.147:80(16): received 'Proxy-Connection: Keep-Alive'
tcp:209.85.229.147:80(16): received 'Transfer-Encoding: chunked'
tcp:209.85.229.147:80(16): received 'Expires: Tue, 24 Mar 2009
14:27:32 GMT'
tcp:209.85.229.147:80(16): received 'Date: Tue, 24 Mar 2009 14:27:32
GMT'
tcp:209.85.229.147:80(16): received 'Content-Type: text/html;
charset=UTF-8'
tcp:209.85.229.147:80(16): received 'Server: GFE/1.3'
tcp:209.85.229.147:80(16): received 'Set-Cookie:
MPRF=H4sIAKvo62453qzSxcQwiUkhxdjM2NIkOcncwtLA2DglOdXS2Mzc2MDS2CDVMC3FzBIA_9vpxi0;
expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.co.uk'
tcp:209.85.229.147:80(16): received 'Cache-Control: private, max-
age=1209600'
tcp:209.85.229.147:80(16): received 'X-Content-Type-Options: nosniff'
tcp:209.85.229.147:80(16): received ''
tcp:209.85.229.147:80(16): reply headers ok
tcp:209.85.229.147:80(16): sending 504 bytes:
 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0dHTTP/1.1 200 OK.
 0a 56 69 61 3a 20 31 2e 31 20 55 4b 50 52 4f 58.Via: 1.1 UKPROX
 59 30 36 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3aY06..Connection:
 20 4b 65 65 70 2d 41 6c 69 76 65 0d 0a 50 72 6f Keep-Alive..Pro
 78 

[android-developers] Afterimage when using SURFACE_TYPE_PUSH_BUFFERS surface.

2009-03-24 Thread AndroidJimmy

Dears,
I met a problem with video playback.
My video playback activity was set to landscape.
When I pressed the back key to leave the activity, There sometimes had
afterimage of the video content about less than 1 sec on the screen
(). The afterimage often transform to the portrait orientation.

I tried to use Surface.hide() on the surface got from surface holder
in onPause() function, but it didn't work.

Is there any way to avoid the afterimage of the video content?
Thanks for your help.



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



[android-developers] api to install update apk in private-app folder

2009-03-24 Thread Zi Yong Chua

Hi fellow developers,

I have a question with regards to an update feature that I am trying
to put in my application. I am wondering if it is possible for an
application to download a new apk and install it inside the /data/app-
private folder (which i presume is for copy protected apps)?

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



[android-developers] Managed filer query creates 'attempt to acquire a reference on a close SQLiteClosable'

2009-03-24 Thread EboMike

I'm creating a managedQuery in the FilterQueryProvider.runQuery() of a
ResourceCursorAdapter. That works fine, but if I set up a filter, then
go to a different app, then go back to the app with the filter, the
app crashes with 'attempt to acquire a reference on a close
SQLiteClosable' in the performResumeActivity.

My guess is that the cursor manager is trying to call requery() on the
filter queries, but they have since been closed by the magic fairy (I
don't keep a pointer to the cursors).

The only way I can get this to work is by using a double-buffered
cursor for the filters that I maintain myself and close in onPause().
That seems pretty backwards.

What can cause a cursor to become invalid after the activity changes?
I only have this problem when using the filter.

-Mike

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



[android-developers] Re: api to install update apk in private-app folder

2009-03-24 Thread Mark Murphy

Zi Yong Chua wrote:
 I have a question with regards to an update feature that I am trying
 to put in my application. I am wondering if it is possible for an
 application to download a new apk and install it inside the /data/app-
 private folder (which i presume is for copy protected apps)?

I do not believe that is possible.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Training: http://commonsware.com/training.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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Jean-Baptiste Queru

1.1 was essentially a update of a few Google-proprietary bits on top
of the same platform as 1.0.
From the point of view of the Android platform (and therefore of the
SDK as well), the differences between 1.0 and 1.1 are extremely minor.

Cupcake is a branch name, it's not a released version. A future
numbered release will be cut from the cupcake branch, but that product
isn't ready yet, and therefore there can be no SDK yet.

As cupcake contains significant platform changes compared to 1.0/1.1,
you can be sure that you'll have an official SDK for a
cupcake-originated release as soon as possible.

JBQ

On Tue, Mar 24, 2009 at 1:16 AM, tauntz tau...@gmail.com wrote:

 I just hope that this time the release date for the official SDK will
 be BEFORE the update hits the masses. Not like it was with the 1.1SDK
 - it was released way after 1.1 was released to end-users (the
 argument from Google was something in the lines of Hey, this is a
 small release with no mayor changes so don't whine that you get it so
 late). Maybe I'm the only one who thinks that this is ridiculous..
 One of the reasons why we don't have the official 1.5 (or cupcake or
 however it will be officially called) SDK is that It's not stable
 enough - fair enough but I really hope that you guys @ Google will
 release it as soon as the code is stable enough (eg the code is tested
 and ready to be released to the operators). That would give us a week
 (maybe more) before the operators push it to the end-users.

 And don't come with the you can build your own SDK from the
 opensource tree if you want - the last releases didn't come from the
 opensource tree so even if I wanted, i couldn't build the SDK based on
 the code that's shipped to the end-users. And even if this release
 will actually come from the public tree, you can't expect all app
 developers to build their own SDK, can you? We need an official SDK -
 and we need it as soon as the tree is stable enough (and way before
 it's pushed to the carriers/end-users)


 Tauno


 On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com wrote:

 Not if you stay anonymous (hint, hint) ;-)

 On Mar 23, 7:58 pm, Anonymous Anonymous firewallbr...@googlemail.com
 wrote:
  Someone from Google?  makes it official i guess :D

 On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com wrote:

  Can someone capable just compile the SDK and post it online for
  everyone? Someone from Google? I dont really care if it's not
  official, i just dont want to download the source tree just to build
  the SDK, plus i need to do the tricks you mentioned to make it work on
  windows.

  On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
   I certainly hope there aren't a lot of applications that use
   reflection and private APIs.

   On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel zl25dre...@gmail.com
  wrote:

Cupcake is coming, and as you know it will break a lot of apps in the
market, those that use reflection  private api. So where is the
Cupcake SDK/emulator for us to try our apps?

I know we can download the source codes and build it, and I know apps
wont break if they dont use undocumented api, blah blah blah, but we
should get an official SDK/emulator for cupcake, dont you think,
google?
 


 




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

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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

2009-03-24 Thread David Turner
Thanks a lot, I could find a bug in the http rewriter source code. It is
triggered by the Keep-Alive + chunked reply.
I'll file a bug for it and start working on it.

However, I'd like to be able to test it. Anyone knows a proxy that can be
setup to answer this way ?

On Tue, Mar 24, 2009 at 4:22 PM, m5p3nc3r matt...@thespencers.me.uk wrote:


 Sorry for the large blob, but here goes:

 http_service_connect: trying to connect to 209.85.229.147 on port 80
 http_service_connect: using HTTP rewriter
 tcp:209.85.229.147:80(16): connecting
 tcp:209.85.229.147:80(16): connected to proxy
 tcp:209.85.229.147:80(16): socket pair created
 tcp:209.85.229.147:80(16): received 'GET / HTTP/1.1'
 tcp:209.85.229.147:80(16): request first line ok
 tcp:209.85.229.147:80(16): received 'Host: www.google.co.uk'
 tcp:209.85.229.147:80(16): received 'Accept-Encoding: gzip'
 tcp:209.85.229.147:80(16): received 'Accept: text/xml,application/
 xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/
 *;q=0.5'
 tcp:209.85.229.147:80(16): received 'User-Agent: Mozilla/5.0 (Linux;
 U; Android 1.1; en-us; generic) AppleWebKit/525.10+ (KHTML, like
 Gecko) Version/3.0.4 Mobile Safari/523.12.2'
 tcp:209.85.229.147:80(16): received 'cookie:
 PREF=ID=9b27b0c4bb3ccab7:TM=1237904551:LM=1237904551:S=cv8iLxR5b3eOgTYD;
 MPRF=H4sIAKvY-
 eDjsWaVLiaGSUwKKcZmxpYmyUnmFpYGxsYpyamWxmbmxgaWxgaphmkpZpYAq0QklS0'
 tcp:209.85.229.147:80(16): received 'Accept-Language: en-US'
 tcp:209.85.229.147:80(16): received 'Accept-Charset: utf-8,
 iso-8859-1, utf-16, *;q=0.7'
 tcp:209.85.229.147:80(16): received ''
 tcp:209.85.229.147:80(16): request headers ok
 tcp:209.85.229.147:80(16): sending 643 bytes:
  47 45 54 20 68 74 74 70 3a 2f 2f 77 77 77 2e 67GET http://www.g
  6f 6f 67 6c 65 2e 63 6f 2e 75 6b 2f 20 48 54 54oogle.co.uk/ HTT
  50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 77 77 77P/1.1..Host: www
  2e 67 6f 6f 67 6c 65 2e 63 6f 2e 75 6b 0d 0a 41.google.co.uk..A
  63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20ccept-Encoding:
  67 7a 69 70 0d 0a 41 63 63 65 70 74 3a 20 74 65gzip..Accept: te
  78 74 2f 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69xt/xml,applicati
  6f 6e 2f 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69on/xml,applicati
  6f 6e 2f 78 68 74 6d 6c 2b 78 6d 6c 2c 74 65 78on/xhtml+xml,tex
  74 2f 68 74 6d 6c 3b 71 3d 30 2e 39 2c 74 65 78t/html;q=0.9,tex
  74 2f 70 6c 61 69 6e 3b 71 3d 30 2e 38 2c 69 6dt/plain;q=0.8,im
  61 67 65 2f 70 6e 67 2c 2a 2f 2a 3b 71 3d 30 2eage/png,*/*;q=0.
  35 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d5..User-Agent: M
  6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 4c 69 6e 75ozilla/5.0 (Linu
  78 3b 20 55 3b 20 41 6e 64 72 6f 69 64 20 31 2ex; U; Android 1.
  31 3b 20 65 6e 2d 75 73 3b 20 67 65 6e 65 72 691; en-us; generi
  63 29 20 41 70 70 6c 65 57 65 62 4b 69 74 2f 35c) AppleWebKit/5
  32 35 2e 31 30 2b 20 28 4b 48 54 4d 4c 2c 20 6c25.10+ (KHTML, l
  69 6b 65 20 47 65 63 6b 6f 29 20 56 65 72 73 69ike Gecko) Versi
  6f 6e 2f 33 2e 30 2e 34 20 4d 6f 62 69 6c 65 20on/3.0.4 Mobile
  53 61 66 61 72 69 2f 35 32 33 2e 31 32 2e 32 0dSafari/523.12.2.
  0a 63 6f 6f 6b 69 65 3a 20 50 52 45 46 3d 49 44.cookie: PREF=ID
  3d 39 62 32 37 62 30 63 34 62 62 33 63 63 61 62=9b27b0c4bb3ccab
  37 3a 54 4d 3d 31 32 33 37 39 30 34 35 35 31 3a7:TM=1237904551:
  4c 4d 3d 31 32 33 37 39 30 34 35 35 31 3a 53 3dLM=1237904551:S=
  63 76 38 69 4c 78 52 35 62 33 65 4f 67 54 59 44cv8iLxR5b3eOgTYD
  3b 20 4d 50 52 46 3d 48 34 73 49 41 41 41 41 41; MPRF=H4sIA
  41 41 41 41 4b 76 59 2d 65 44 6a 73 57 61 56 4cKvY-eDjsWaVL
  69 61 47 53 55 77 4b 4b 63 5a 6d 78 70 59 6d 79iaGSUwKKcZmxpYmy
  55 6e 6d 46 70 59 47 78 73 59 70 79 61 6d 57 78UnmFpYGxsYpyamWx
  6d 62 6d 78 67 61 57 78 67 61 70 68 6d 6b 70 5ambmxgaWxgaphmkpZ
  70 59 41 71 30 51 6b 6c 53 30 41 41 41 41 0d 0apYAq0QklS0..

 tcp:209.85.229.147:80(16): request sent, waiting for reply
 tcp:209.85.229.147:80(16): received 'HTTP/1.1 200 OK'
 tcp:209.85.229.147:80(16): reply first line ok
 tcp:209.85.229.147:80(16): received 'Via: 1.1 UKPROXY06'
 tcp:209.85.229.147:80(16): received 'Connection: Keep-Alive'
 tcp:209.85.229.147:80(16): received 'Proxy-Connection: Keep-Alive'
 tcp:209.85.229.147:80(16): received 'Transfer-Encoding: chunked'
 tcp:209.85.229.147:80(16): received 'Expires: Tue, 24 Mar 2009
 14:27:32 GMT'
 tcp:209.85.229.147:80(16): received 'Date: Tue, 24 Mar 2009 14:27:32
 GMT'
 tcp:209.85.229.147:80(16): received 'Content-Type: text/html;
 charset=UTF-8'
 tcp:209.85.229.147:80(16): received 'Server: GFE/1.3'
 tcp:209.85.229.147:80(16): received 'Set-Cookie:

 MPRF=H4sIAKvo62453qzSxcQwiUkhxdjM2NIkOcncwtLA2DglOdXS2Mzc2MDS2CDVMC3FzBIA_9vpxi0;
 expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.co.uk'
 tcp:209.85.229.147:80(16): received 'Cache-Control: private, max-
 age=1209600'
 tcp:209.85.229.147:80(16): received 

[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Al Sutton

JBQ,

Can you pass up the chain that the 'phrase

...you can be sure that you'll have an official SDK for a
cupcake-originated release as soon as possible.

should be planned to be a point in time (hopefully a couple of weeks) before
a carrier releases a device with it on.

I'm sure you're aware there's no bigger recipe for pain than when the first
people to test applications on a new release of a platform are users who are
trying out a new 'phone in a shop.

Al.


 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 24 March 2009 15:39
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK?


1.1 was essentially a update of a few Google-proprietary bits on top of the
same platform as 1.0.
From the point of view of the Android platform (and therefore of the SDK as
well), the differences between 1.0 and 1.1 are extremely minor.

Cupcake is a branch name, it's not a released version. A future numbered
release will be cut from the cupcake branch, but that product isn't ready
yet, and therefore there can be no SDK yet.

As cupcake contains significant platform changes compared to 1.0/1.1, you
can be sure that you'll have an official SDK for a cupcake-originated
release as soon as possible.

JBQ

On Tue, Mar 24, 2009 at 1:16 AM, tauntz tau...@gmail.com wrote:

 I just hope that this time the release date for the official SDK will 
 be BEFORE the update hits the masses. Not like it was with the 1.1SDK
 - it was released way after 1.1 was released to end-users (the 
 argument from Google was something in the lines of Hey, this is a 
 small release with no mayor changes so don't whine that you get it so 
 late). Maybe I'm the only one who thinks that this is ridiculous..
 One of the reasons why we don't have the official 1.5 (or cupcake or 
 however it will be officially called) SDK is that It's not stable 
 enough - fair enough but I really hope that you guys @ Google will 
 release it as soon as the code is stable enough (eg the code is tested 
 and ready to be released to the operators). That would give us a week 
 (maybe more) before the operators push it to the end-users.

 And don't come with the you can build your own SDK from the 
 opensource tree if you want - the last releases didn't come from the 
 opensource tree so even if I wanted, i couldn't build the SDK based on 
 the code that's shipped to the end-users. And even if this release 
 will actually come from the public tree, you can't expect all app 
 developers to build their own SDK, can you? We need an official SDK - 
 and we need it as soon as the tree is stable enough (and way before 
 it's pushed to the carriers/end-users)


 Tauno


 On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com wrote:

 Not if you stay anonymous (hint, hint) ;-)

 On Mar 23, 7:58 pm, Anonymous Anonymous 
 firewallbr...@googlemail.com
 wrote:
  Someone from Google?  makes it official i guess :D

 On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com
wrote:

  Can someone capable just compile the SDK and post it online for 
  everyone? Someone from Google? I dont really care if it's not 
  official, i just dont want to download the source tree just to 
  build the SDK, plus i need to do the tricks you mentioned to make 
  it work on windows.

  On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
   I certainly hope there aren't a lot of applications that use 
   reflection and private APIs.

   On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel 
   zl25dre...@gmail.com
  wrote:

Cupcake is coming, and as you know it will break a lot of apps 
in the market, those that use reflection  private api. So 
where is the Cupcake SDK/emulator for us to try our apps?

I know we can download the source codes and build it, and I 
know apps wont break if they dont use undocumented api, blah 
blah blah, but we should get an official SDK/emulator for 
cupcake, dont you think, google?
 


 




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

Questions sent directly to me that have no reason for being private will
likely get ignored or forwarded to a public forum with no further warning.




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

2009-03-24 Thread Robert Green

Well suhas,

I believe bluetooth is currently impossible but perhaps cupcake adds
capabilities to be able to talk to a peer?

As for Wifi, you will need to roll your own code.  This is because all
games need custom networking code unless they are built from an engine
which has it integrated.  A good common strategy is to have one device
act as the host and the other as the client.  The host really runs
the game and the client just updates its view and tells the host what
it would like to be doing.

If your game is fairly simple, say a player can only move and kick,
then your protocol is very easy on the input side.  The client throws
a move up or kick into the bytestream and when the host sees it,
it updates the position or state of everything and then sends that
back over to the client.  Unlike online games, wifi play doesn't have
the bandwidth constraint so you actually can send over almost a full
view of the world every network tic.  The client just positions
everything where the host says to and draws.

The loops are like this:

if (isHost) {
  processInputFromNetwork();  // other player moving and kicking
  processInputFromPlayer();  // this player moving and kicking
  updatePhysics();  // where is everything now?
  sendWorldToNetwork();  // tell the other player where everything is
now
  draw();
}

if (isClient) {
  processWorldFromNetwork();  // get the state of the world
  processInputFromPlayer();  // this player moving and kicking
  updatePhysics();  // combine what the host says the world is with
what we just did
  sendInputToNetwork();  // tell the host what we just did
  draw();  // draw it all
}

If your code runs really fast then you probably won't need
interpolation but it's generally a good idea just in case the host
gets laggy for some reason or if it is running on a slower phone.
People like using UDP because if there is a network problem, the
packets are just dropped, no biggie.  This is fine for the world view
because the client will just show choppiness, or maybe even seamless
updates if you do your interpolation right but if the player input
packets are dropped, it's a bad thing.  It's like pressing fire and
never having the thing fire.

This approach is good if you have modeled your world.  If you haven't,
I recommend taking that route.  If you want more than 2 players or
have a world with objects in it, you may want to use ghosting and have
the server manage the object IDs.

As for menus, I like having Host a Game and Join a Game options.
This makes the netcode simple.  When you Host, it just gets the IP
addr of the WiFi device using the Android API, then listens on a port
for clients.  Use TCP for that.  When you Join a game, it gets the IP
addr of the WiFi device and then attempts to connect to every IP in
the subnet on your Host's port.  If it connects and handshakes (think
MYGAME V/(version_number)) then it can get the game state and you can
begin the game or do whatever other steps are necessary there.  At
that point the host and client(s) know each other's IPs and can start
up their UDP listeners and throwers.

I recommend running the UDP side on its own thread.  That allows for
your game to just empty it's queue of stuff it has received and dump
some new stuff into it that goes to the client or host.

There are other ways to do this but this is how I handle stuff like
this and how Light Racer 3D's multiplayer will work (Coming in May).

On Mar 24, 9:36 am, suhas suhas.ga...@gmail.com wrote:
 Hi All,
 I have developed a sports game which is single player.
 Now I want to have one more game mode which is multiplayer.
 My question is how can i do device to device connection in android
 using sets of api which can be :

 1.Bluetooth - whose APIs are not currently available.
 2.gtalkservice - removed from sdk1.0
 3.wifi - I dont knw how to connect 2 devices using wifi apis . I have
 asked about wifi because we have developed a game on iphone which used
 wifi connection for multiplayer stuff.

 Or  is there any other apis which can be used for implementation of
 multiplayer in game ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Jean-Baptiste Queru

I'm personally involved in the relevant discussions, so you can rest
assured that the people who need to know do know already.

JBQ

On Tue, Mar 24, 2009 at 8:47 AM, Al Sutton a...@funkyandroid.com wrote:

 JBQ,

 Can you pass up the chain that the 'phrase

 ...you can be sure that you'll have an official SDK for a
 cupcake-originated release as soon as possible.

 should be planned to be a point in time (hopefully a couple of weeks) before
 a carrier releases a device with it on.

 I'm sure you're aware there's no bigger recipe for pain than when the first
 people to test applications on a new release of a platform are users who are
 trying out a new 'phone in a shop.

 Al.




 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
 Queru
 Sent: 24 March 2009 15:39
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK?


 1.1 was essentially a update of a few Google-proprietary bits on top of the
 same platform as 1.0.
 From the point of view of the Android platform (and therefore of the SDK as
 well), the differences between 1.0 and 1.1 are extremely minor.

 Cupcake is a branch name, it's not a released version. A future numbered
 release will be cut from the cupcake branch, but that product isn't ready
 yet, and therefore there can be no SDK yet.

 As cupcake contains significant platform changes compared to 1.0/1.1, you
 can be sure that you'll have an official SDK for a cupcake-originated
 release as soon as possible.

 JBQ

 On Tue, Mar 24, 2009 at 1:16 AM, tauntz tau...@gmail.com wrote:

 I just hope that this time the release date for the official SDK will
 be BEFORE the update hits the masses. Not like it was with the 1.1SDK
 - it was released way after 1.1 was released to end-users (the
 argument from Google was something in the lines of Hey, this is a
 small release with no mayor changes so don't whine that you get it so
 late). Maybe I'm the only one who thinks that this is ridiculous..
 One of the reasons why we don't have the official 1.5 (or cupcake or
 however it will be officially called) SDK is that It's not stable
 enough - fair enough but I really hope that you guys @ Google will
 release it as soon as the code is stable enough (eg the code is tested
 and ready to be released to the operators). That would give us a week
 (maybe more) before the operators push it to the end-users.

 And don't come with the you can build your own SDK from the
 opensource tree if you want - the last releases didn't come from the
 opensource tree so even if I wanted, i couldn't build the SDK based on
 the code that's shipped to the end-users. And even if this release
 will actually come from the public tree, you can't expect all app
 developers to build their own SDK, can you? We need an official SDK -
 and we need it as soon as the tree is stable enough (and way before
 it's pushed to the carriers/end-users)


 Tauno


 On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com wrote:

 Not if you stay anonymous (hint, hint) ;-)

 On Mar 23, 7:58 pm, Anonymous Anonymous
 firewallbr...@googlemail.com
 wrote:
  Someone from Google?  makes it official i guess :D

 On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com
 wrote:

  Can someone capable just compile the SDK and post it online for
  everyone? Someone from Google? I dont really care if it's not
  official, i just dont want to download the source tree just to
  build the SDK, plus i need to do the tricks you mentioned to make
  it work on windows.

  On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
   I certainly hope there aren't a lot of applications that use
   reflection and private APIs.

   On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel
   zl25dre...@gmail.com
  wrote:

Cupcake is coming, and as you know it will break a lot of apps
in the market, those that use reflection  private api. So
where is the Cupcake SDK/emulator for us to try our apps?

I know we can download the source codes and build it, and I
know apps wont break if they dont use undocumented api, blah
blah blah, but we should get an official SDK/emulator for
cupcake, dont you think, google?
 


 




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

 Questions sent directly to me that have no reason for being private will
 likely get ignored or forwarded to a public forum with no further warning.




 




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

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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

[android-developers] change background color on focus

2009-03-24 Thread zeeshan

Hi,

i need to have the default selection color (orange), here is my code

Button android:id=@+id/login

android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=left
android:background=@drawable/login_background
android:text=Login




/



login_background.xml


 ?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;

item android:state_focused=true android:state_pressed=true
android:drawable=@drawable/enter_button_pressed /
item android:state_focused=true android:state_pressed=false
 android:color=?  // this should be default color

 /

item android:state_focused=false android:state_pressed=true
android:drawable=@drawable/enter_button_pressed /

item android:drawable=@drawable/enter_button /
/selector


///

can i set just color on focus or i must need to put another image in
focused section?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread David Turner
Hmm.. Despite the fact that *this is what we want*, we cannot make a
guarantee that the Cupcake SDK will be officially released strictly before
the platform is available on retail phones.

Properly testing and packaging a SDK takes a lot of time, we *may* encounter
blocker bugs that have nothing to do with the software on the phone (e.g.
emulator crashes on platform X, ADB doesn't see emulator/devices on platform
Y, etc..). While we test the SDK frequently during development, doing the
necessary job to ensure that it's not going to break on the machines of all
people who download it from the official repository takes some time. And
then, the web site needs to be updated, especially the documentation needs
to reflect the new features / fixes / etc...

But apart from that, I don't see a reason why *this* SDK would lag behind,
and as I said, we want it to be released ASAP.

On Tue, Mar 24, 2009 at 4:47 PM, Al Sutton a...@funkyandroid.com wrote:


 JBQ,

 Can you pass up the chain that the 'phrase

 ...you can be sure that you'll have an official SDK for a
 cupcake-originated release as soon as possible.

 should be planned to be a point in time (hopefully a couple of weeks)
 before
 a carrier releases a device with it on.

 I'm sure you're aware there's no bigger recipe for pain than when the first
 people to test applications on a new release of a platform are users who
 are
 trying out a new 'phone in a shop.

 Al.




 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
 Queru
 Sent: 24 March 2009 15:39
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Cupcake coming in April? Where is the
 SDK?


 1.1 was essentially a update of a few Google-proprietary bits on top of the
 same platform as 1.0.
 From the point of view of the Android platform (and therefore of the SDK as
 well), the differences between 1.0 and 1.1 are extremely minor.

 Cupcake is a branch name, it's not a released version. A future numbered
 release will be cut from the cupcake branch, but that product isn't ready
 yet, and therefore there can be no SDK yet.

 As cupcake contains significant platform changes compared to 1.0/1.1, you
 can be sure that you'll have an official SDK for a cupcake-originated
 release as soon as possible.

 JBQ

 On Tue, Mar 24, 2009 at 1:16 AM, tauntz tau...@gmail.com wrote:
 
  I just hope that this time the release date for the official SDK will
  be BEFORE the update hits the masses. Not like it was with the 1.1SDK
  - it was released way after 1.1 was released to end-users (the
  argument from Google was something in the lines of Hey, this is a
  small release with no mayor changes so don't whine that you get it so
  late). Maybe I'm the only one who thinks that this is ridiculous..
  One of the reasons why we don't have the official 1.5 (or cupcake or
  however it will be officially called) SDK is that It's not stable
  enough - fair enough but I really hope that you guys @ Google will
  release it as soon as the code is stable enough (eg the code is tested
  and ready to be released to the operators). That would give us a week
  (maybe more) before the operators push it to the end-users.
 
  And don't come with the you can build your own SDK from the
  opensource tree if you want - the last releases didn't come from the
  opensource tree so even if I wanted, i couldn't build the SDK based on
  the code that's shipped to the end-users. And even if this release
  will actually come from the public tree, you can't expect all app
  developers to build their own SDK, can you? We need an official SDK -
  and we need it as soon as the tree is stable enough (and way before
  it's pushed to the carriers/end-users)
 
 
  Tauno
 
 
  On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com
 wrote:
 
  Not if you stay anonymous (hint, hint) ;-)
 
  On Mar 23, 7:58 pm, Anonymous Anonymous
  firewallbr...@googlemail.com
  wrote:
   Someone from Google?  makes it official i guess :D
 
  On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com
 wrote:
 
   Can someone capable just compile the SDK and post it online for
   everyone? Someone from Google? I dont really care if it's not
   official, i just dont want to download the source tree just to
   build the SDK, plus i need to do the tricks you mentioned to make
   it work on windows.
 
   On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
I certainly hope there aren't a lot of applications that use
reflection and private APIs.
 
On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel
zl25dre...@gmail.com
   wrote:
 
 Cupcake is coming, and as you know it will break a lot of apps
 in the market, those that use reflection  private api. So
 where is the Cupcake SDK/emulator for us to try our apps?
 
 I know we can download the source codes and build it, and I
 know apps wont break if they dont use 

[android-developers] Re: api to install update apk in private-app folder

2009-03-24 Thread Zi Yong Chua

Its not possible to do the install or to install it in app-private may
I ask?

On Mar 24, 11:38 pm, Mark Murphy mmur...@commonsware.com wrote:
 Zi Yong Chua wrote:
  I have a question with regards to an update feature that I am trying
  to put in my application. I am wondering if it is possible for an
  application to download a new apk and install it inside the /data/app-
  private folder (which i presume is for copy protected apps)?

 I do not believe that is possible.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Training:http://commonsware.com/training.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to change the tab icon dynamically

2009-03-24 Thread manoj

can any one please help me. Its requirement of the client.

On Mar 24, 10:19 am, manoj manojkumar.m...@gmail.com wrote:
 Hi,

 I have a tab activity with 3 tabs. Each tab has a default icon.

 I want these icons have to be changed dynamically on each tab
 selected.

 I mean, each tab has two icons, one for on tab select, another for on
 tab deselect.

 Can any one please suggest me how to do it?

 Here is my sample code:

          tabHost = getTabHost();

          tabHost.addTab(tabHost.newTabSpec(tab1)
                  .setIndicator(Content,getResources().getDrawable
 (R.drawable.main))
                  .setContent(new Intent(this, ACTIVITY1.class)));//
 (listIntent));
          tabHost.addTab(tabHost.newTabSpec(tab2)
                  .setIndicator(Help,getResources().getDrawable
 (R.drawable.help))
                  .setContent( new Intent(this, ACTIVITY2.class)));
          tabHost.addTab(tabHost.newTabSpec(tab3)
                  .setIndicator(About,getResources().getDrawable
 (R.drawable.about))
                  .setContent( new Intent(this, ACTIVITY3.class)));

 please help me.

 Thanks,
 Manoj.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: api to install update apk in private-app folder

2009-03-24 Thread Mark Murphy

Zi Yong Chua wrote:
 Its not possible to do the install or to install it in app-private may
 I ask?

You cannot directly install anything.

At best, you can hand the APK off to the system, and Android can install
it, but I do not believe you can control where it gets installed (that's
up to Android). This is what happens when you download an APK, at any
rate -- I assume there is some what to trigger the same code from your
own application.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: How to change the tab icon dynamically

2009-03-24 Thread Mark Murphy

manoj wrote:
 can any one please help me. Its requirement of the client.

You can try holding onto the TabHost.TabSpec objects you create and call
setIndicator() again when the icon changes. I have no idea if that will
work.

You might try subclassing TabHost and see if you can handle the icon
change yourself, though I have no idea if this is possible, and you
would need to not use TabActivity (which, IIRC, creates its own TabHost
object).

You can always roll your own tab-style UI using a ViewFlipper or similar
widget.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread roland

Totally agree, Apple just release their 3.0 SDK beta for who has
purchased iPhone Developer Program. The final version comes in June,
so iphone developer has 3 months to familiar the new OS and let their
applications get all the new features. I hope all of us, who are
interested in Android, and who wish to make fantastic application in
Android platform could get a little bit more official information
before every final release.


On 24 mar, 09:16, tauntz tau...@gmail.com wrote:
 I just hope that this time the release date for the official SDK will
 be BEFORE the update hits the masses. Not like it was with the 1.1SDK
 - it was released way after 1.1 was released to end-users (the
 argument from Google was something in the lines of Hey, this is a
 small release with no mayor changes so don't whine that you get it so
 late). Maybe I'm the only one who thinks that this is ridiculous..
 One of the reasons why we don't have the official 1.5 (or cupcake or
 however it will be officially called) SDK is that It's not stable
 enough - fair enough but I really hope that you guys @ Google will
 release it as soon as the code is stable enough (eg the code is tested
 and ready to be released to the operators). That would give us a week
 (maybe more) before the operators push it to the end-users.

 And don't come with the you can build your own SDK from the
 opensource tree if you want - the last releases didn't come from the
 opensource tree so even if I wanted, i couldn't build the SDK based on
 the code that's shipped to the end-users. And even if this release
 will actually come from the public tree, you can't expect all app
 developers to build their own SDK, can you? We need an official SDK -
 and we need it as soon as the tree is stable enough (and way before
 it's pushed to the carriers/end-users)

 Tauno

 On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com wrote:

  Not if you stay anonymous (hint, hint) ;-)

  On Mar 23, 7:58 pm, Anonymous Anonymous firewallbr...@googlemail.com
  wrote:
   Someone from Google?  makes it official i guess :D

  On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com wrote:

   Can someone capable just compile the SDK and post it online for
   everyone? Someone from Google? I dont really care if it's not
   official, i just dont want to download the source tree just to build
   the SDK, plus i need to do the tricks you mentioned to make it work on
   windows.

   On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
I certainly hope there aren't a lot of applications that use
reflection and private APIs.

On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel zl25dre...@gmail.com
   wrote:

 Cupcake is coming, and as you know it will break a lot of apps in the
 market, those that use reflection  private api. So where is the
 Cupcake SDK/emulator for us to try our apps?

 I know we can download the source codes and build it, and I know apps
 wont break if they dont use undocumented api, blah blah blah, but we
 should get an official SDK/emulator for cupcake, dont you think,
 google?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Multiple ListViews in one Activity

2009-03-24 Thread Wouter

I now have another problem.
i now have multiple listviews in my listactivity.
When i reach the bottom of the screen one of the lists put scrollbars
in the listview.
But i cant scroll the whole activity! I cannot scroll when i have a
long list.How can i fix this?
putting the listviews in a scrollview?

On Mar 24, 12:48 pm, Mark Murphy mmur...@commonsware.com wrote:
 Wouter wrote:
  I now have different Listviews and I have different contextmenu's for
  these listviews because they need different actions.
  But i want to do this for the options menu to.

 The options menu is for the activity. Context menus are for the widget.

  Can i create a
  different options menu listener for every listview?

 No.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.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] Localizing layouts?

2009-03-24 Thread BoD

Hi!
Is it possible to localize layouts (in the same way you can have a
'por' and a 'land' layout?

As you may know some languages are less 'verbose' than others, thus
sometimes layout adjustments might be needed according to the current
language.

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



[android-developers] Re: Implications of Using Non Standard Packages

2009-03-24 Thread jason.delport

Many thanks to both of you for your responses.

Cheers,

Jason

On Mar 23, 5:30 pm, Dianne Hackborn hack...@android.com wrote:
 Also com.google.android.maps is an optional API provided by Google that is
 not part of Android, so there will be phones that don't have it.  This is
 why you need to declare its use in the manifest, so that Market and the
 system can know your app won't work.





 On Mon, Mar 23, 2009 at 10:28 AM, Romain Guy romain...@google.com wrote:

  Your app is likely to break.

  More precisely, it depends on the package. For instance, the
  com.google.android.maps package is a public API and won't change.
  However, packages like com.android.internal or even com.android.*
  contain private APIs and are subject to changes at anytime.

  On Mon, Mar 23, 2009 at 4:28 AM, jason.delport jason.delp...@gmail.com
  wrote:

   Hi Android Developers,

   What are the implications for future Android device releases if we are
   using non-standard packages such as com.google.android.maps?

   Thanks in advance.

   Regards,

   Jason Delport

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

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Multiple ListViews in one Activity

2009-03-24 Thread Mark Murphy

Wouter wrote:
 I now have another problem.
 i now have multiple listviews in my listactivity.
 When i reach the bottom of the screen one of the lists put scrollbars
 in the listview.
 But i cant scroll the whole activity! I cannot scroll when i have a
 long list.How can i fix this?
 putting the listviews in a scrollview?

I don't think you can. I am assuming from your problem that you are
trying to have one ListView stacked above the other ListView.

If so, I would strongly encourage you to consider:

-- Putting all the items in one ListView, perhaps with some sort of
visual separator, as described by Jeff Sharkey (see below URL) or my
Advanced Android book

http://www.jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/

-- Putting the lists side-by-side rather than stacked

-- Switching one to a Spinner

-- Using tabs, ViewFlipper, or some other means to have the lists on
separate screens

-- Using separate activities, one per list

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] ProgressDialog is not showing...

2009-03-24 Thread mat

Hi,
I know that this is common problem, but still I cannot find the
answer...

I have two classes:
InternetConnection extends Activity
ConnectionChangeReceiver extends BroadcastReceiver

From ConnectionChangeReceiver I'm calling InternetConnection method
which is refreshing UI when Internet connection is changed. The
problem is that during refresh operation I'd like to show
ProgressDialog which actually is never visible !!

So broadcast class looks like:
public class ConnectionChangeReceiver extends BroadcastReceiver {

private InternetConnection internetConnection;
@Override
public void onReceive(Context context, Intent intent)  {
mRefreshingDialog = ProgressDialog.show(TimeCard.this, , msg,
true);

   new Thread() {
public void run() {
login(mResult);
mHandler.post(new Runnable() {
public void run() {
/** doing some UI staff 
... **/

internetConnection.refreshUI();


mRefreshingDialog.dismiss();
}
});
}
}.start();
}
}

Do you know why mRefreshingDialog is not visible ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Multiple ListViews in one Activity

2009-03-24 Thread Wouter

 Wouter wrote:
  I now have another problem.
  i now have multiple listviews in my listactivity.
  When i reach the bottom of the screen one of the lists put scrollbars
  in the listview.
  But i cant scroll the whole activity! I cannot scroll when i have a
  long list.How can i fix this?
  putting the listviews in a scrollview?

 I don't think you can. I am assuming from your problem that you are
 trying to have one ListView stacked above the other ListView.

Yes I have, i have now 2 listviews above each other..

 If so, I would strongly encourage you to consider:
 -- Putting all the items in one ListView, perhaps with some sort of
 visual separator, as described by Jeff Sharkey (see below URL) or my
 Advanced Android book

 http://www.jsharkey.org/blog/2008/08/18/separating-lists-with-headers...

I have multiple lists because every list uses another database adapter
for getting data from a database. And also the onItemClick must be
different for every list!
Would i be able to still do this when I make one listview?

 -- Putting the lists side-by-side rather than stacked

What do you mean with this?
 -- Switching one to a Spinner

 -- Using tabs, ViewFlipper, or some other means to have the lists on
 separate screens

I will try now to put it in a viewflipper!

 -- Using separate activities, one per list

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Multiple ListViews in one Activity

2009-03-24 Thread Mark Murphy

Wouter wrote:
 I have multiple lists because every list uses another database adapter
 for getting data from a database. And also the onItemClick must be
 different for every list!
 Would i be able to still do this when I make one listview?

You would only have one onItemClick and would have to determine what you
want to do in that case. Also, you would only have one context menu. On
the other hand, your scrolling would work better.

 -- Putting the lists side-by-side rather than stacked
 
 What do you mean with this?

Left to right rather than top to bottom.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Al Sutton

I'm personally involved in the relevant discussions...

That phrase alone gives me some hope... :).

Al. 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 24 March 2009 15:57
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK?


I'm personally involved in the relevant discussions, so you can rest assured
that the people who need to know do know already.

JBQ

On Tue, Mar 24, 2009 at 8:47 AM, Al Sutton a...@funkyandroid.com wrote:

 JBQ,

 Can you pass up the chain that the 'phrase

 ...you can be sure that you'll have an official SDK for a 
 cupcake-originated release as soon as possible.

 should be planned to be a point in time (hopefully a couple of weeks) 
 before a carrier releases a device with it on.

 I'm sure you're aware there's no bigger recipe for pain than when the 
 first people to test applications on a new release of a platform are 
 users who are trying out a new 'phone in a shop.

 Al.




 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of 
 Jean-Baptiste Queru
 Sent: 24 March 2009 15:39
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Cupcake coming in April? Where is the
SDK?


 1.1 was essentially a update of a few Google-proprietary bits on top 
 of the same platform as 1.0.
 From the point of view of the Android platform (and therefore of the 
 SDK as well), the differences between 1.0 and 1.1 are extremely minor.

 Cupcake is a branch name, it's not a released version. A future 
 numbered release will be cut from the cupcake branch, but that product 
 isn't ready yet, and therefore there can be no SDK yet.

 As cupcake contains significant platform changes compared to 1.0/1.1, 
 you can be sure that you'll have an official SDK for a 
 cupcake-originated release as soon as possible.

 JBQ

 On Tue, Mar 24, 2009 at 1:16 AM, tauntz tau...@gmail.com wrote:

 I just hope that this time the release date for the official SDK will 
 be BEFORE the update hits the masses. Not like it was with the 1.1SDK
 - it was released way after 1.1 was released to end-users (the 
 argument from Google was something in the lines of Hey, this is a 
 small release with no mayor changes so don't whine that you get it so 
 late). Maybe I'm the only one who thinks that this is ridiculous..
 One of the reasons why we don't have the official 1.5 (or cupcake or 
 however it will be officially called) SDK is that It's not stable 
 enough - fair enough but I really hope that you guys @ Google will 
 release it as soon as the code is stable enough (eg the code is 
 tested and ready to be released to the operators). That would give us 
 a week (maybe more) before the operators push it to the end-users.

 And don't come with the you can build your own SDK from the 
 opensource tree if you want - the last releases didn't come from the 
 opensource tree so even if I wanted, i couldn't build the SDK based 
 on the code that's shipped to the end-users. And even if this release 
 will actually come from the public tree, you can't expect all app 
 developers to build their own SDK, can you? We need an official SDK - 
 and we need it as soon as the tree is stable enough (and way before 
 it's pushed to the carriers/end-users)


 Tauno


 On Tue, Mar 24, 2009 at 2:38 AM, AndroidApp zl25dre...@gmail.com wrote:

 Not if you stay anonymous (hint, hint) ;-)

 On Mar 23, 7:58 pm, Anonymous Anonymous 
 firewallbr...@googlemail.com
 wrote:
  Someone from Google?  makes it official i guess :D

 On Tue, Mar 24, 2009 at 12:47 AM, AndroidApp zl25dre...@gmail.com
 wrote:

  Can someone capable just compile the SDK and post it online for 
  everyone? Someone from Google? I dont really care if it's not 
  official, i just dont want to download the source tree just to 
  build the SDK, plus i need to do the tricks you mentioned to make 
  it work on windows.

  On Mar 23, 1:11 pm, Marco Nelissen marc...@android.com wrote:
   I certainly hope there aren't a lot of applications that use 
   reflection and private APIs.

   On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel 
   zl25dre...@gmail.com
  wrote:

Cupcake is coming, and as you know it will break a lot of 
apps in the market, those that use reflection  private api. 
So where is the Cupcake SDK/emulator for us to try our apps?

I know we can download the source codes and build it, and I 
know apps wont break if they dont use undocumented api, blah 
blah blah, but we should get an official SDK/emulator for 
cupcake, dont you think, google?
 


 




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

 Questions sent directly to me that have no reason for being private 
 will likely get ignored or forwarded to a public forum with no further
warning.




 




--
Jean-Baptiste M. JBQ 

[android-developers] Re: http proxy and chunked encoding with emulator

2009-03-24 Thread m5p3nc3r

This is great news.  If you want me to test anything here, I am more
than happy to do this.  (It would also mean that I get a working
emulator before the official 1.1 r2 release :)

On Mar 24, 3:42 pm, David Turner di...@android.com wrote:
 Thanks a lot, I could find a bug in the http rewriter source code. It is
 triggered by the Keep-Alive + chunked reply.
 I'll file a bug for it and start working on it.

 However, I'd like to be able to test it. Anyone knows a proxy that can be
 setup to answer this way ?

 On Tue, Mar 24, 2009 at 4:22 PM, m5p3nc3r matt...@thespencers.me.uk wrote:

  Sorry for the large blob, but here goes:

  http_service_connect: trying to connect to 209.85.229.147 on port 80
  http_service_connect: using HTTP rewriter
  tcp:209.85.229.147:80(16): connecting
  tcp:209.85.229.147:80(16): connected to proxy
  tcp:209.85.229.147:80(16): socket pair created
  tcp:209.85.229.147:80(16): received 'GET / HTTP/1.1'
  tcp:209.85.229.147:80(16): request first line ok
  tcp:209.85.229.147:80(16): received 'Host:www.google.co.uk'
  tcp:209.85.229.147:80(16): received 'Accept-Encoding: gzip'
  tcp:209.85.229.147:80(16): received 'Accept: text/xml,application/
  xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/
  *;q=0.5'
  tcp:209.85.229.147:80(16): received 'User-Agent: Mozilla/5.0 (Linux;
  U; Android 1.1; en-us; generic) AppleWebKit/525.10+ (KHTML, like
  Gecko) Version/3.0.4 Mobile Safari/523.12.2'
  tcp:209.85.229.147:80(16): received 'cookie:
  PREF=ID=9b27b0c4bb3ccab7:TM=1237904551:LM=1237904551:S=cv8iLxR5b3eOgTYD;
  MPRF=H4sIAKvY-
  eDjsWaVLiaGSUwKKcZmxpYmyUnmFpYGxsYpyamWxmbmxgaWxgaphmkpZpYAq0QklS0'
  tcp:209.85.229.147:80(16): received 'Accept-Language: en-US'
  tcp:209.85.229.147:80(16): received 'Accept-Charset: utf-8,
  iso-8859-1, utf-16, *;q=0.7'
  tcp:209.85.229.147:80(16): received ''
  tcp:209.85.229.147:80(16): request headers ok
  tcp:209.85.229.147:80(16): sending 643 bytes:
   47 45 54 20 68 74 74 70 3a 2f 2f 77 77 77 2e 67    GEThttp://www.g
   6f 6f 67 6c 65 2e 63 6f 2e 75 6b 2f 20 48 54 54    oogle.co.uk/ HTT
   50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 77 77 77    P/1.1..Host: www
   2e 67 6f 6f 67 6c 65 2e 63 6f 2e 75 6b 0d 0a 41    .google.co.uk..A
   63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20    ccept-Encoding:
   67 7a 69 70 0d 0a 41 63 63 65 70 74 3a 20 74 65    gzip..Accept: te
   78 74 2f 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69    xt/xml,applicati
   6f 6e 2f 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69    on/xml,applicati
   6f 6e 2f 78 68 74 6d 6c 2b 78 6d 6c 2c 74 65 78    on/xhtml+xml,tex
   74 2f 68 74 6d 6c 3b 71 3d 30 2e 39 2c 74 65 78    t/html;q=0.9,tex
   74 2f 70 6c 61 69 6e 3b 71 3d 30 2e 38 2c 69 6d    t/plain;q=0.8,im
   61 67 65 2f 70 6e 67 2c 2a 2f 2a 3b 71 3d 30 2e    age/png,*/*;q=0.
   35 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d    5..User-Agent: M
   6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 4c 69 6e 75    ozilla/5.0 (Linu
   78 3b 20 55 3b 20 41 6e 64 72 6f 69 64 20 31 2e    x; U; Android 1.
   31 3b 20 65 6e 2d 75 73 3b 20 67 65 6e 65 72 69    1; en-us; generi
   63 29 20 41 70 70 6c 65 57 65 62 4b 69 74 2f 35    c) AppleWebKit/5
   32 35 2e 31 30 2b 20 28 4b 48 54 4d 4c 2c 20 6c    25.10+ (KHTML, l
   69 6b 65 20 47 65 63 6b 6f 29 20 56 65 72 73 69    ike Gecko) Versi
   6f 6e 2f 33 2e 30 2e 34 20 4d 6f 62 69 6c 65 20    on/3.0.4 Mobile
   53 61 66 61 72 69 2f 35 32 33 2e 31 32 2e 32 0d    Safari/523.12.2.
   0a 63 6f 6f 6b 69 65 3a 20 50 52 45 46 3d 49 44    .cookie: PREF=ID
   3d 39 62 32 37 62 30 63 34 62 62 33 63 63 61 62    =9b27b0c4bb3ccab
   37 3a 54 4d 3d 31 32 33 37 39 30 34 35 35 31 3a    7:TM=1237904551:
   4c 4d 3d 31 32 33 37 39 30 34 35 35 31 3a 53 3d    LM=1237904551:S=
   63 76 38 69 4c 78 52 35 62 33 65 4f 67 54 59 44    cv8iLxR5b3eOgTYD
   3b 20 4d 50 52 46 3d 48 34 73 49 41 41 41 41 41    ; MPRF=H4sIA
   41 41 41 41 4b 76 59 2d 65 44 6a 73 57 61 56 4c    KvY-eDjsWaVL
   69 61 47 53 55 77 4b 4b 63 5a 6d 78 70 59 6d 79    iaGSUwKKcZmxpYmy
   55 6e 6d 46 70 59 47 78 73 59 70 79 61 6d 57 78    UnmFpYGxsYpyamWx
   6d 62 6d 78 67 61 57 78 67 61 70 68 6d 6b 70 5a    mbmxgaWxgaphmkpZ
   70 59 41 71 30 51 6b 6c 53 30 41 41 41 41 0d 0a    pYAq0QklS0..

  tcp:209.85.229.147:80(16): request sent, waiting for reply
  tcp:209.85.229.147:80(16): received 'HTTP/1.1 200 OK'
  tcp:209.85.229.147:80(16): reply first line ok
  tcp:209.85.229.147:80(16): received 'Via: 1.1 UKPROXY06'
  tcp:209.85.229.147:80(16): received 'Connection: Keep-Alive'
  tcp:209.85.229.147:80(16): received 'Proxy-Connection: Keep-Alive'
  tcp:209.85.229.147:80(16): received 'Transfer-Encoding: chunked'
  tcp:209.85.229.147:80(16): received 'Expires: Tue, 24 Mar 2009
  14:27:32 GMT'
  tcp:209.85.229.147:80(16): received 'Date: Tue, 24 Mar 2009 14:27:32
  GMT'
  tcp:209.85.229.147:80(16): received 'Content-Type: text/html;
  charset=UTF-8'
  tcp:209.85.229.147:80(16): received 'Server: GFE/1.3'
  tcp:209.85.229.147:80(16): received 

[android-developers] Re: Localizing layouts?

2009-03-24 Thread BoD

Thanks a lot, I saw this doc but I guess I read it a bit too fast, and
I was unsure the suffixing applied also to layouts.
Cheers!

BoD


On Mar 24, 5:27 pm, Mark Murphy mmur...@commonsware.com wrote:
 BoD wrote:
  Hi!
  Is it possible to localize layouts (in the same way you can have a
  'por' and a 'land' layout?

  As you may know some languages are less 'verbose' than others, thus
  sometimes layout adjustments might be needed according to the current
  language.

 Sure!

 http://developer.android.com/guide/topics/resources/resources-i18n.ht...

 For English and German, for example, you would need:

 res/layout-en-land
 res/layout-de-land
 res/layout-de (for portrait -- or use layout-de-port)
 res/layout (for English portrait)

 The language code must precede the orientation code.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Bundles and serializable objects - what is actually stored?

2009-03-24 Thread Dianne Hackborn
When you put a serializable into a bundle, the bundle holds on to the object
reference UNTIL it needs to be marshalled across processes.  At that point
it will get serialized into a byte stream, the bundle will be written into a
parcel, and the other side will receive a new bundle object with a different
serializable object.

Pretty much everywhere Bundle is used in the system, it will go through an
IPC at some point, so you need to assume the objects in it will get
serialized.  About the only exception to that is the Bundle in Message,
since Message normally doesn't go across processes unless sent through a
Messenger.  But if you are using the normal local Message sending facility,
there is really no reason to use the Bundle there, since you can just stick
whatever you want (including a HashMap of multiple items or your own custom
cloass) in the 'obj' field.

Also I strongly recommend staying away from serialization.  It is super
super slow compared to Parcelable.

On Tue, Mar 24, 2009 at 3:20 AM, Matthias m.kaepp...@googlemail.com wrote:


 Hi,

 I was wondering about the behavior of Bundles and serializable
 objects. If I put a serializable object into a bundle, what is
 serialized then, the reference to the object or the object itself?

 I always assumed that the object itself would be serialized to a byte
 stream when calling putExtra() and re-created from that representation
 when calling getSerializableExtra(), but I recently stumbled upon a
 piece of code that put an entire view into a Bundle in thread A,
 retrieved it from that bundle in thread B, performed a modification on
 it and this modification actually became visible. This can only happen
 if the reference to that view was stored, not the view itself, right?
 Otherwise, the modification had been applied to a copy of that view
 and would be meaningless.
 



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

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

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



[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Al Sutton
Dave,
 
I understand the effort involved, but the choice for any SDK is really;
 
a) Release the SDK before the devices and let developers test and prepare
their apps.
 
b) Allow users to start buying a device which may not properly run the
applications available from Market.
 
This is a no-brainer and in order to not appear like a piece of half-thought
out technology the answer has to be a. 
 
Apple understand this. Microsoft understand this. Symbian understand this.
RIM understand this. This is why they all have developer programmes which
give previews of upcoming OS releases and features. To ignore this fact is
like signing a death warrant on the general publics perception of Android.
 
I know that you're going to make every effort to make sure it does happen,
but from a users point of view being told well we did try just doesn't cut
the mustard. Being told they may encounter problems using applications from
Googles market running on a Google branded phone downloaded directly on the
'phone is just going to look really poor. After all who wouldn't be mad if
they bought a Ford car which turned up with an Ford accessories catalogue,
bought some stuff from the accessories catalogue, waited for it to arrive,
tried to fit it, find out it doesn't work, 'phone up Ford, only to be told
Oh yeah, we left it in the catalogue, but the accessory manufacturer had no
way of testing if it worked because we couldn't do that for them (although
given Google Support Desk the user will probably just get told It's an app
problem, it's the developers fault).
 
This is one of the few occasions where I think a marketing persons view
could be of use.
 
Al.
 
 


  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of David Turner
Sent: 24 March 2009 16:01
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK?


Hmm.. Despite the fact that this is what we want, we cannot make a guarantee
that the Cupcake SDK will be officially released strictly before the
platform is available on retail phones.

Properly testing and packaging a SDK takes a lot of time, we may encounter
blocker bugs that have nothing to do with the software on the phone (e.g.
emulator crashes on platform X, ADB doesn't see emulator/devices on platform
Y, etc..). While we test the SDK frequently during development, doing the
necessary job to ensure that it's not going to break on the machines of all
people who download it from the official repository takes some time. And
then, the web site needs to be updated, especially the documentation needs
to reflect the new features / fixes / etc...

But apart from that, I don't see a reason why this SDK would lag behind, and
as I said, we want it to be released ASAP.


On Tue, Mar 24, 2009 at 4:47 PM, Al Sutton a...@funkyandroid.com wrote:



JBQ,

Can you pass up the chain that the 'phrase

...you can be sure that you'll have an official SDK for a

cupcake-originated release as soon as possible.


should be planned to be a point in time (hopefully a couple of weeks) before
a carrier releases a device with it on.

I'm sure you're aware there's no bigger recipe for pain than when the first
people to test applications on a new release of a platform are users who are
trying out a new 'phone in a shop.

Al.





-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
Queru
Sent: 24 March 2009 15:39
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK?


1.1 was essentially a update of a few Google-proprietary bits on top of the
same platform as 1.0.
From the point of view of the Android platform (and therefore of the SDK as
well), the differences between 1.0 and 1.1 are extremely minor.

Cupcake is a branch name, it's not a released version. A future numbered
release will be cut from the cupcake branch, but that product isn't ready
yet, and therefore there can be no SDK yet.

As cupcake contains significant platform changes compared to 1.0/1.1, you
can be sure that you'll have an official SDK for a cupcake-originated
release as soon as possible.

JBQ

On Tue, Mar 24, 2009 at 1:16 AM, tauntz tau...@gmail.com wrote:

 I just hope that this time the release date for the official SDK will
 be BEFORE the update hits the masses. Not like it was with the 1.1SDK
 - it was released way after 1.1 was released to end-users (the
 argument from Google was something in the lines of Hey, this is a
 small release with no mayor changes so don't whine that you get it so
 late). Maybe I'm the only one who thinks that this is ridiculous..
 One of the reasons why we don't have the official 1.5 (or cupcake or
 however it will be officially called) SDK is that It's not stable
 enough - fair enough but I really hope that you guys @ Google will
 release it as soon as the code is stable enough 

[android-developers] Re: No window to dispatch pointer action 1 onTouchEvent problem

2009-03-24 Thread mcmc

This is also happening to me. :(

On a down click, i get No window to dispatch pointer action 0
When I let go of the mousem i get No window to dispatch pointer
action 1

This happens after I hold the mouse down for a while...

please help.

On Feb 3, 7:23 am, ad avra...@gmail.com wrote:
 Does anybody have any idea why I get often(but not always) error
 during the on touch event?
 Handling touch events is freezed for few seconds(this appears only
 immediately after application start).
 Then Error screen appears (choose wait of close). When I choose wait
 after few seconds screen is starting to process events. I'm using
 surfaceView with thread for painting.
 In logcat I get something like :
 No window to dispatch pointer action 1

  Key dispatching timed out sending to com.myApp
  ANR (application not responding) in process: com.myApp
  Annotation: keyDispatchingTimedOut
  CPU usage:
  Load: 4.21 / 4.46 / 4.63
  CPU usage from 8200ms to 24ms ago:
    com.myApp: 92% = 91% user + 0% kernel
    system_server: 5% = 3% user + 2% kernel
    android.process.acore: 1% = 1% user + 0% kernel
    synaptics_wq: 0% = 0% user + 0% kernel
    akmd: 0% = 0% user + 0% kernel
    events/0: 0% = 0% user + 0% kernel
    mediaserver: 0% = 0% user + 0% kernel
    tiwlan_wifi_wq: 0% = 0% user + 0% kernel
    logcat: 0% = 0% user + 0% kernel
  TOTAL: 100% = 96% user + 3% kernel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Ivan Soto
Completely agree,
This is one of the main issues I see in the platform. I can understand when
they say that different devices can run different versions/revisions of the
OS but that's only causing a fragmentation of the platform which won't be
any good for both users and developers.

I can already see the Market in the future to be like  **Tested on
G1-G2-Omnia**  OR having applications released for some phones only if the
Market gives that option in the future.

The ability to have an early access to the next SDK is specifically so we
can properly test applications before users. I'm pretty sure that if they
release the SDK as late as they did last time, with a major upgrade like the
one coming from the cupcake branch will break a lot of apps from the market.

I'm pretty sure I don't know enough about the entire project to say this but
I still see this a little unorganized (or rushed).


Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Tue, Mar 24, 2009 at 11:05 AM, Al Sutton a...@funkyandroid.com wrote:

  Dave,

 I understand the effort involved, but the choice for any SDK is really;

 a) Release the SDK before the devices and let developers test and prepare
 their apps.

 b) Allow users to start buying a device which may not properly run the
 applications available from Market.

 This is a no-brainer and in order to not appear like a piece of
 half-thought out technology the answer has to be a.

 Apple understand this. Microsoft understand this. Symbian understand this.
 RIM understand this. This is why they all have developer programmes which
 give previews of upcoming OS releases and features. To ignore this fact is
 like signing a death warrant on the general publics perception of Android.

 I know that you're going to make every effort to make sure it does happen,
 but from a users point of view being told well we did try just doesn't cut
 the mustard. Being told they may encounter problems using applications from
 Googles market running on a Google branded phone downloaded directly on the
 'phone is just going to look really poor. After all who wouldn't be mad if
 they bought a Ford car which turned up with an Ford accessories catalogue,
 bought some stuff from the accessories catalogue, waited for it to arrive,
 tried to fit it, find out it doesn't work, 'phone up Ford, only to be told
 Oh yeah, we left it in the catalogue, but the accessory manufacturer had no
 way of testing if it worked because we couldn't do that for them (although
 given Google Support Desk the user will probably just get told It's an app
 problem, it's the developers fault).

 This is one of the few occasions where I think a marketing persons view
 could be of use.

 Al.



  --
 *From:* android-developers@googlegroups.com [mailto:
 android-develop...@googlegroups.com] *On Behalf Of *David Turner
 *Sent:* 24 March 2009 16:01

 *To:* android-developers@googlegroups.com
 *Subject:* [android-developers] Re: Cupcake coming in April? Where is the
 SDK?

 Hmm.. Despite the fact that *this is what we want*, we cannot make a
 guarantee that the Cupcake SDK will be officially released strictly before
 the platform is available on retail phones.

 Properly testing and packaging a SDK takes a lot of time, we *may*encounter 
 blocker bugs that have nothing to do with the software on the
 phone (e.g. emulator crashes on platform X, ADB doesn't see emulator/devices
 on platform Y, etc..). While we test the SDK frequently during development,
 doing the necessary job to ensure that it's not going to break on the
 machines of all people who download it from the official repository takes
 some time. And then, the web site needs to be updated, especially the
 documentation needs to reflect the new features / fixes / etc...

 But apart from that, I don't see a reason why *this* SDK would lag behind,
 and as I said, we want it to be released ASAP.

 On Tue, Mar 24, 2009 at 4:47 PM, Al Sutton a...@funkyandroid.com wrote:


 JBQ,

 Can you pass up the chain that the 'phrase

 ...you can be sure that you'll have an official SDK for a
 cupcake-originated release as soon as possible.

 should be planned to be a point in time (hopefully a couple of weeks)
 before
 a carrier releases a device with it on.

 I'm sure you're aware there's no bigger recipe for pain than when the
 first
 people to test applications on a new release of a platform are users who
 are
 trying out a new 'phone in a shop.

 Al.




 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Jean-Baptiste
 Queru
 Sent: 24 March 2009 15:39
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Cupcake coming in April? Where is the
 SDK?


 1.1 was essentially a update of a few Google-proprietary bits on top of
 the
 same platform as 1.0.
 From the point of view of the Android platform (and therefore of the SDK
 as
 well), the differences between 1.0 

[android-developers] How about the GSM interface?

2009-03-24 Thread Loach

If I want to develop the android phone, how can I develop the RF
driver?

Where can I get the detail information?

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



[android-developers] Uncaught handler: thread main exiting due to uncaught exception

2009-03-24 Thread ragu

Hi when i am executing the code below in the android emulator i didn't
faced any problems in contrast when i executed from the AIDL phone, my
application got crashed any sugestions.

public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case SET_RINGTONE :
 
Intent intent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
 
startActivityForResult(intent, 0);
.
..
..
..
..
}



The error i am getting is as below :

E/AndroidRuntime( 2137): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 2137): android.content.ActivityNotFoundException: No
Activity found to handle Intent { action=android.intent.action.PICK
data=content://media/external/audio/media }






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



[android-developers] Please suggest Substitute for drawRegion in android

2009-03-24 Thread manohar

Hi All,
I am converting a game from j2me to android. Instead of drawRegion i
tried using bitmap.  For translation 0 it works properly means
TRANS_NONE.  I am unable to get the out put for TRANS_MIRROR and
TRANS_MIRROR_ROT180. pls any one can guide me on this.

My drawRegion is some thing like this.
GraphicsContext.drawRegion( s.Data, sourceX,
sourceY,sourceWidth ,sourceHeight, flips, posX,posY, Graphics.TOP |
Graphics.LEFT );


can you please any one guide on this?



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



[android-developers] a issue about LCD display of Android porting on SAM9261 board

2009-03-24 Thread hua...@symbio-group.com

hi

I am new to this group, just port Android to SAM9261-EK board, but LCD
display is so coarse, is this the issue of LCD panel, or other? my LCD
is TFT LCD 240x320. does some one have any clew for this?  Thanks.

Regards
John

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



[android-developers] Calendar fail to launch in Cupcake 1.5

2009-03-24 Thread jerryfan2000

Hi,
Is there anyone know why Calendar in Cupcake 1.5 fails to launch? I
googled and found nothing about this issue. Is it. In addition, I got
some error msg with logcat saying superclass of
CalendarAppWidgetProvider was unable to resolve. However, I can't find
CalendarAppWidgetProvider class from source code nor can I find it by
googling the web at all. Hope someone can help. Thanks.

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



[android-developers] Saving Stats to Textfile

2009-03-24 Thread jh

Hi,

I would be an intermediate level Java programmer (more of a hobbyist).
I want to create an app for android that counts stats during a
football game. This is roughly the functionality:

1.User presses buttons representing each type of stat e.g. #1 for
score, #2 for lost posession of ball etc. (ideally it would be on a
touchscreen phone and the user could use a stylus to touch buttons on
the screen -by the way, would I have to program differently for a
touchscreen? or is that a hardware thing?)

2.Each time a number is pressed, it's written to a text file on the
phone or into a database (sqllite or whatever).

3. the text file can then be sent in a message to another android
enabled phone.


Is all this possible without being an advance Java programmer? Any
guidance would be welcome and I realise this is a broad definition of
the program.

GF

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



[android-developers] No translucency when xml file present

2009-03-24 Thread jonlerne...@gmail.com

I am experiencing a very strange problem. In my application, I have a
theme that I use for one of my activities:
android:theme=@style/Theme.Translucent

The theme is defined as follows:
style name=Theme.Translucent parent=android:style/
Theme.Translucent
item name=android:windowBackground@drawable/
translucent_background/item
item name=android:windowNoTitletrue/item
item name=android:colorForeground#fff/item
/style

where drawable name=translucent_background#c000/drawable

This is used for an activity that does not take up the entire screen,
so the previous activity can be seen through translucency in the
background. Everything works well, until I add a preferences.xml file
into res/xml. After adding this file (without adding any code), the
translucency stops working entirely. The background around the
activity becomes black all the time. Note however, that this only
happens on the device, it works fine on the emulator. If I delete this
single file, all goes back to normal.

Any ideas?

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



[android-developers] GridView of Buttons

2009-03-24 Thread Robbo

Hello,

I have used GridView for 2-dim grid of Buttons.
My problem is, that a user may navigate
through this grid's cells -- with use of arrow keys
it is possible to move yellow rectangle
and by pressing enter select cell (rectangle
becomes orange for a moment).
Everything is behind buttons which
are placed in cells of grid.
How to disable possibility to select and
navigate cells of grid? I would like to
still use grid view but have the same
possibility to navigate (change focus)
among buttons (not cells in which
buttons are placed) at it is possible
when I place buttons in cells of TableView
(not GridView).

Thanks in advance for your help.

Robbo

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