[android-developers] Re: How to upload large video files to FTP Server

2012-04-21 Thread Zsolt Vasvari
Find out what caused the corruption and fix it.

On Saturday, April 21, 2012 1:28:39 PM UTC+8, ashish wrote:

 Hi guys i am getting a problem on uploading large video files to ftp 
 server,files are uploading but the data got courrpted and when we 
 download that file,it is not playable and showing file is 
 courrpted,could anyone please help me how to achieve this and why this 
 is going on

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

Re: [android-developers] Re: How to upload large video files to FTP Server

2012-04-21 Thread asheesh arya
please upload your logcat output and let us know what actually problem you
are facing. may be somewhere you missing some permission in your manifest
file.

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

2012-04-21 Thread Ritesh__M
Hi i want to live stream some tv channels in my android app like this
app(https://play.google.com/store/apps/details?
id=com.spb.tv.digivive.freefeature=search_result).
can any body give me some idea how to live stream tv channels .i have
no problem in coding client side android app.my problem is which api
and collection of url should be used for getting live stream of
channels like BCC  .i want to know from where nexGtv getting its
stream data please help me and providing some good resources so that i
can proceed further.

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

2012-04-21 Thread Ritesh__M
Hi i want to live stream some tv channels in my android app like this
app(https://play.google.com/store/apps/details?
id=com.spb.tv.digivive.freefeature=search_result).
can any body give me some idea how to live stream tv channels .i have
no problem in coding client side android app.my problem is which api
and collection of url should be used for getting live stream of
channels like BCC  .i want to know from where nexGtv getting its
stream data please help me and providing some good resources so that i
can proceed further.

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

2012-04-21 Thread Ritesh__M
Hi i want to live stream some tv channels in my android app like this
app(https://play.google.com/store/apps/details?
id=com.spb.tv.digivive.freefeature=search_result).
can any body give me some idea how to live stream tv channels .i have
no problem in coding client side android app.my problem is which api
and collection of url should be used for getting live stream of
channels like BCC  .i want to know from where nexGtv getting its
stream data please help me and providing some good resources so that i
can proceed further.

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


Re: [android-developers] How to stream Tv Channels in an android app

2012-04-21 Thread Jim Graham
On Sat, Apr 21, 2012 at 01:57:43AM -0700, Ritesh__M wrote:
 Hi i want to live stream some tv channels in my android app like this
 app(https://play.google.com/store/apps/details?
 id=com.spb.tv.digivive.freefeature=search_result).

Ok, whatever.  So get started.

 can any body give me some idea how to live stream tv channels .i have

Here are a couple of tips for you:

1) Learn that posting the exact same text three times within one minute
   is not only likely to keep you from getting useful replies, it is
   likely to get you ignored completely.

2) Do your own research before you ask here.  That starts with the
   developers guide (http://developer.android.com/guide/index.html),
   along with any current Android books on your topic.

3) Then, after you've been working on your app, if you have any specific
   questions, and have spent time trying to solve them on your own,
   including searching the dev guide, archives of this and other lists,
   google, etc., you STILL haven't found your answer, ask here.

4) Remember (I say this because this concept appears to be beyond the
   comprehension of some newbs here):  just because it might be urgent
   to you does not mean that it is to anyone else (unless, of course,
   you're paying a lot of money).

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

  'Wrong' is one of those concepts that depends on witnesses.
 --Catbert:  Evil Director of Human Resources (Dilbert, 05Nov09)

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] Re: AsyncTask in Android 4.0

2012-04-21 Thread b0b


On Saturday, 21 April 2012 05:39:30 UTC+2, William Ferguson wrote:

 The real problem that is see with this change is that while you can modify 
 all of your own uses of AsyncTask to suit you can be entirely hamstrung by 
 one or more 3rd-party libraries that are also using AsyncTasks.



This concern could have been addressed with  a single line of code, if this 
private API had been made public:

AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

But in infinite wisdom, it was decided that developers would use (or abuse) 
above API wrong and thus this API was made private.
So instead of a single line change, if you want the Threaded Executor for 
all your AsyncTasks you have to find and modify all your execute() calls.


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

Re:: [android-developers] Re: AsyncTask in Android 4.0

2012-04-21 Thread Kostya Vasilyev
Or one could want default serialized execution on 3.0 and prior, in case of
issues in third party code.

Looking at this more broadly, this is where I consider the framework
somewhat lacking.

It contains ready to use solutions for a lot of things, and using them is
generally very simple and gets things done quickly.

But attempts to customize something or to work around a bug often end at a
@hide or final class or method.
 21.04.2012 14:19 пользователь b0b pujos.mich...@gmail.com написал:



 On Saturday, 21 April 2012 05:39:30 UTC+2, William Ferguson wrote:

 The real problem that is see with this change is that while you can
 modify all of your own uses of AsyncTask to suit you can be entirely
 hamstrung by one or more 3rd-party libraries that are also using AsyncTasks.



 This concern could have been addressed with  a single line of code, if
 this private API had been made public:

 AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

 But in infinite wisdom, it was decided that developers would use (or
 abuse) above API wrong and thus this API was made private.
 So instead of a single line change, if you want the Threaded Executor for
 all your AsyncTasks you have to find and modify all your execute() calls.


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

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

[android-developers] how to make real full screen app on android 4.0.3?

2012-04-21 Thread Baodong Chen
hi,all:
i have an app on android ics for pad,and i want my app to cover the
whole
screen,but
android:theme=@android:style/Theme.Black.NoTitleBar.Fullscreen
and setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
DO NOT work for me...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


Re: [android-developers] how to make real full screen app on android 4.0.3?

2012-04-21 Thread Mark Murphy
You cannot get rid of the system bar on a tablet, if that is what you
are trying to do.

On Sat, Apr 21, 2012 at 7:15 AM, Baodong Chen chenbdche...@gmail.com wrote:
 hi,all:
 i have an app on android ics for pad,and i want my app to cover the
 whole
 screen,but
 android:theme=@android:style/Theme.Black.NoTitleBar.Fullscreen
 and setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE |
 View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
 DO NOT work for me...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



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

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

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


[android-developers] silent sms notification programaticaly

2012-04-21 Thread Amit Mangal
Hi there,

I want to set sms notification programaticaly silence.
is there any way to set sms notification tone programaticaly silent.

thanks

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

[android-developers] Re: Hidden fragments (and animations) after a rotation

2012-04-21 Thread BoD
Thanks for answering.
However,
1/ I test savedInstanceState because when it is null it means the Activity 
was created for the first time (in which case I instantiate and add the 
fragment).  After a rotation it is not null - I agree it is not clear and I 
should look for the Fragment with a tag instead, like you do, or at least 
put a comment there ;)
2/ You should not create and add the Fragment every time the activity is 
created *whether you use setRetainInstance(true) or not*.  I really think 
it is not related, please correct me if I'm wrong.
3/ In your code you re-add the Fragment to the container even if it was 
found.  It doesn't do harm, but this is unnecessary because the framework 
already does it for you. The FragmentTransaction should be inside the if.

In any case this was not the cause of my problem, and I still reproduce it 
with the updated code below.
In other words it seems that:
1/ The hidden / visible state of a Fragment is not kept when rotating the 
screen (unless setRetainInstance(true) is called)
2/ The custom animations are not saved in the back stack when rotating the 
screen

Can anyone confirm this?  Thanks!


public class MainActivity extends Activity {
private static final String FRAGMENT_TEST = FRAGMENT_TEST;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TestFragment testFragment = (TestFragment) 
getFragmentManager().findFragmentByTag(FRAGMENT_TEST);
if (testFragment == null) {
testFragment = new TestFragment();
// testFragment.setRetainInstance(true);

final FragmentTransaction ftAdd = 
getFragmentManager().beginTransaction();
ftAdd.add(R.id.container, testFragment, FRAGMENT_TEST);
ftAdd.addToBackStack(null);
ftAdd.commit();

final FragmentTransaction ftHide = 
getFragmentManager().beginTransaction();
ftHide.setCustomAnimations(android.R.animator.fade_in, 
android.R.animator.fade_out, android.R.animator.fade_in, 
android.R.animator.fade_out);
ftHide.hide(testFragment);
ftHide.addToBackStack(null);
ftHide.commit();
}
}

public static class TestFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup 
container, Bundle savedInstanceState) {
final TextView res = new TextView(getActivity());
res.setText(Fragment  + toString());
return res;
}
}
}

-- 
BoD


On Friday, April 20, 2012 4:13:26 PM UTC+2, Nadeem Hasan wrote:

 I am not exactly sure if this is the cause of your problem but your 
 fragment creation code is flawed. When you use *setRetainInstance(true)* you 
 don't need to create the fragment every time the activity is created. Also, 
 I don't know why you check for saveInstance to be null. When the phone is 
 rotated you should just retrieve the existing fragment instance from the 
 FragmentManager. I use something like below in mu base Activity:

 protected Fragment addFragment( Class? clss ) {
 String tag = clss.getSimpleName();
 FragmentManager fm = getSupportFragmentManager();
 Fragment f = fm.findFragmentByTag( tag );
 if ( f == null ) {
 f = Fragment.instantiate( this, clss.getName() );
 }
 FragmentTransaction ft = fm.beginTransaction();
 ft.add( R.id.fragment_container, f, tag );
 ft.commit();
 return f;
 }


 And then in onCreate() of my Activity I simply call:

 MyFragment f = addFragment( MyFragment.class ); 

 This means that a Fragment instance is created the first time the Activity 
 is created but on any subsequent rotations, the existing Fragment instance 
 is retrieved from the FragmentManager is attached to the activity.

 Your code creates a new Fragment instance every time the device is 
 rotated, which may lead to other issues like Fragment instances with no 
 attached Activity.



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

2012-04-21 Thread Nadeem Hasan


3/ In your code you re-add the Fragment to the container even if it was 
 found.  It doesn't do harm, but this is unnecessary because the framework 
 already does it for you. The FragmentTransaction should be inside the if.


You are right, the fragment needs to be added to the container only the 
first time. Fixed in my code. Thanks. 

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

[android-developers] Re: Opengl ES scaling (zoom out) shows rare square tiles on my textures. How to avoid it?

2012-04-21 Thread Alexander Mikhnin
Change zNear and zFar parameters in GLU.gluPerspective(gl, 45.0f, 
(float)width / (float)height, 0.1f, 100.0f) to 1 and 1000.
If it helps then your square is near far clipping plane.

пятница, 20 апреля 2012 г., 19:41:54 UTC+4 пользователь saex написал:

 Hi

 I'm displaying a OPENGL ES 1.X square with a texture, and the user can 
 zoom in and out the square scaling it.

 When the user zoom's out the square (the square get's scaled going smaller 
 in the screen) the texture of the square get's rare translucent squares, 
 like tiles from googlemaps.

 I think that the scaling function from OpenGL is now working in the better 
 way.

 How can i improve it?

 These are my OpenGL GLSurfaceView main functions:

 public void onSurfaceCreated(GL10 gl, EGLConfig config) {
 gl.glDisable(GL10.GL_DITHER);   //dithering OFF
 gl.glEnable(GL10.GL_TEXTURE_2D);//Texture Mapping ON
 gl.glShadeModel(GL10.GL_SMOOTH);//Smooth Shading 
 gl.glClearDepthf(1.0f); //Depth Buffer Setup
 gl.glEnable(GL10.GL_DEPTH_TEST);//Depth Testing ON
 gl.glDepthFunc(GL10.GL_LEQUAL);
 gl.glClearColor(0,0,0,0);   //fondo transparente
 gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);   
   

 //Cargamos la textura del cubo. 
 for (int i=0;isquares.size();i++){ 
 if (squares.get(i)!=null)
 squares.get(i).loadGLTexture(gl, context);
 }
 }

 public void onDrawFrame(GL10 gl) {  
 //Limpiamos pantalla y Depth Buffer
 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
 gl.glLoadIdentity();

 mg.getCurrentProjection(gl); //volvemos a generar las matrices por 
 que es un bucle
 mg.getCurrentModelView(gl); 
 .
 .
 .
 .
 gl.glTranslatef(X, Y, Z); //Move z units into the screen
 gl.glRotatef(zrot, 0.0f, 0.0f, 1.0f); //Z   
 gl.glScalef(scale, scale, 1.0f);

 for (int i=0;isquares.size();i++){
 if (squares.get(i)!=null)
 squares.get(i).draw(gl); //Draw the Cube
 }
 }

 public void onSurfaceChanged(GL10 gl, int width, int height) {
 if(height == 0) {   //Prevent A Divide By Zero By
 height = 1; //Making Height Equal One
 }

 gl.glViewport(0, 0, width, height); //Reset The Current Viewport
 gl.glMatrixMode(GL10.GL_PROJECTION);//Select The Projection Matrix
 gl.glLoadIdentity();//Reset The Projection Matrix

 //Calculate The Aspect Ratio Of The Window
 GLU.gluPerspective(gl, 45.0f, (float)width / (float)height, 0.1f, 
 100.0f);

 gl.glMatrixMode(GL10.GL_MODELVIEW); //Select The Modelview Matrix
 gl.glLoadIdentity();//Reset The Modelview Matrix  
   
 }

 and these are my square polygon class main functions:

 public void draw(GL10 gl) { 
 gl.glFrontFace(GL10.GL_CCW);
 //Bind our only previously generated texture in this case   
 gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);  
 //Point to our vertex buffer
 gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
 gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
 //Enable vertex buffer
 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
 gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
 //Draw the vertices as triangle strip
 gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 3);
 //Disable the client state before leaving
 gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
 gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
 }

 //Carga de texturas
 public void loadGLTexture(GL10 gl, Context context) {   
 //Generamos un puntero de texturas
 gl.glDeleteTextures(1, textures, 0); //libero memoria
 gl.glGenTextures(1, textures, 0);   
 //y se lo asignamos a nuestro array
 gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
 //Creamos filtros de texturas
 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, 
 GL10.GL_NEAREST);
 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, 
 GL10.GL_LINEAR);
 //Diferentes parametros de textura posibles GL10.GL_CLAMP_TO_EDGE
 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, 
 GL10.GL_REPEAT);
 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, 
 GL10.GL_REPEAT); 

 //Usamos Android GLUtils para espcificar una textura de 2 dimensiones 
 para nuestro bitmap
 GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); 

 //Checkeamos si el GL context es versión 1.1 y generamos los Mipmaps por 
 Flag. Si no, llamamos a nuestra propia implementación
 if(gl instanceof GL11) {
 

[android-developers] Re: How to upload large video files to FTP Server

2012-04-21 Thread Chris Stratton
On Saturday, April 21, 2012 1:28:39 AM UTC-4, ashish wrote:

 Hi guys i am getting a problem on uploading large video files to ftp 
 server,files are uploading but the data got courrpted and when we 
 download that file,it is not playable and showing file is 
 courrpted,could anyone please help me how to achieve this and why this 
 is going on


If you are trying to do this over a mobile network (or one that is 
otherwise unreliable over the timescale of transferring one of your files), 
you may want to come up with a scheme where you can do the upload in pieces 
and have them recombined on the server.  You would probably want this to 
include means of later resuming to upload additional segments if the 
original attempt fails, and of validating received segments and causing a 
re-send of any that are broken.  This may need to handle re-attempts over 
substantially longer delays (potentially hours or days) than what is built 
into basic network protocols.

I doubt it's necessary to build this from scratch; some web searching would 
probably find an appropriate existing scheme.

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

[android-developers] Re: OpenGL lockups in 2.2

2012-04-21 Thread Robert Green
We just did a big profiling, optimizing and tuning session on our
engine and found that we had LOTS of redundant Shader and Geometry
binds and unbinds.  We found that we never need to unbind from shaders
or disable vertex attributes because they are automatically all
disabled when switching shaders - then we made it so that glGetError
is only called when we have our debugging flags on... Result?  The
game that was crashing instantly on the EVO now runs without any
problems until the battery dies.

So - just another thing to look into.  Run your code in the Adreno
profiler with glFinish() on, remove all the redundant state changes
and unnecessary unbinds like texture, shader or vbo binds to 0 or
anything like that and see how it goes.  This worked for us.

On Apr 12, 10:59 am, cybice istar...@gmail.com wrote:
 Please look 
 athttps://developer.qualcomm.com/forum/qdevnet-forums/mobile-gaming-gra...

 i have no rooted phone,
 so please anybody who affected this bug, send to Qualcomm  a stack trace
 (using gdb) of all the threads of  the system_server process

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


Re: [android-developers] Re: AsyncTask in Android 4.0

2012-04-21 Thread Romain Guy
 I know the Android team is just trying to provide a
 helper functionality, but to change the default behavior like this is
 yet another API sin; IMHO

FWIW the parallel/serialized behavior was not initially documented, on
purpose. The sole role of AsyncTask was to help not block the UI
thread, not offer a fully fledged threading framework since, as you
mentioned, the core APIs provide solid foundations for that. The
advice I regularly give developers is to use the executor framework
directly if they want more control over their tasks.

And to answer your question, AsyncTask was already using the executor
framework in 1.5. Speaking of 1.5, AsyncTask was using a serialized
behavior in that release. This behavior is explained in the current
documentation of the execute() method:

Note: this function schedules the task on a queue for a single
background thread or pool of threads depending on the platform
version. When first introduced, AsyncTasks were executed serially on a
single background thread. Starting with DONUT, this was changed to a
pool of threads allowing multiple tasks to operate in parallel. After
HONEYCOMB, it is planned to change this back to a single thread to
avoid common application errors caused by parallel execution. If you
truly want parallel execution, you can use the
executeOnExecutor(Executor, Params...) version of this method with
THREAD_POOL_EXECUTOR; however, see commentary there for warnings on
its use.

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

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


Re: [android-developers] how to make real full screen app on android 4.0.3?

2012-04-21 Thread Baodong Chen


在 2012年4月21日星期六UTC+8下午7时32分29秒,Mark Murphy (a Commons Guy)写道:

 You cannot get rid of the system bar on a tablet, if that is what you
 are trying to do. 

--yes,i want to do  that! but viddo player can do it?how can i?

 On Sat, Apr 21, 2012 at 7:15 AM, Baodong Chen chenbdche...@gmail.com 
 wrote:
  hi,all:
  i have an app on android ics for pad,and i want my app to cover the
  whole
  screen,but
  android:theme=@android:style/Theme.Black.NoTitleBar.Fullscreen
  and setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE |
  View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
  DO NOT work for me...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

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

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


在 2012年4月21日星期六UTC+8下午7时32分29秒,Mark Murphy (a Commons Guy)写道:

 You cannot get rid of the system bar on a tablet, if that is what you
 are trying to do.

 On Sat, Apr 21, 2012 at 7:15 AM, Baodong Chen chenbdche...@gmail.com 
 wrote:
  hi,all:
  i have an app on android ics for pad,and i want my app to cover the
  whole
  screen,but
  android:theme=@android:style/Theme.Black.NoTitleBar.Fullscreen
  and setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE |
  View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
  DO NOT work for me...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

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

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



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

[android-developers] GeoCoder.getFromLocationName when using bounding box returns results outside bounding box

2012-04-21 Thread James Black
Hello,
I am trying to use a bounding box to limit the locations returned to the
users, but I don't see why this isn't working.

This is the bounding box, and the center of where I am doing my offset:
35.71699581199971  36.0049961  36.29299638800029 == latitude
-84.3104074880003  -84.0224072  -83.73440691199971== longitude

So, I call the function with these parameters:
getFromLocationName(pilot, 10, 35.71699581199971, -84.3104074880003,
36.29299638800029, -83.73440691199971)

and it returns this, where I include the latitude and longitude for each
location, and most of these are outside the bounding box:
 Pilot, IL(41.0434706,-88.0705319)
 Pilot, IL(40.2274008,-87.8353278)
 Pite River(65.829223,19.7676296)
Pilot Travel Center 1200 S Hillcrest Dr Sulphur Springs, TX
75482(33.1165057,-95.6342561)
 Pilot 3300 Arkansas 391 North Little Rock, AR 72117(34.7812136,-92.1279496)
Pilot Travel Center 493 E State Road 44 Wildwood, FL
34785(28.8743055,-82.0952854)
 Pila 360 01 Pila(50.1804514,12.926315)
 Pilot 33570 Lussac(44.9869288,-0.0854641)
 Pila 345 33 Trhanov(49.4137006,12.8563052)
 The Pilot 25 Upper Stone St Maidstone Kent ME15 6EU(51.2698376,0.526036)

I expect nothing to be returned if there are no results.

Thank you for any help.

-- 
Resume  Projects: http://careers.stackoverflow.com/jamesblack

I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

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

[android-developers] APK Expansion File Download exception

2012-04-21 Thread jb
Hi,

I recently impleted the APK Expansion File code, described in
http://developer.android.com/guide/market/expansion-files.html, into
my app. I updated the manifest, created the Service and Receiver files
and update my main activity onCreate() to conform to the instructions
in the guide.

I created a signed apk of my app, and uploaded it to my Google Play
account, along with the obb file. These were saved as drafts.

I then used adb to install my signed APK onto my device and ran it and
immediately got the following exception:



java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.example.myapp/com.example.myapp.MyApp}:
android.database.sqlite.SQLiteException: no such table:
MetadataColumns: , while compiling: SELECT
APKVERSION,_id,DOWNLOADSTATUS,DOWNLOADFLAGS FROM MetadataColumns LIMIT
1
  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1821)
  at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1842)
  at android.app.ActivityThread.access$1500(ActivityThread.java:
132)
  at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1038)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:150)
  at android.app.ActivityThread.main(ActivityThread.java:4263)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:839)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  at dalvik.system.NativeStart.main(Native Method)
 Caused by: android.database.sqlite.SQLiteException: no such table:
MetadataColumns: , while compiling: SELECT
APKVERSION,_id,DOWNLOADSTATUS,DOWNLOADFLAGS FROM MetadataColumns LIMIT
1
  at
android.database.sqlite.SQLiteCompiledSql.native_compile(Native
Method)
  at
android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:
92)
  at
android.database.sqlite.SQLiteCompiledSql.init(SQLiteCompiledSql.java:
65)
  at
android.database.sqlite.SQLiteProgram.init(SQLiteProgram.java:83)
  at android.database.sqlite.SQLiteQuery.init(SQLiteQuery.java:
49)
  at
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:
53)
  at
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:
1438)
  at
android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:
1406)
  at
com.google.android.vending.expansion.downloader.impl.t.init(SourceFile:
76)
  at
com.google.android.vending.expansion.downloader.impl.t.a(SourceFile:
44)
  at
com.google.android.vending.expansion.downloader.impl.DownloaderService.a(SourceFile:
634)



What is interesting is that if I run my app through the Eclipse
debugger, I can execute the code that caused the exception, and
continue normal processing, getting a message Download failed because
you may not have purchased this app.

Any idea why, on a signed version, there is an SQLite exception in the
downloader library, specifically DownloadsDB.java?

My Project Build Target is 2.3.3
I have the Google Play License, Downloader and Zip libraries
referenced by my project
And I have the following in my manifest:
uses-sdk android:minSdkVersion=4 android:targetSdkVersion=15 /

uses-permission android:name=com.android.vending.CHECK_LICENSE /

uses-permission android:name=android.permission.INTERNET /
uses-permission android:name=android.permission.WAKE_LOCK /
uses-permission
android:name=android.permission.ACCESS_NETWORK_STATE /
uses-permission
android:name=android.permission.ACCESS_WIFI_STATE/
uses-permission
android:name=android.permission.WRITE_EXTERNAL_STORAGE /
service android:name=.MyAppDownloaderService /
receiver android:name=.MyAppAlarmReceiver /


TIA,

jb

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


[android-developers] Activity stack.

2012-04-21 Thread Put_tiMe
I have an activity that launches another activity, like let's say 
facebook's post to wall activity.

Let's say facebook app was already running, and you were in what's on your 
mind screen.

When my app launches the facebook's  post to wall activity, and in that 
activity I press 'Back, then the facebbok's  what's on your mind 
activity is now on top of stack.

But I want my activity to be on top. What should I do?

I'm using the following flags while I'm launching   facebook's  post to 
wall activity.

Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET 
| 
 Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP | 
 Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | 
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED



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