[android-developers] Re: Garbage collector running every second... Normal?

2011-10-07 Thread Jean-Michel
Thank you guys, I will look into this.

This stated, after a bit of investigation, I was probably barking at
the wrong tree.

I have added a saving of a trace file that I have put into a service
(thinking that it would not have an impact) but it seems that this is
the culprit.

The work happens in onStart, but it sometimles trigger ANR anyway.

Investigating...

Thanks, JM

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

2011-10-07 Thread Karthik A
Thank you very much for your reply. Is there any other way to reduce like
using command prompt, or API?

On Thu, Oct 6, 2011 at 1:21 AM, TreKing treking...@gmail.com wrote:

 On Wed, Oct 5, 2011 at 5:32 AM, Karthik aykart...@gmail.com wrote:

 Actually i have to reduce the heap size. How to do this?


 Don't allocate as many objects ... ?


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


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




-- 
Regards,
A.Karthik

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

2011-10-07 Thread Kristopher Micinski
On Fri, Oct 7, 2011 at 2:25 AM, Jean-Michel jeanmichel.caz...@gmail.com wrote:
 Thank you guys, I will look into this.

 This stated, after a bit of investigation, I was probably barking at
 the wrong tree.

 I have added a saving of a trace file that I have put into a service
 (thinking that it would not have an impact) but it seems that this is
 the culprit.

 The work happens in onStart, but it sometimles trigger ANR anyway.


Wait, you're thinking code in onStart doesn't trigger an ANR?

Is that true (maybe it is, I just hadn't heard of it ever...)

Kris

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


[android-developers] Re: Android SDK NFC Card Emulation

2011-10-07 Thread Michael Roland
Hallo Eliseo,

see this thread on more information regarding card emulation:
http://groups.google.com/group/android-developers/browse_frm/thread/418c9b370f08a9f7

br
Michael

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


Re: [android-developers] Re: ListView Row not firing the click event

2011-10-07 Thread NaveenShrivastva
Thanks very i have resolved the issue, i want to share you issue
resign is layout handling in frame layout need liner layout with
button


On Fri, Oct 7, 2011 at 9:56 AM, NaveenShrivastva
kumarnaveen.si...@gmail.com wrote:
 Now i am trying thanks very much for this kind of precious information

 On Thu, Oct 6, 2011 at 9:42 PM, dilo.mt dassanayake.dila...@gmail.com wrote:
 Hi,

 There is nothing wrong with the code above. You have said when the
 image button clicks, it works.
 And you need to make the whole entry clickable. all the buttons by
 default clickable.

 I think you have image button and text or what ever inside a linear
 layout or relative layout.
 make sure the container of image button and text (i.e. layout)
 setClickable(true) then you will be oki.

 On Oct 6, 3:51 pm, NaveenShrivastva kumarnaveen.si...@gmail.com
 wrote:
 i have two view one is Expandablelist and other is listview plz
 guideline me how to handle here facing listchildclick event

 On Thu, Oct 6, 2011 at 8:17 PM, dinesh adwani







 mail.dineshadw...@gmail.com wrote:
  If you have added any other view like radio button make it
  setfocasable(false)

  On Oct 6, 2011 3:46 PM, Naveen kumarnaveen.si...@gmail.com wrote:

  i am using custom list , it's
  l1.setAdapter(new EfficientAdapter(this));

                 l1.setFocusable(true);
         l1.setClickable(true);
                 l1.setOnItemClickListener(new OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView? adapter, View
  view,      int pos, long id) {
         Log.i(listview, clicked1);

                                 Toast.makeText(getApplicationContext(),
                                                 Child ItemClicked  + pos
  ,
                                                 
  Toast.LENGTH_SHORT).show();

             }
         });

  it's not working

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

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

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




-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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


[android-developers] Re: How to implement the iphone style multitouch zoomIn zoomOut to a polygon on a GLSurfaceView?

2011-10-07 Thread saex
thanks Studio, i finally did it using this guide:

http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-6-implementing-the-pinch-zoom-gesture/1847


On 6 oct, 16:37, Studio LFP studio@gmail.com wrote:
 There is nothing in that example that says you have to be using a canvas.

 Any view that is a child of View will work. GLSurfaceView is a child of view
 and will work also.

 Override the onTouchEvent of the GLSurfaceView and follow the example in
 that respect.

 The scaling is just a number that goes up when they get farther apart and
 lower as they get closer.  If you aren't able to use this number, then you
 won't be able to use multi-touch pinch-to-zoom functionality. There is even
 a function that calculates the mid point for you (getFocusX, getFocusY), it
 doesn't get much simpler than that.

 Some things you just have to work through because that's how they are done.
 Refusing to use advice (especially from the creators of Android who would
 know best) won't help you figure out how to use the feature any faster.

 Steven
 Studio LFPhttp://www.studio-lfp.com







 On Wednesday, October 5, 2011 10:16:54 AM UTC-5, saex wrote:

  i'm not using canvas, and these strange scale factors, i can't apply
  these system into my code

  On 5 oct, 16:43, Studio LFP studi...@gmail.com wrote:
   Not quite understanding the hard part, it's pretty step by step.

   GLSurfaceView is just another view and can accept touch just like
  anything
   else. You don't have to make a new subclass like he did, just use the
  touch
   code to catch the multi-touch on the GLSurfaceView.

   Steven
   Studio LFPhttp://www.studio-lfp.com

   On Wednesday, October 5, 2011 7:01:16 AM UTC-5, saex wrote:

too hardly explained and bad examples for this case

code examples that does this will be apreciated

On 4 oct, 17:54, Studio LFP stud...@gmail.com wrote:
 Check this post out:

 http://android-developers.blogspot.com/2010/06/making-sense-of-multit...

 Information from the source, the best kind.

 Steven
 Studio LFPhttp://www.studio-lfp.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] Re: ListView Row not firing the click event

2011-10-07 Thread NaveenShrivastva
Now expandable listview child click work fine but listview row child
click not working.


On Fri, Oct 7, 2011 at 12:25 PM, NaveenShrivastva
kumarnaveen.si...@gmail.com wrote:
 Thanks very i have resolved the issue, i want to share you issue
 resign is layout handling in frame layout need liner layout with
 button


 On Fri, Oct 7, 2011 at 9:56 AM, NaveenShrivastva
 kumarnaveen.si...@gmail.com wrote:
 Now i am trying thanks very much for this kind of precious information

 On Thu, Oct 6, 2011 at 9:42 PM, dilo.mt dassanayake.dila...@gmail.com 
 wrote:
 Hi,

 There is nothing wrong with the code above. You have said when the
 image button clicks, it works.
 And you need to make the whole entry clickable. all the buttons by
 default clickable.

 I think you have image button and text or what ever inside a linear
 layout or relative layout.
 make sure the container of image button and text (i.e. layout)
 setClickable(true) then you will be oki.

 On Oct 6, 3:51 pm, NaveenShrivastva kumarnaveen.si...@gmail.com
 wrote:
 i have two view one is Expandablelist and other is listview plz
 guideline me how to handle here facing listchildclick event

 On Thu, Oct 6, 2011 at 8:17 PM, dinesh adwani







 mail.dineshadw...@gmail.com wrote:
  If you have added any other view like radio button make it
  setfocasable(false)

  On Oct 6, 2011 3:46 PM, Naveen kumarnaveen.si...@gmail.com wrote:

  i am using custom list , it's
  l1.setAdapter(new EfficientAdapter(this));

                 l1.setFocusable(true);
         l1.setClickable(true);
                 l1.setOnItemClickListener(new OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView? adapter, View
  view,      int pos, long id) {
         Log.i(listview, clicked1);

                                 Toast.makeText(getApplicationContext(),
                                                 Child ItemClicked  + 
  pos
  ,
                                                 
  Toast.LENGTH_SHORT).show();

             }
         });

  it's not working

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

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

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




 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)




-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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


Re: [android-developers] Re: ListView Row not firing the click event

2011-10-07 Thread NaveenShrivastva
Now expandable listview child click work fine but listview row child
click not working.

On Fri, Oct 7, 2011 at 12:47 PM, NaveenShrivastva
kumarnaveen.si...@gmail.com wrote:
 Now expandable listview child click work fine but listview row child
 click not working.


 On Fri, Oct 7, 2011 at 12:25 PM, NaveenShrivastva
 kumarnaveen.si...@gmail.com wrote:
 Thanks very i have resolved the issue, i want to share you issue
 resign is layout handling in frame layout need liner layout with
 button


 On Fri, Oct 7, 2011 at 9:56 AM, NaveenShrivastva
 kumarnaveen.si...@gmail.com wrote:
 Now i am trying thanks very much for this kind of precious information

 On Thu, Oct 6, 2011 at 9:42 PM, dilo.mt dassanayake.dila...@gmail.com 
 wrote:
 Hi,

 There is nothing wrong with the code above. You have said when the
 image button clicks, it works.
 And you need to make the whole entry clickable. all the buttons by
 default clickable.

 I think you have image button and text or what ever inside a linear
 layout or relative layout.
 make sure the container of image button and text (i.e. layout)
 setClickable(true) then you will be oki.

 On Oct 6, 3:51 pm, NaveenShrivastva kumarnaveen.si...@gmail.com
 wrote:
 i have two view one is Expandablelist and other is listview plz
 guideline me how to handle here facing listchildclick event

 On Thu, Oct 6, 2011 at 8:17 PM, dinesh adwani







 mail.dineshadw...@gmail.com wrote:
  If you have added any other view like radio button make it
  setfocasable(false)

  On Oct 6, 2011 3:46 PM, Naveen kumarnaveen.si...@gmail.com wrote:

  i am using custom list , it's
  l1.setAdapter(new EfficientAdapter(this));

                 l1.setFocusable(true);
         l1.setClickable(true);
                 l1.setOnItemClickListener(new OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView? adapter, View
  view,      int pos, long id) {
         Log.i(listview, clicked1);

                                 Toast.makeText(getApplicationContext(),
                                                 Child ItemClicked  + 
  pos
  ,
                                                 
  Toast.LENGTH_SHORT).show();

             }
         });

  it's not working

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

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

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




 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)




 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)




-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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


[android-developers] Re: Target to one device in market

2011-10-07 Thread albnok
You don't - if you want to filter a device you do it when you upload
your app and change its visibility settings in the Android Market.

On Oct 5, 2:53 am, franzisco2011 franzisco2...@gmail.com wrote:
 What I must modify in my manifest to target only a device?
 For example only for Nexus S or samsung galaxy tab

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] In AutoCompleteVeiw calling setAdapter() and setThreshod() gives error

2011-10-07 Thread Kostya Vasilyev
The compiler is right - your curly braces are not matching up.

The code you highlighted should be inside onCreate, not like it is now.

--
Kostya Vasilyev
07.10.2011 9:04 пользователь KK dioxide.softw...@gmail.com написал:
 Hi All,
 I'm trying a sample code available on the web, in which I'm trying to test
 AutoCompleteView. When trying to call setAdapter() method in following
 lines:

 * autoCompTxt.setAdapter(arrayAdapter);*
 * autoCompTxt.setThreshold(3);*

 I'm getting the following errors;

 *Multiple markers at this line*
 * - Syntax error on token arrayAdapter, VariableDeclaratorId expected
 after *
 * this token*
 * - Syntax error on token(s), misplaced construct(s)*

 The code for the main Activity is as below:

 *package com.demo.autocomp;*
 *
 *
 *import android.app.Activity;*
 *import android.os.Bundle;*
 *import android.widget.ArrayAdapter;*
 *import android.widget.AutoCompleteTextView;*
 *
 *
 *public class AutoCompleteDemoActivity extends Activity {*
 * private final static String[] presidents = { Dwight D. Eisenhower,
John
 F. Kennedy,*
 * Lyndon B. Johnson, Richard Nixon, Gerald Ford,*
 * Jimmy Carter, Ronald Reagan, George H. W. Bush,*
 * Bill Clinton, George W. Bush, Barack Obama };*
 *
 *
 * /** Called when the activity is first created. */*
 * @Override*
 * public void onCreate(Bundle savedInstanceState) {*
 * super.onCreate(savedInstanceState);*
 * setContentView(R.layout.main);*
 * }*
 *
 *
 * AutoCompleteTextView autoCompTxt = (AutoCompleteTextView)
 findViewById(R.id.autoCompleteTextView1);*
 * ArrayAdapterString arrayAdapter = new ArrayAdapterString(*
 * getApplicationContext(),*
 * android.R.layout.simple_dropdown_item_1line, presidents);*
 * autoCompTxt.setAdapter(arrayAdapter);*
 * autoCompTxt.setThreshold(3);*
 *}*


 The corresponding res/layoute/main.xml is as below(there is no errors in
 main.xml, just posting for reference purposes):

 *?xml version=1.0 encoding=utf-8?*
 *LinearLayout xmlns:android=http://schemas.android.com/apk/res/android*
 * android:orientation=vertical android:layout_width=fill_parent*
 * android:layout_height=fill_parent*
 * TextView android:layout_width=fill_parent*
 * android:layout_height=wrap_content android:text=@string/president
/*
 * AutoCompleteTextView android:layout_width=match_parent*
 * android:id=@+id/autoCompleteTextView1
 android:layout_height=wrap_content*
 * android:text=AutoCompleteTextView*
 * requestFocus/requestFocus*
 * /AutoCompleteTextView*
 */LinearLayout*

 Would appreciate if someone can point me what is wrong here or how to fix
 the error and make the code work.

 Thanks,
 KK

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

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

[android-developers] Re: How does edit box(EditText) receive user's input?

2011-10-07 Thread albnok
When you click the Submit button, get the string via the EditText's
getText().toString().

On Oct 2, 10:26 am, matt dw blackworl...@gmail.com wrote:
 hi all,

 I has read the related source codes about edit box(EditText.java and
 TextView.java). But i didn't understand how edit box get user's input.

 it is transfered by message? or function setText directly be invoke
 somewhere?
 so can anyone give me a hint? or explain it?

 Thanks very much.

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


[android-developers] How to transform not POT images into POT bitmaps to use them on textures for openGL?

2011-10-07 Thread saex
Im doing my first steps on OpenGL-ES. Atm i can load Power of Two
(POT) textures on a square polygon that i can rotate and zoom on the
screen. If i try to load a non POT png, then, the texture appears
white.

What I need to do some trick to transform non POT textures into POT
bitmaps to fill the texture of my square polygon. How can i transform
them into POT bitmaps?

This is the actual code i have to load textures:

FROM ASSETS DIR:

String imagePath = radiocd5.png;
AssetManager mngr = context.getAssets();
// Create an input stream to read from the asset folder
InputStream is=null;
try {
is = mngr.open(imagePath);
} catch (IOException e1) {  e1.printStackTrace();   }

//Get the texture from the Android resource directory
InputStream is =
context.getResources().openRawResource(R.drawable.radiocd5);
Bitmap bitmap = BitmapFactory.decodeStream(is);
//Use the Android GLUtils to specify a two-dimensional texture
image from our bitmap
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

FROM RES/DRAWABLE:

//Get the texture from the Android resource directory
InputStream is =
context.getResources().openRawResource(R.drawable.radiocd5);
Bitmap bitmap = BitmapFactory.decodeStream(is);
//Use the Android GLUtils to specify a two-dimensional texture
image from our bitmap
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

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


[android-developers] Best way to send data between devices?

2011-10-07 Thread André
I'm wondering if anyone can point me in a good direction to send data
from my app on one device to my app in another device the best way?
Was thinking about making the app connect to a online database and
have it constantly check for updates. Would this be the best way?

//André

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

2011-10-07 Thread shaman virk
make a server , if a device 'A' wants to send data to other device'B', 'A'
will send data to server and server will send data to 'B'

use Cloud To Device Messaging C2DM technique for push notification from
server to 'B'

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

[android-developers] Generate screen motion events on android through usb

2011-10-07 Thread Ahmed Abdelfattah
I want to control Android using the open accessory mode (usb) from
another device Is it possible to generate touch screen events : act as
a click or multi touch event or write on the keyboard ? If so , is it
possible to keep the app which does that running in background and
fully control the smart phone from outside ?

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


[android-developers] Why is Asynchronous call with Selector taking a lot of CPU usage?

2011-10-07 Thread B.Arunkumar
Hi,

We are using an Asynchronous socket call with selector with the
same code as given in this link:

http://tutorials.jenkov.com/java-nio/selectors.html

 for reading image frames from a Camera using RTSP. However, we
find that we are getting a high CPU Usage of the order of 25% just for
getting the image frames (using the command adb shell top -m 10). Is
there some problem with the code given in this link?

Thank you,
B.Arunkumar

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

2011-10-07 Thread I-Sheng Lin
I am amazed that the code works. Have been looking for it a super long time

sent from my Droid.
 On Oct 7, 2011 12:14 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
 Wow, that's a serious bug. So what happens if a rogue app does this?
 You are forced to hard reboot the phone by holding the down the power
 button?

 On Oct 7, 10:32 am, Dianne Hackborn hack...@android.com wrote:
 This will be fixed in ICS.





 On Thu, Oct 6, 2011 at 11:12 AM, TreKing treking...@gmail.com wrote:
  On Thu, Oct 6, 2011 at 8:36 AM, Ubiracy ubiracy@gmail.com wrote:

  I have a native app and i need this :( my tablet only do this ( open
  application on boot and don't close ), but when i use  the
progressdialog
  this lock  method  doesn't work.. bugs?!

   The bug is probably allowing you to hack / exploit the keyguard
setting to
  prevent the Home key from doing its thing.

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

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

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

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

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

2011-10-07 Thread André
Thanks, this was exactly what i needed!


On Oct 7, 10:09 am, shaman virk shaman.v...@gmail.com wrote:
 make a server , if a device 'A' wants to send data to other device'B', 'A'
 will send data to server and server will send data to 'B'

 use Cloud To Device Messaging C2DM technique for push notification from
 server to 'B'

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

2011-10-07 Thread Ravijadhav
Thanks a lot gjs,
The only query now i have is that will the same code work in android??
does android
support awt and other java 2 classes???

On Oct 7, 10:30 am, gjs garyjamessi...@gmail.com
 Hi,

 try 
 thishttp://stackoverflow.com/questions/3922172/java-awt-image-bufferedima...

 Regards

 On Oct 6, 9:35 pm, Ravijadhav jadhr...@gmail.com wrote: Helllo Everyone,

  I am quite stuck at this..
  What is the best way to convert an RGB  24 or 32 bit per pixel image
  to a grayscale 8 bit per pixel image?
  A working code of the same in android will be much helpful for me
  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] Framework Sensor Support

2011-10-07 Thread dani maoz
Hi
How the framework decide from which sensor to read the relevant data,
For example if i have two accelometer sensor attach how can i configure the
framekwork to receive information to read from the second one
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] Avoiding POT rule for Opengl Textures: Overlapp a transparent POT bitmap with non POT bitmap?

2011-10-07 Thread saex
i need to load non POT bitmaps into my opengl es app for android.

What i need is to overlap my non POT bitmap into another bitmap with
POT size. I need to overlap the non POT bitmap in the center of the
POT bitmap.

How can i do it?

i tryed with createScaledBitmap but it stretches the image and i dont
want that.

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] Android Menu

2011-10-07 Thread ANKUR GOEL
Hi all

i want to set some text at the corner of every menu in android coming from
server besides that i have the menu text and icon of every menu

Can i set some extra parameter to it

If yes suggest me some ways .


Thanks and Regards:-

Ankur Goel
09019040351
S/W Engg.

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

2011-10-07 Thread Narendra Bagade
After pressing back button,will call finish() method which destroy activity
B.

On Wed, Oct 5, 2011 at 10:20 PM, lbendlin l...@bendlin.us wrote:

 Why is an activity in the background for so long? You should use a service
 for non-UI tasks.

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




-- 
Regards,
Narendra
.

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

[android-developers] ACTION_IMAGE_CAPTURE ACTION_VIDEO_CAPTURE

2011-10-07 Thread perumal316
Hi All,

In my application, I am using
android.provider.MediaStore.ACTION_IMAGE_CAPTURE 
ACTION_VIDEO_CAPTURE intents to take pictures and videos which will
then be send over to the backend.

How do I retrieve the default pathname of the intents? One way is to
use putExtra(android.provider.MediaStore.EXTRA_OUTPUT, uri) but then
if I take a picture it is saved twice, one in the specified uri and
another in the dafault path (/sdcard/DCIM/CAMERA...).

Is there any way where after taking the picture (the sending to the
backend is already done) I can retrieve the default path and then
delete that image/video?

Also I noticed that when calling protected void onActivity (int
requestcode ), I can only do so for either the camera or video
intent. Within the same method, the application crashes.

How do I handle multiple intents?

Thanks In Advance,
Perumal

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

2011-10-07 Thread amantsolit...@gmail.com
hello.. hope u can tell me how to do it.. because its a bit ridiculous
cos im used in arabic.. n it just came out in boxes.. hope that
anybody cn help me.. ASAP..
TQVM

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

2011-10-07 Thread jim.n...@noydcom.com
the image is gone, can you repost?

On Oct 4, 9:26 am, bob b...@coolgroups.com wrote:
 I got a Vizio tablet (Android 2.3) from Walmart.  Now that it's been
 slightly after 15 days so I can't return it, this error keeps showing
 up:

 http://i1190.photobucket.com/albums/z449/m75214/vizio.png

 The tablet refuses to start.  It just gets stuck on this error.

 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] Profile Details

2011-10-07 Thread Durai P
Hi friends,

I am creating a profile app, i got sound , brightness values. So i
need to store the settings values.
Which is the best storing place for profile details.
Kindly help me,

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] opengl es sphere tutorial

2011-10-07 Thread grebwerd
Hello,

Could anyone point me to a really good tutorial on how to create a 3D
sphere from scratch using triangle strips or triangle fan using opengl
es?






Many thanks a head of time.


Drew

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


[android-developers] bringing back the activity to foreground

2011-10-07 Thread kabilan thennarasu
I have used moveTaskToBack(true); to move the activity to background;
can someone tell me how to bring back the activity to the foreground;

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


[android-developers] Focus Ring not aligned with control - Please Help!

2011-10-07 Thread Mark Stutts
I am developing a mobile web application with the focus on iDevices
and Androids.  When on the Android platform, if I select an input
control like a textbox the focus ring is like 8px skewed from the
control and the top of the focus ring is drawn right through the
center on the textbox.  How do I fix this?  On all desktop browsers
this doesn't happen.  On the iPad and iPhone this doesn't happen.  It
only occurs on the Android.

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


[android-developers] How to detect nearby devices

2011-10-07 Thread juankar
Heey!!

I have an idea for a good application but I am not sure of which
approach to take. The problem I have is this:

I want to make an application which detects people around running the
same application within a range of, let's say, 50m. Is there a
'simple' way to achieve this? Also, my app shouldn't drain the battery
life too fast since it would have to be on background most of the
time, but still updating. Having update intervals of ~5min is not a
problem.

Can anybody help me with this? I would be really grateful.

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] Custom LongPress duration

2011-10-07 Thread Guillaume LACHAUD
Hi !

I want to change the timeout before a touch becomes a longclick. What is the 
best way to start ? Is it possible ? Can we change ViewConfiguration values 
?

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] Launch popup window from service

2011-10-07 Thread emiusa
hi all,

I need to launch a popup window from a service to do something
specific inside my application. I do not seem to find a good way to do
it. Inside onCreate() I create the popup window but when I launch it
with showAtLocation I get this error:

10-06 13:39:49.573: ERROR/AndroidRuntime(5966): Caused by:
android.view.WindowManager$BadTokenException: Unable to add window --
token null is not valid; is your activity running?

Does anybody know how to fix this?

Thanks a lot,

-emiusa

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


[android-developers] Redrawing / Refreshing / Reseting with user's input

2011-10-07 Thread es0329
An Activity in my app allows for the user's name to be entered (in an
EditText widget), and the user's score to be entered (in an EditText
widget). The same screen indicates the user's number of attempts (in a
TextView widget).

Once the user has entered their name and score, they'll click
Next (Button).
My nextButtonOnClick() gets the values from those fields and stores
them in respective variables.

How  where can I then redraw / refresh / reset the same screen for
use with the user's following attempts?
It should increment the number of attempts each time.

The user provided name should become the default value in that
EditText field for subsequent attempts.
Better yet, with the user provided value for name, am I able to
present the name in a TextView widget on subsequent attempts (as
opposed to the initial EditText widget)?

PS: This is my first post here. I had wireframe screenshots but there
was no place to submit them. I wondered if yall could suggest any
additional forums you use that allow for attachments.

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


[android-developers] Capture onKeyPress event in Android webkit browser

2011-10-07 Thread AndroidWD
I am developing an android web application in xhtml. I have few blocks
(Div) and would like to move between one block to another using the
arrow keys. So I tried to capture the onKeyPress event. Unfortunately
it is not getting fired. The same callback function when registered
for onClick event works fine. I also tried, onKeyDown event as well,
which is not getting fired.

I am using an Android emulator and connected a USB keyboard.

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


[android-developers] Compilation error on my if else statement

2011-10-07 Thread Isaac Ng
I have an error on 'else' code on if-else statment. What's wrong, pls
advise. Thank you.
//click on one of chapters
 list.setOnItemClickListener(new OnItemClickListener()
 {
public void onItemClick(AdapterView? parent, View view,
int position, long id)
{

String item = ((TextView)view).getText().toString();

Toast.makeText(getBaseContext(), item,
Toast.LENGTH_LONG).show();

//Choose Chapter 1
if (item.equalsIgnoreCase(I. The Global Business
Environment)); {
//go to chapter 1
startActivity(new Intent(ChaptersActivity.this,
Chapter1Activity.class));
} else if (item.equalsIgnoreCase(II. Information
Systems)); {
//go to chapter 2
startActivity(new Intent(ChaptersActivity.this,
Chapter2Activity.class));
}

  //Choose Chapter 3
else if (item.equalsIgnoreCase(III. Operations
Management));
{
//go to chapter 3
startActivity(new Intent(ChaptersActivity.this,
Chapter3Activity.class));
}

  //Choose Chapter 4
else if (item.equalsIgnoreCase(IV. Marketing));
{
//go to chapter 4
startActivity(new Intent(ChaptersActivity.this,
Chapter4Activity.class));
}

  //Choose Chapter 5
else if (item.equalsIgnoreCase(V. Managing Human
Capital));
{
//go to chapter 5
startActivity(new Intent(ChaptersActivity.this,
Chapter5Activity.class));
}

  //Choose Chapter 6
else if (item.equalsIgnoreCase(VI. Preparing for the
Examination));
{
//go to chapter 6
startActivity(new Intent(ChaptersActivity.this,
Chapter6Activity.class));
}
}
});

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


[android-developers] Can't update event on phone's calendar from code

2011-10-07 Thread atraudes
 

I've posted this question 
herehttp://stackoverflow.com/questions/7656343/cant-update-event-on-phones-calendar-from-codewithout
 any luck.

I'm attempting to update a calendar's event on my phone from my code, but 
context.getContentResolver().update keeps returning 0, and of course there 
are no changes made to the event when I look at it in the Calendar app. I 
have android.permission.READ_CALENDAR and android.permission.WRITE_CALENDAR 
set in the manifest. 

I'm getting the event ID, start time, etc with 
context.getContentResolver().query, and I'm getting unique numbers like 431, 
4, 233, etc, so I'm presuming the event IDs I'm using are real. 

I understand the official way to do this is to go through Google's servers 
instead of using update(), but for my implementation it doesn't make sense 
to do it that way (or even in general, but I digress).

Am I doing something wrong, or am I trying to do something that Android 
simply isn't going to allow?

Uri updateEventUri = 
ContentUris.withAppendedId(Uri.parse(content://com.android.calendar/events), 
id);

ContentValues cv = new ContentValues();
begin.set(Calendar.HOUR_OF_DAY, arg0.getCurrentHour()); //begin is a 
java.util.Calendar object
begin.set(Calendar.MINUTE, arg0.getCurrentMinute());
//cv.put(_id, id);
//cv.put(title, yeahyeahyeah!);
cv.put(dtstart, begin.getTimeInMillis());
int updatedrowcount = context.getContentResolver().update(updateEventUri, cv, 
null, null);
System.out.println(updated +updatedrowcount+ rows with id +id);

A related question was posted here with no replies Update Android Calendar 
Eventhttp://stackoverflow.com/questions/5636350/update-android-calendar-event

Let me know if I can clarify anything; I would really appreciate any input 
you guys and gals could provide!

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

[android-developers] Unable to save a logo/bitmap to the Contacts List; able to save name,mobile no.

2011-10-07 Thread Kumar Krishnamoorthy
Android:Java:
===
I'm able to save name  mobile no. to the Contacts List - i get a new
item.

However, i'm unable to save a logo/bitmap along-with this new item (to
the
Contacts List)

Pls send me working code (app source) that solves this problem.

Thanks,
regards,
Kumar kumark...@yahoo.com

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


[android-developers] lifetime issues with loaders created from fragments with setRetainInstance(true)

2011-10-07 Thread Jeremy Drake

Hello,

I am currently working on a tab-based app.  I am using Fragments for the 
tabs, and in some of these fragments I am using a Loader to perform 
background loading of data from the internet.  This seems to currently be 
the most recommended way to go.  In order to prevent the data from getting 
re-loaded from the internet each time the device rotates, I have 
setRetainInstance(true) on the fragments which do this.  This works fine, 
and the loader properly gets retained, as long as you are viewing the tab 
during the rotation.  It also seems to work if you rotate at least once on 
the tab before switching to another tab and rotating.  However, I am 
experiencing the following behavior:

Visit the tab which has the loader.  Allow it to load.
Switch away from that tab.
Rotate the device.  Rotate back or not, doesn't matter.
* at this point, my onLoaderReset method gets called.
Switch back to the tab with the loader.
* the fragment's onCreate is invoked, which calls 
getLoaderManager().initLoader(...)
No further loader callbacks are made, and my app just sits with a loading 
spinner forever.  Looking at member variables in the debugger in onCreate, 
it seems the loader manager is marked as destroyed at this point (variable 
mDestroyed is true).


This can be reproduced in the compatibility library samples, as well as the 
3.2 api demo sample, by doing the following:
Edit com/example/android/apis/app/LoaderCustom.java (or 
com/example/android/support4/app/LoaderCustomSupport.java for the 
Support4Demos), adding the following method to the AppListFragment class:

@Override public void onStart() {
   super.onStart();
   setRetainInstance(true);
}

Run the application.
(3.2 api demos ony) go to the App section.
Go to the Fragment section, and the Tabs section
Switch to the Apps tab.  Wait for it to load.
Switch back to the Simple tab.
Rotate the device (or Ctrl-F12 the emulator)
Switch to the Apps tab.  Note the loading spinner comes up and never goes 
away.


I have tested this on a physical Gingerbread device (2.3.3, which required a 
bit of hacking on the Support4Demos project to remove android 3.x-specific 
calls, which someone seems to have just entered as issue 20575), a physical 
Honeycomb device (3.2.1), and the Honeycomb emulator, and the results were 
the same.


I would like to know
a) am I doing something wrong?
b) is there a workaround I can do to perform rotations in my tabbed app 
without discarding data loaded over the internet?
c) should I file an issue in http://code.google.com/p/android/issues/list 
for this behavior?  I did a couple searches there, but could not find 
anything that looked like this.


Thanks,
Jeremy



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


[android-developers] SU Request

2011-10-07 Thread JD
Can someone please give me a clear, simple, short, and most
importantly, working example of how to edit a database that another
app created? After days and days of searching, it's amazing that
nobody seems to truly understand how to do this. All I find is the
same old post, copied and pasted all over the internet that says:

Process p = Runtime.getRuntime().exec(su);

Ok now what? How do I use that p object to open and edit a database?

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


[android-developers] HTML5 video tag and Amazon S3

2011-10-07 Thread Alen Mujezinovic
Hello group

I've run into a problem today that I can't solve. We're building a small app 
that stores video files on S3 and offers playback in the browser. This works 
fine on desktop browsers and iOS mobile devices but when trying to play the 
videos on Android an error message pops up:

*Cannot play video*

Sorry, this video cannot be played. 


When serving the same file from our servers though, it plays fine.

Here's the headers returned from the local server and from S3:

$ curl -I 127.0.0.1:8000/media/videos/2011/09/07/test-edit-1.mp4
HTTP/1.0 200 OK
Date: Thu, 06 Oct 2011 10:47:35 GMT
Server: WSGIServer/0.1 Python/2.6.1
Last-Modified: Fri, 09 Sep 2011 11:31:34 GMT
Content-Length: 1595696
Content-Type: video/mp4


$ curl -I 
https://theeditpool.s3.amazonaws.com/test-client/foo/videos/2011-10-06-asdf.mp4 
HTTP/1.1 200 OK
x-amz-id-2: 8yyvFaVj7+2/VnKnk+HgZOxr0xjYu15UmOh5MUsJBJ2QVDRMPj/vWDMpS1edIZ5c
x-amz-request-id: 33DE6C6C051A3A15
Date: Thu, 06 Oct 2011 10:48:42 GMT
Cache-Control: max-age=604800
Last-Modified: Thu, 06 Oct 2011 10:02:12 GMT
ETag: 8b29fe5416377e4fde563756558310aa
Accept-Ranges: bytes
Content-Type: video/mp4
Content-Length: 1595696
Server: AmazonS3


Logcat output when attempting to play the file in the browser:

D/MediaPlayer(11669): Couldn't open file on client side, trying server side
I/StagefrightPlayer(   68): 
setDataSource('https://theeditpool.s3.amazonaws.com/test-client/foo/videos/2011-10-06-asdf.mp4')
E/MediaPlayer(11669): error (1, -2147483648)
E/MediaPlayer(11669): Error (1,-2147483648)
D/VideoView(11669): Error: 1,-2147483648


When opening the url *directly* the browser downloads the video file.


Any pointers would really be appreciated. I've not found out what is going 
wrong here...

Alen
 

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

[android-developers] What is the wake lock policy in 2.3?

2011-10-07 Thread Tien Kooshi
Hi,

I'm developing a backup service that contact with another through
network.
There are wake lock held and released iteratively for the whole
transmission but the process is always killed by system because of
Excessively wake lock 
This is my code snippet for the problem.

private void acquireWakeLock()
{
   if (mPMWakeLock == null)
{
 Logger.d(acquireWakeLock);
PowerManager pm =
(PowerManager)application.getSystemService(Context.POWER_SERVICE);
mPMWakeLock =
pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
this.getClass().getName());
mPMWakeLock.acquire();
}
}
private void releaseWakeLock()
{
   if (mPMWakeLock != null  mPMWakeLock.isHeld())
{
Logger.d(releaseWakeLock);
mPMWakeLock.release();
mPMWakeLock = null;
}
}
:
:
:

private void doContact(final T... list) {
new Thread(new Runnable() {
@Override
public void run() {
:
:
while(get(0) != null) {
if (NetworkUtils.isConnected(application)) {
acquireWakeLock();
:
:
releaseWakeLock();
}
:
:
}

Could you please help to let me know what is the wake lock policy in
2.3?
Thank you!

Regards,
Kooshi

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


[android-developers] RuntimeException: SlidingDrawer cannot have UNSPECIFIED dimensions

2011-10-07 Thread awtDroid

Not sure why I am getting this exception because I have specified the
width and height as such:

SlidingDrawer
android:id=@+id/drawer
android:layout_width=match_parent
android:layout_height=wrap_content

Please help, below is the full xml and stack trace:


?xml version=1.0 encoding=utf-8?

LinearLayout android:id=@+id/LinearLayout01
android:layout_width=fill_parent android:layout_height=fill_parent
android:orientation=vertical xmlns:android=http://
schemas.android.com/apk/res/android


RelativeLayout android:id=@+id/LinearLayout02
  android:layout_height=wrap_content
  android:layout_width=match_parent
  

ViewFlipper android:id=@+id/ViewFlipper01
 android:layout_height=wrap_content
 android:layout_width=match_parent

LinearLayout android:layout_width=match_parent 
android:id=@+id/
linearLayout1 android:layout_height=match_parent
android:orientation=vertical android:gravity=center_horizontal
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=Run 1 /

ImageView android:id=@+id/imageView1
   android:layout_width=fill_parent
   android:src=@drawable/run1
   android:layout_height=fill_parent
/ImageView
/LinearLayout
LinearLayout android:layout_width=match_parent 
android:id=@+id/
linearLayout2 android:layout_height=match_parent
android:orientation=vertical android:gravity=center_horizontal
TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=Run 2 /

ImageView android:id=@+id/imageView2
   android:layout_width=fill_parent
   android:src=@drawable/run2
   android:layout_height=fill_parent
/ImageView
/LinearLayout

/ViewFlipper

SlidingDrawer
android:id=@+id/drawer
android:layout_width=match_parent
android:layout_height=wrap_content
android:handle=@+id/handle
android:layout_alignParentBottom=true
android:content=@+id/content
ImageView
  android:id=@id/handle
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:src=@drawable/tray_handle_normal
/
Button
  android:id=@id/content
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:text=I'm in here!
/
/SlidingDrawer

/RelativeLayout

/LinearLayout

10-05 15:38:33.870: ERROR/InputDispatcher(140): channel '40c98608
com.cnh.Fragments/com.cnh.Fragments.FragmentsActivity (server)' ~
Consumer closed input channel or an error occurred.  events=0x8
10-05 15:38:33.870: ERROR/InputDispatcher(140): channel '40c98608
com.cnh.Fragments/com.cnh.Fragments.FragmentsActivity (server)' ~
Channel is unrecoverably broken and will be disposed!
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): FATAL EXCEPTION: main
10-05 15:38:51.850: ERROR/AndroidRuntime(7775):
java.lang.RuntimeException: SlidingDrawer cannot have UNSPECIFIED
dimensions
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.widget.SlidingDrawer.onMeasure(SlidingDrawer.java:261)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.view.View.measure(View.java:10828)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:
581)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.widget.RelativeLayout.onMeasure(RelativeLayout.java:365)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.view.View.measure(View.java:10828)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
1284)
10-05 15:38:51.850: ERROR/AndroidRuntime(7775): at

[android-developers] Custom long-press duration

2011-10-07 Thread Guillaume LACHAUD
I am trying to change the default long-press duration. I know that it is set 
in ViewConfiguration. Is there any way to change this value ? What would be 
the best way to achieve this ? Overriding onTouchEvent ?

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] android 3.2 IME picker on status bar

2011-10-07 Thread Jimen Ching
Hello,

I've implemented an IME package with 3 input method services.  In android 
3.2, there is a status bar keyboard icon that allows the user to change the 
input method.  I can see my input methods listed.  The problem is, the icon 
and the text label used in the list is the value used for the 
application/package, not the specific IME service.  In the manifest xml 
file, I specified specific icons and text labels for each input method.  The 
input methods show up, but the icons and labels don't.  Do I need to set 
these icons/labels somewhere else?

Note: I set the icon and label in the service / tag in the manifest 
xml.  I should mention that the label text is in Chinese.  I don't know if 
that matters.  The icon is a PNG in the res/drawable-xhdpi directory.  I 
have the same icon in res/drawable-hdpi directory.  So I don't think it is 
an issue with screen size or resolution.

--jc

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Automatic way to change versionCode (and/or versionName) in manifest

2011-10-07 Thread Peter Holcroft
I took your advice and scripted it. Here is my solution if anyone just wants 
to implement it easily in 2 minutes.

Windows only, sorry.

AndroidBuild++ http://peter.holcroft.net/?p=19

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

2011-10-07 Thread Piraba
I have same issue.I couldn't fix this.If you fix this issue please let me 
know.

http://stackoverflow.com/questions/7659570/android-oneditoractionlistener-actionid-give-0-when-i-click-done-key

Here also i created one group .: subject is : Android 
OnEditorActionListener() method's actionId give 0 when I click Done key


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

[android-developers] my left side not working

2011-10-07 Thread remon ramses
i have ideos x5 my left side in te screen not working all the
ok button locate at the left side ... can any bod help me in
that  ..like change the button sites og alternative button  in another
site

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


[android-developers] my left side not working

2011-10-07 Thread remon ramses
my ideos x5 left sie of the screen not working.can an body helping me
because ever thing needs tge left side ..like yes or start buttons in
games..can i change the direction of the screen

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


[android-developers] ERROR: cannot recover key (Eclipse)

2011-10-07 Thread Mik
Dear all,

Disclaimer: I am not sure this is an ADT/Android tools problem or
rather an eclipse one.

I went back to my old android app after several months.
I had stored the key and alias on a svn server, so that even if
corrupted I can always recover them.

I have tried now to export a signed version of the same application
from Eclipse, as I always did before.
It didn't work the first 7-8 times, than it did.
After that, it did not work again and it is driving me crazy!

If you have any idea please suggest.
Few hints:
1. I am sure about the password(s)
2. I am sure about CapsLock
3. I restarted eclipse N times with same results, and ubuntu (hosting
system) as well
4. I do not have any other project open in the work space

Error message:
ERROR: cannot recover key

It follows the eclipse .metadata/.log file.

Thanks for any suggestion,
Mik



!SESSION 2011-10-06 07:27:16.498
---
eclipse.buildId=M20100211-1343
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86

!ENTRY org.eclipse.jface 2 0 2011-10-06 07:27:20.484
!MESSAGE Keybinding conflicts occurred.  They may interfere with
normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2011-10-06 07:27:20.484
!MESSAGE A conflict occurred for ALT+CTRL+I:
Binding(ALT+CTRL+I,
ParameterizedCommand(Command(org.eclipse.egit.ui.team.Ignore,Ignore,
,
Category(org.eclipse.egit.ui.commandCategory,Git,null,true),

ActionDelegateHandlerProxy(null,org.eclipse.egit.ui.internal.actions.IgnoreAction),
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(ALT+CTRL+I,

ParameterizedCommand(Command(org.eclipse.team.svn.ui.command.AddToSVNIgnoreCommand,Add
to svn:ignore...,
,

Category(org.eclipse.team.svn.ui.command.category,SVN,null,true),

ActionDelegateHandlerProxy(null,org.eclipse.team.svn.ui.action.local.AddToSVNIgnoreAction),
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
!SUBENTRY 1 org.eclipse.jface 2 0 2011-10-06 07:27:20.484
!MESSAGE A conflict occurred for ALT+CTRL+C:
Binding(ALT+CTRL+C,
ParameterizedCommand(Command(org.eclipse.egit.ui.team.Commit,Commit,
,
Category(org.eclipse.egit.ui.commandCategory,Git,null,true),

ActionDelegateHandlerProxy(null,org.eclipse.egit.ui.internal.actions.CommitAction),
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(ALT+CTRL+C,

ParameterizedCommand(Command(org.eclipse.team.svn.ui.command.CommitCommand,Commit...,
,

Category(org.eclipse.team.svn.ui.command.category,SVN,null,true),

ActionDelegateHandlerProxy(null,org.eclipse.team.svn.ui.action.local.CommitAction),
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)

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


[android-developers] Newbie Question About Eclipse and SDk

2011-10-07 Thread Mark Phillips
I am just diving into Android development, and I have a question about
setting up Eclipse with the SDK. My development machine runs Linux version
3.0.0-1-amd64 (Debian 3.0.0-3), and I understand the SDk is 32 bit. Do I
install the 32 bit Eclipse or the 64 bit Eclipse? Does it matter? Or, should
I setup a 32 bit chroot or VM and work out of there?

Thanks!

Mark

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

[android-developers] data persistence from onDestroy to onCreate

2011-10-07 Thread King Salamon
Can anyone please offer a detailed coding example showing how to keep
textView after a configuration change-such as a screen rotation?
I would like the user to be able to spin the device, and see the data
that was in the textView before the device was rotated. I have read
the documentation -but I really need a coding example. I understand
that the activity is destroyed and then onCreate runs again when the
device is rotated. So, how do I get the data that was in a textView to
stay in the textView after the rotation?

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


[android-developers] SDK problem

2011-10-07 Thread Wojciech
Hi everyone who's reading this. I've recently tried to install all
packages as it's specified but my sdk can't find the path to jdk. I'm
running win 7 64 bits and Eclipse can handle that. How to I add
another environment variable or modify existing one?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 OnEditorActionListener() method's actionId give 0 when I click Done key

2011-10-07 Thread Piraba
I have created own keyboard for my application. Applciation contain
TableLayout that contain ArrayList of products.That table row created
dynamically  contain EditText also. When User click on the EditText,
it should get open keyboard. Up to this point working fine.

Problem is when user enter quantity  click done or Enter key,
editText.OnEditorActionListener(){.. method actionId take 0. But When
I run through the Android keyboard, actionId take 5 for done 6 for
Done.

Why It didn't take the actionId for my own keyboard ?


final EditText txtQty = new EditText(this);
txtQty.setHeight(1);
txtQty.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT, 42));
txtQty.setInputType(InputType.TYPE_CLASS_PHONE);
txtQty.setImeOptions(EditorInfo.IME_ACTION_DONE);
txtQty.setSelectAllOnFocus(true);
txtQty.setTextSize(9);
txtQty.setVisibility(View.VISIBLE);
txtQty.setHint(0.0);
txtQty.setHighlightColor(R.color.green);
tr.addView(txtQty);
 txtQty.setOnEditorActionListener( new OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) {
Log.i(KeyBoard ,Inside the Edit Text);
if (actionId == EditorInfo.IME_ACTION_DONE ||actionId
== EditorInfo.IME_ACTION_NEXT ) { ..}


This is my code:

Please anybody help me this... more than three days spending time with
this part.I couldn't do it

Please anybody help me this...

http://stackoverflow.com/questions/7659570/android-oneditoractionlistener-actionid-give-0-when-i-click-done-key

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

2011-10-07 Thread Piraba
same problem i also facing i decalre like this , but didn't take acttionId 
... why?

 

final EditText txtQty = new EditText(this);
txtQty.setHeight(1);
txtQty.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, 42));
txtQty.setInputType(InputType.TYPE_CLASS_PHONE);
txtQty.setImeOptions(EditorInfo.IME_ACTION_DONE);
txtQty.setSelectAllOnFocus(true);
txtQty.setTextSize(9);
txtQty.setVisibility(View.VISIBLE);
txtQty.setHint(0.0);
txtQty.setHighlightColor(R.color.green);
tr.addView(txtQty);
 txtQty.setOnEditorActionListener( new OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId, KeyEvent 
event) {
Log.i(KeyBoard ,Inside the Edit Text);
if (actionId == EditorInfo.IME_ACTION_DONE ||actionId == 
EditorInfo.IME_ACTION_NEXT ) { ..}

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

[android-developers] Fwd: Screen rotation clears TextView

2011-10-07 Thread King Salamon
Can anyone provide a detailed code example for this issuesomething
more than  use the OnSavedInstance method... I need help solving
this---I understand that the activity is destroyed and recreated when
the screen rotates---so howexactly do I make sure that the textView
elements dont get washed out?
If possible, please provide full code example. Thanks in advance


-- Forwarded message --
From: TreKing treking...@gmail.com
Date: Feb 16, 11:44 am
Subject: Screen rotation clears TextView
To: Android Developers


On Tue, Feb 15, 2011 at 12:40 PM, David Parker
parker.davi...@gmail.comwrote:

 However, when the device is rotated, the Activity resets and that TextView
 gets cleared.
 Does anyone know what the problem might be?

Any way to make sure this Activity does not reset on rotation?

I read the Handling Runtime Changes section of the SDK
documentation, but

 neither onConfigurationChange() nor onRetainNonConfigurationInstance()
 seemed to solve the problem.  Any help would be appreciated.

http://developer.android.com/reference/android/app/Activity.html#onSa...)http://developer.android.com/reference/android/app/Activity.html#onRe...)

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

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


[android-developers] Re: Serializable subclass of non-serializable class

2011-10-07 Thread Lew
'Serializable' is ill-suited for persistence to disk.  'Parcelable' isn't 
much better.  They're intended for in-process or inter-process transfers of 
data, not persistence.  Don't use them.  

'Serializable', in particular, imposes a huge maintenance burden, in that it 
locks down implementation of the class /ad aeternam/.  Read Joshua Bloch's 
entire chapter on serialization in /Effective Java/ for the relevant 
warnings, dangers and gotchas.  There are many.  Really.  Make sure you 
really know what you're doing before using 'Serializable'.

That said, the methods that support serialization can work around your 
trouble, potentially.  You sort of hand-roll the parts not provided upstream 
for you by the API.
http://download.oracle.com/javase/7/docs/api/java/io/Serializable.html

Don't walk into serialization without doing your homework first.  Lesson 
one: it isn't good for persistence.  Lesson two: it isn't cheap.  Or maybe 
it's the other way around.

-- 
Lew

On Wednesday, October 5, 2011 8:20:52 AM UTC-7, Jean-Michel wrote:

 No, I am serialising to disk. 

 Do you think it could work out? 

 Any idea how to use Parcelable ? 

 Many thanks, 
 Jean-Michel 

 On 5 oct, 16:43, Daniel Drozdzewski daniel.dr...@gmail.com 
 wrote: 

  Now luckily for you, Location in Android implements Parcelable 
  interface, which could be of help, depending where are you sending to 
  and receiveing from your Leg/Location related data. 
  If it is within the same machine between a service and an activity, 
  then you are fine.  If you are passing it via network, you need to 
  implement a DTO, that implements Serializeable and holds all the 
  necessary data that you depend on. You then pass that DTO and with its 
  help you create new Location object at the receiving end. 
  
  HTH 
  
  -- 
  Daniel Drozdzewski

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

2011-10-07 Thread King Salamon
sorry if this is redundant--I've been trying to post a reply to this 
thread---Can anyone please supply a full coding example for resolving this 
issue. I want users to be able to rotate the device and not loose the the 
data that is displayed in the textView.

Example:
Gold score card app that records strokes for each hole. score is displayed 
in textView like this:
hole#:  4
hole#: 5
hole#: 6


when the device is rotated, this info disappears. 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] Cannot resolve com.google.android.maps.GeoPoint

2011-10-07 Thread Sunghun Park
Hi everyone.

I am beginner to Android. I am struggling with setup a Android project
in Eclipse but lots of error are happening.
I downloaded and setup AVD and AVD works well. I look into
AndroidManifest.xml and the project is using API Level4 (SDK1.6). So I
set my project to Android 1.6 and also Android Framework  into Java
Build Path.
One of the errors are Eclipse doesn't recognize classes and properties
like com.google.android.maps.GeoPoint and RESULT_CANCELED.
I have tried to change API Level 1 to 12 but it did not work. What do
I do? Please help me.
Thank you 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] Add the widgets in my application

2011-10-07 Thread Zeeshan Abid
hi guys,

I ma working on a launcher. I want to add the widgets of installed
application in my app. can anyone tell that what would be the steps
that i add the appwidgst and launch it.


Thanks in advancce

--
Zeeshan Abid

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


[android-developers] Truncated JSONObject

2011-10-07 Thread phosphor
I developed a TV app and service a while ago, to track my media
storage.  the service sends data in JSON format.  The wife got a new
phone so I'm trying to consume the service from the android SDK.  I
tried the followinf code but I end up with truncated data:

   // Send GET request to service/
GetSeriesListing
HttpGet request = new HttpGet(http://192.168.0.1:1566/
MediaCatalogService.svc  /GetSeriesListing);
request.setHeader(Accept, application/json);
request.setHeader(Content-type, application/json);

DefaultHttpClient httpClient = new DefaultHttpClient();
HttpResponse response = httpClient.execute(request);

HttpEntity responseEntity = response.getEntity();

// Read response data into buffer
char[] buffer = new
char[(int)responseEntity.getContentLength()];
InputStream stream = responseEntity.getContent();
InputStreamReader reader = new 
InputStreamReader(stream);
reader.read(buffer);
stream.close();

String value = new String(buffer)
return value;

Can someone explain why the above truncates the data?  I changed the
code to this:

   // Send GET request to service/GetPlates
HttpGet request = new HttpGet(http://192.168.0.1:1566/
MediaCatalogService.svc/GetSeriesListing);
request.setHeader(Accept, application/json);
request.setHeader(Content-type, application/json);

DefaultHttpClient httpClient = new DefaultHttpClient();
HttpResponse response = httpClient.execute(request);

HttpEntity responseEntity = response.getEntity();
String value = EntityUtils.toString(responseEntity);

This works however I have a question about the overhead of using the
EntityUtils, is it much, ie should I be more focused on figuring out
the truncation issue?

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

2011-10-07 Thread Charley Smith
I tried to set attribute android:launchMode=singleTask for calling
Activity, but it still does not works as I expect

I need that method onCreate(Bundle bundle) to be called only once, but
it still calls each time when I start Activity. I want ensure that
activity is not created each time when it is called

I start Activity using code like this:

public void onClick(View v) {
Intent myIntent = new Intent(v.getContext(),
NextActivity.class);
startActivity(myIntent);
}

Please let me know what I am doing wrong

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


[android-developers] ADB bringup on Android Kernel 3.0

2011-10-07 Thread gvlad...@gmail.com
Hi,
I am new to USB device drivers, I have to bringup USB ADB with Android
Kernel 3.0, When I try to enable ADB using
echo 1  /sys/class/android_usb/android0/enable, Kernel Crashes
Occurs. Can some one help me how do I debug this and what could be the
reason for a Kernel Crash

[  118.03] Unable to handle kernel NULL pointer dereference at
virtual address 0018
[  118.04] pgd = c7058000
[  118.04] [0018] *pgd=2706c831, *pte=, *ppte=
[  118.05] Internal error: Oops: 17 [#1] PREEMPT
[  118.05] Modules linked in:
[  118.05] CPU: 0Tainted: GW(3.0.1-perf+ #7)
[  118.05] PC is at enable_store+0x50/0x144
[  118.05] LR is at enable_store+0x30/0x144
[  118.05] pc : [c0239304]lr : [c02392e4]psr: 6013
[  118.05] sp : c7041f18  ip : ffda  fp : be931e16
[  118.05] r10: c798a908  r9 : 0002  r8 : c7b38220
[  118.05] r7 : 0002  r6 : 0001  r5 : c794a1e0  r4 :

[  118.05] r3 : c0532c20  r2 : c7054000  r1 : 0001  r0 :

[  118.05] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
Segment user
[  118.05] Control: 10c5787d  Table: 27058019  DAC: 0015
[  118.05]
[  118.05] PC: 0xc0239284:
[  118.05] 9284  e3c3303f e5932004 e2422001 e5832004 e5933000
e3130002 0a00 eb0637ab
[  118.05] 92a4  e1a6 e1a01005 e8bd4070 eafffbb9 e92d40f7
e1a04002 e1a07003 ebfe2bfd
[  118.05] 92c4  e28d2008 e59f110c e3a06001 e1a05000 e1a4
e595400c e5226004 ebfd30b9
[  118.05] 92e4  e59d1004 e5d53014 e351 0a21 e353
1a2d e59f30dc e1a4
[  118.05] 9304  e594c018 e28310ec e59f20d0 e1d3e0b8 e7d7c41e
e584c018 e5d3c00a e5c4c01b
[  118.05] 9324  e5d3c00b e5c4c01c e1d3e0bc e594c01c e7d7c41e
e584c01c e5d3c004 e5c4c015
[  118.05] 9344  e5d3c005 e5c4c016 e5d33006 e5c43017 ebfffdec
e594 e5903000 e5933014
[  118.05] 9364  e353 0a01 e1a01006 e12fff33 e3a03001
ea0b e353 0a0b
[  118.05]
[  118.05] LR: 0xc0239264:
[  118.05] 9264  e5832004 e590300c e1530001 1a00 eba9
e121f004 e1a0200d e3c23d7f
[  118.05] 9284  e3c3303f e5932004 e2422001 e5832004 e5933000
e3130002 0a00 eb0637ab
[  118.05] 92a4  e1a6 e1a01005 e8bd4070 eafffbb9 e92d40f7
e1a04002 e1a07003 ebfe2bfd
[  118.05] 92c4  e28d2008 e59f110c e3a06001 e1a05000 e1a4
e595400c e5226004 ebfd30b9
[  118.05] 92e4  e59d1004 e5d53014 e351 0a21 e353
1a2d e59f30dc e1a4
[  118.05] 9304  e594c018 e28310ec e59f20d0 e1d3e0b8 e7d7c41e
e584c018 e5d3c00a e5c4c01b
[  118.05] 9324  e5d3c00b e5c4c01c e1d3e0bc e594c01c e7d7c41e
e584c01c e5d3c004 e5c4c015
[  118.05] 9344  e5d3c005 e5c4c016 e5d33006 e5c43017 ebfffdec
e594 e5903000 e5933014
[  118.05]
[  118.05] SP: 0xc7041e98:
[  118.05] 1e98  c7041ec4 80d0 c7041f14 c7054000 c7041f1c
c7041ed4 c03e1234 c01849f4
[  118.05] 1eb8  c7041f14 040f 0007 0001 0002
c002ed90  0001
[  118.05] 1ed8  c7054000 c0532c20  c794a1e0 0001
0002 c7b38220 0002
[  118.05] 1ef8  c798a908 be931e16 ffda c7041f18 c02392e4
c0239304 6013 
[  118.05] 1f18  c798a900 0001 c7054000 c79a6968 c7b38238
c7041f80 c03e9a20 c01c0f94
[  118.05] 1f38  c79a6968 c010b08c 0002 c7b88ac0 0001dee0
c7041f80 0002 c704
[  118.05] 1f58   c00be834 c7b88ac0 0001dee0 c7b88ac0
0001dee0  
[  118.05] 1f78  0002 c00be968   0002
 0002 0002
[  118.05]
[  118.05] R2: 0xc7053f80:
[  118.05] 3f80      
  
[  118.05] 3fa0      
  
[  118.05] 3fc0      
  
[  118.05] 3fe0      
  
[  118.05] 4000  0a31    
  
[  118.05] 4020      
  
[  118.05] 4040      
  
[  118.05] 4060      
  
[  118.05]
[  118.05] R3: 0xc0532ba0:
[  118.05] 2ba0  0100 c0234314  c04a7036 0100
c02342bc  c04a7040
[  118.05] 2bc0  0100 c02341a4  c04a7049 0180
c0234184 c0234808 
[  118.05] 2be0      
  
[  118.05] 2c00      
c02324cc c0232494 c023245c
[  118.05] 2c20  02000112  000118d1  0100
 c04a8ef1 
[  118.05] 2c40   0409 0002  c05333f0
 c0532c44 c0532d7c
[  118.05] 2c60  c0532d94 

[android-developers] Can not get referrer string correctly

2011-10-07 Thread satoshik
I'm using com.android.vending.INSTALL_REFERRER to track some
information about installation.
My application was working perfectly but suddenly does not works.
I can still catch the intent of INSTALL_REFERRER, but the contents of
extras has changed.

The download link url is something like that.
http://market.android.com/details?id=com.example.myreceiverreferrer=utm_source%3Dsource%26utm_medium%3Demail%26utm_campaign%3Dinvitation

I assume I can get the whole string of referrer with bellow.

@Override
public void onReceive(Context context, Intent intent) {

Bundle extras = intent.getExtras();
String referrerString = extras.getString(referrer);

}

But I got details?doc=com.example.myreceiver.

Does anybody know how to get the correct strings?

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

2011-10-07 Thread Arvind Mohan
Same here,

Awaiting for android sources to be back.

Arvind.

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


[android-developers] USB Bluetooth

2011-10-07 Thread tushar
Hi,
I am enabling USB Bluetooth on Set top box.I am able to send the files
to various phones but not able to reveive any.below erros it shows
while connecting:

1.Authorization Rejected.Also the UUDI is not of OPP
2.mBtClass is NULL.
3.GetServiceAttribute Failed
What does these errors mean?
below is the log.

Please help.

I/power   ( 1097): *** set_screen_state 1
I/power   ( 1097): *** set_screen_state 1
I/ActivityManager( 1097): Starting: Intent
{ act=android.intent.action.MAIN
cmp=com.android.settings/.bluetooth.BluetoothSettings } from pid 1361
I/BluetoothAdapter( 1361): startDiscovery
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: Discovery session
0x52d08 with :1.0 activated
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: external/bluetooth/
bluez/src/adapter.c:session_ref() 0x52d08: ref=1
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: io_security_event
E/BluetoothEventLoop.cpp( 1097): event_filter: Received signal
org.bluez.Adapter:PropertyChanged from /org/bluez/1914/hci0
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:
emit_property_changed..
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:  append_variant..
D/BTDEBUG ( 1369): a.b.adapter.a.DISCOVERY_STARTED
V/BluetoothEventRedirector( 1361): Received
android.bluetooth.adapter.action.DISCOVERY_STARTED
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
I/ActivityManager( 1097): Displayed
com.android.settings/.bluetooth.BluetoothSettings: +539ms
I/power   ( 1097): *** set_screen_state 1
I/power   ( 1097): *** set_screen_state 1
E/BluetoothEventLoop.cpp( 1097): event_filter: Received signal
org.bluez.Adapter:PropertyChanged from /org/bluez/1914/hci0
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:
emit_property_changed..
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:  append_variant..
D/BluetoothService( 1097): BT Discoverable for 120 seconds
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: external/bluetooth/
bluez/src/adapter.c:set_mode() discoverable
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: external/bluetooth/
bluez/src/adapter.c:session_ref() 0x542f8: ref=1
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: io_security_event
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:
emit_property_changed..
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: append_variant..
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: external/bluetooth/
bluez/src/adapter.c:set_mode_complete() discoverable
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: external/bluetooth/
bluez/src/adapter.c:session_unref() 0x542f8: ref=0
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: io_security_event
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
D/dalvikvm( 1361): GC_CONCURRENT freed 404K, 48% free 3210K/6151K,
external 1157K/1619K, paused 2ms+3ms
E/BluetoothEventLoop.cpp( 1097): event_filter: Received signal
org.bluez.Adapter:PropertyChanged from /org/bluez/1914/hci0
E/BluetoothEventLoop.cpp( 1097): event_filter: Received signal
org.bluez.Adapter:DeviceFound from /org/bluez/1914/hci0
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: io_security_event
I//system/bin/bluetoothd( 1913):
bluetoothd[1914]:  .dict_append_entry..
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:  append_variant..
I//system/bin/bluetoothd( 1913): bluetoothd[1914]:
dict_append_entry..
D/BTDEBUG ( 1369): a.b.adapter.a.SCAN_MODE_CHANGED
D/BTDEBUG ( 1369):  a.b.adapter.e.SCAN_MODE = 23
D/BluetoothService( 1097):
updateDeviceServiceChannelCache(00:1D:FD:F6:A2:85)
I//system/bin/bluetoothd( 1913): bluetoothd[1914]: rec is NULL
E/bluetooth_common.cpp( 1097): dbus_func_args_timeout_valist: D-Bus
error in GetServiceAttributeValue: org.bluez.Error.Failed
(GetServiceAttribute Failed)
D/BluetoothService( 1097):  uuid(system):
1108--1000-8000-00805f9b34fb -1
D/BluetoothService( 1097):  uuid(system):
1105--1000-8000-00805f9b34fb 9
D/BTDEBUG ( 1369): a.b.device.a.FOUND
D/BTDEBUG ( 1369):  a.b.device.e.DEVICE = 00:1D:FD:F6:A2:85
D/BTDEBUG ( 1369):  a.b.device.e.CLASS = 5a020c
D/BTDEBUG ( 1369):  a.b.device.e.RSSI = 0
D/BTDEBUG ( 1369):  a.b.device.e.NAME = Tushar
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
V/BluetoothEventRedirector( 1361): Received
android.bluetooth.device.action.FOUND
I/BluetoothClass( 1361): Failed to connect tushar 5898764
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null
W/CachedBluetoothDevice( 1361): mBtClass is null

[android-developers] how to disable setting tools of default camera.

2011-10-07 Thread Akhilesh Mani
Hi,
Please tell me how to disable setting tools of default camera.

Regards.
Mani.

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

[android-developers] debugging using a device on MAC OS Lion

2011-10-07 Thread lbstr
I have a little problem on connecting HeroTab M10 HT-PAD 1051 Tianfeng
tablet (its chinese and it doesn't have any vendor ids) to my mac os
lion OS...Can anybody help?

Note: I have already tried EasyTether soft but couldn't get how it
works...I couldn't even connect to a device not talking about
debugging.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] In AutoCompleteVeiw calling setAdapter() and setThreshod() gives error

2011-10-07 Thread KK
Thanks Kostya...


2011/10/7 Kostya Vasilyev kmans...@gmail.com

 The compiler is right - your curly braces are not matching up.

 The code you highlighted should be inside onCreate, not like it is now.

 --
 Kostya Vasilyev
 07.10.2011 9:04 пользователь KK dioxide.softw...@gmail.com написал:

  Hi All,
  I'm trying a sample code available on the web, in which I'm trying to
 test
  AutoCompleteView. When trying to call setAdapter() method in following
  lines:
 
  * autoCompTxt.setAdapter(arrayAdapter);*
  * autoCompTxt.setThreshold(3);*

 
  I'm getting the following errors;
 
  *Multiple markers at this line*
  * - Syntax error on token arrayAdapter, VariableDeclaratorId expected
  after *
  * this token*
  * - Syntax error on token(s), misplaced construct(s)*

 
  The code for the main Activity is as below:
 
  *package com.demo.autocomp;*
  *
  *
  *import android.app.Activity;*
  *import android.os.Bundle;*
  *import android.widget.ArrayAdapter;*
  *import android.widget.AutoCompleteTextView;*
  *
  *
  *public class AutoCompleteDemoActivity extends Activity {*
  * private final static String[] presidents = { Dwight D. Eisenhower,
 John
  F. Kennedy,*
  * Lyndon B. Johnson, Richard Nixon, Gerald Ford,*
  * Jimmy Carter, Ronald Reagan, George H. W. Bush,*
  * Bill Clinton, George W. Bush, Barack Obama };*
  *
  *
  * /** Called when the activity is first created. */*
  * @Override*
  * public void onCreate(Bundle savedInstanceState) {*
  * super.onCreate(savedInstanceState);*
  * setContentView(R.layout.main);*
  * }*
  *
  *
  * AutoCompleteTextView autoCompTxt = (AutoCompleteTextView)
  findViewById(R.id.autoCompleteTextView1);*
  * ArrayAdapterString arrayAdapter = new ArrayAdapterString(*
  * getApplicationContext(),*
  * android.R.layout.simple_dropdown_item_1line, presidents);*
  * autoCompTxt.setAdapter(arrayAdapter);*
  * autoCompTxt.setThreshold(3);*
  *}*

 
 
  The corresponding res/layoute/main.xml is as below(there is no errors in
  main.xml, just posting for reference purposes):
 
  *?xml version=1.0 encoding=utf-8?*
  *LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
 *
  * android:orientation=vertical android:layout_width=fill_parent*
  * android:layout_height=fill_parent*
  * TextView android:layout_width=fill_parent*
  * android:layout_height=wrap_content android:text=@string/president
 /*
  * AutoCompleteTextView android:layout_width=match_parent*
  * android:id=@+id/autoCompleteTextView1
  android:layout_height=wrap_content*
  * android:text=AutoCompleteTextView*
  * requestFocus/requestFocus*
  * /AutoCompleteTextView*
  */LinearLayout*

 
  Would appreciate if someone can point me what is wrong here or how to fix
  the error and make the code work.
 
  Thanks,
  KK
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

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

[android-developers] Re: Json - 2 Emulators

2011-10-07 Thread Paul Turchenko
Why not use tcpip to do that? Just setup port forwarding in adb

On Oct 6, 9:35 pm, Diogo Salaberri caxix...@gmail.com wrote:
 Hello guys, I want to transfer data from a emulator to another emulator,
 running on the same machine. But when the SMS was received, the message
 isn't like the message was send. Looks like a encode problem.

 1) Is other method to do this data transfer ?

 2) Over SMS, this is a recognized problem ?

 Thanks, bye.

 --
 Atenciosamente;
 Diogo Bonoto Salaberri
 Bacharel em Ciência da Computação - UFPel
 Compasso - Software Developer

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

2011-10-07 Thread Diogo Salaberri
Any tutorial for port forward ?

On Fri, Oct 7, 2011 at 8:46 AM, Paul Turchenko paul.turche...@gmail.comwrote:

 Why not use tcpip to do that? Just setup port forwarding in adb

 On Oct 6, 9:35 pm, Diogo Salaberri caxix...@gmail.com wrote:
  Hello guys, I want to transfer data from a emulator to another emulator,
  running on the same machine. But when the SMS was received, the message
  isn't like the message was send. Looks like a encode problem.
 
  1) Is other method to do this data transfer ?
 
  2) Over SMS, this is a recognized problem ?
 
  Thanks, bye.
 
  --
  Atenciosamente;
  Diogo Bonoto Salaberri
  Bacharel em Ciência da Computação - UFPel
  Compasso - Software Developer

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




-- 
Atenciosamente;
Diogo Bonoto Salaberri
Bacharel em Ciência da Computação - UFPel
Compasso - Software Developer

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

2011-10-07 Thread Jean-Michel
No Kris, I just did not think about it, and apparently it does
(trigger ANR).

I have transformed my service in IntentService and I have not had the
problem since.
I think it is solved, but it was a bit touch and go I am not 100%
suree yet.

Thanks
JM

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Avoiding POT rule for Opengl Textures: Overlapp a transparent POT bitmap with non POT bitmap?

2011-10-07 Thread Adam Ratana
What is this for, perhaps that will give a better understanding?

In your other thread I suggested packing the textures into a POT sized 
image.  This can be done non-programmatically, in photoshop or GIMP for 
example.  You may also want to turn inScaling off if you're loading bitmaps 
using the BitmapFactory, and have your source bitmaps be POT sized 
originally.

On Friday, October 7, 2011 6:37:46 AM UTC-4, saex wrote:

 i need to load non POT bitmaps into my opengl es app for android. 

 What i need is to overlap my non POT bitmap into another bitmap with 
 POT size. I need to overlap the non POT bitmap in the center of the 
 POT bitmap. 

 How can i do it? 

 i tryed with createScaledBitmap but it stretches the image and i dont 
 want that. 

 Thanks 


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

Re: [android-developers] SU Request

2011-10-07 Thread Kristopher Micinski
You can't do this in the API.  It's impossible...

On Thu, Oct 6, 2011 at 8:55 AM, JD james.dez...@gmail.com wrote:
 Can someone please give me a clear, simple, short, and most
 importantly, working example of how to edit a database that another
 app created? After days and days of searching, it's amazing that
 nobody seems to truly understand how to do this. All I find is the
 same old post, copied and pasted all over the internet that says:

 Process p = Runtime.getRuntime().exec(su);


If you're on the majority of devices out there, this won't work...


 Ok now what? How do I use that p object to open and edit a database?


I assume you won't use p at all, it's simply an external process, by
this time it will have returned (hopefully 0, for your sake)..

Then, if you *have* root privileges, you can load an SQLite database...

How do you do that?

http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#openDatabase(java.lang.String,
android.database.sqlite.SQLiteDatabase.CursorFactory, int)

But, like I said, on the majority of devices out there, this will tell
you to go away..

Kris..

P.s., you still need to know the database path.  Why do you need to
access another app's database?  In general you shouldn't be able to,
and shouldn't have to, if it's for a purpose you have control over,
get the app's provider to expose a content provider to 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: Units of measurement

2011-10-07 Thread niels
Thanks for the info. As result of another discussion I already had a
look at the DisplayMetrics class. They clearly state there, that I
can't rely on dip because it's just based on the default density
(160dpi, 240dpi, 320dpi, etc.) which is nearest to the device's real
density. So this (official) docu is simply wrong:
http://developer.android.com/guide/practices/screens_support.html

So at least theory allows correct scaling, if I don't use XML (which
from my point of view is a design error). But in practice HTC
Sensation unluckily returns crap when trying to read ot X and Y DPI.
Both values are around 160 whereas they should be something around
256.

Regards,
Niels

On Oct 6, 4:54 pm, Studio LFP studio@gmail.com wrote:
 I don't think you will be able to do this with a XML layout. You probably
 want to take a look at this

 http://developer.android.com/reference/android/util/DisplayMetrics.ht...

 There is both xdpi and ydpi. That should be checked to get the actual dpi in
 both directions and then a view created with those calculations should get
 you where you want to go.

 Here is what I get on a few of my devices in portrait mode:

 // --- Sample Code Start ---
 DisplayMetrics metrics = new DisplayMetrics();
 Display display = getWindowManager().getDefaultDisplay();
 display.getMetrics( metrics );

 Log.i( TestProject, X DPI:  + metrics.xdpi );
 Log.i( TestProject, Y DPI:  + metrics.ydpi );
 // --- Sample Code End ---

 *Samsung Galaxy Tab (7 inch):*
 X DPI: 168.89351
 Y DPI: 169.3

 *Motorola Droid Bionic:*
 X DPI: 258.79245
 Y DPI: 256.67368

 *Sony Xperia Play:*
 X DPI: 239.05882
 Y DPI: 243.72585

 Steven
 Studio LFPhttp://www.studio-lfp.com

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


[android-developers] activity launches with wrong layout orientation

2011-10-07 Thread Simon
Hi,

I have an activity that I have two layouts defined for: one for
landscape and one for portrait.  So in my layout folder I have
activity.xml and activity_landscape.xml.  When I am switching around
orientation on my device the proper layout is loading on orientation
change.  However, if I am in landscape mode, and then launch this
activity from another activity, the portrait layout is rendered, even
though the device is in landscape mode.  I am launching the activity
using the following:

Intent i = new Intent(OtherActivity.this, Activity.class);
startActivityForResult(i, ACTIVITY_X);

Does anybody have any ideas for why this could be happening?  Seems
strange that it would work except for on initial load of the activity.

Thanks,

Simon

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


[android-developers] activity launches with wrong layout orientation

2011-10-07 Thread Simon
Hi,

I have an activity that I have two layouts defined for: one for
landscape and one for portrait.  So in my layout folder I have
activity.xml and activity_landscape.xml.  When I am switching around
orientation on my device the proper layout is loading on orientation
change.  However, if I am in landscape mode, and then launch this
activity from another activity, the portrait layout is rendered, even
though the device is in landscape mode.  I am launching the activity
using the following:

Intent i = new Intent(OtherActivity.this, Activity.class);
startActivityForResult(i, ACTIVITY_X);

Does anybody have any ideas for why this could be happening?  Seems
strange that it would work except for on initial load of the activity.

Thanks,

Simon

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


Re: [android-developers] Re: Units of measurement

2011-10-07 Thread Kostya Vasilyev
The quantized density value (160/240 etc) is used by resource loading code,
and so can be expected to be there. Some devices deliberately use a value
that is not the closest match to the actual physical density, but it's the
same for all applications on the device.

The xdpi and ydpi can sometimes be completely nonsensical.

If you need exact actual physical screen density (e.g. for a ruler type
application), consider providing a calibration mode in your application.

--
Kostya Vasilyev
07.10.2011 16:50 пользователь niels nioer...@googlemail.com написал:

 Thanks for the info. As result of another discussion I already had a
 look at the DisplayMetrics class. They clearly state there, that I
 can't rely on dip because it's just based on the default density
 (160dpi, 240dpi, 320dpi, etc.) which is nearest to the device's real
 density. So this (official) docu is simply wrong:
 http://developer.android.com/guide/practices/screens_support.html

 So at least theory allows correct scaling, if I don't use XML (which
 from my point of view is a design error). But in practice HTC
 Sensation unluckily returns crap when trying to read ot X and Y DPI.
 Both values are around 160 whereas they should be something around
 256.

 Regards,
 Niels

 On Oct 6, 4:54 pm, Studio LFP studio@gmail.com wrote:
  I don't think you will be able to do this with a XML layout. You probably
  want to take a look at this
 
  http://developer.android.com/reference/android/util/DisplayMetrics.ht...
 
  There is both xdpi and ydpi. That should be checked to get the actual dpi
 in
  both directions and then a view created with those calculations should
 get
  you where you want to go.
 
  Here is what I get on a few of my devices in portrait mode:
 
  // --- Sample Code Start ---
  DisplayMetrics metrics = new DisplayMetrics();
  Display display = getWindowManager().getDefaultDisplay();
  display.getMetrics( metrics );
 
  Log.i( TestProject, X DPI:  + metrics.xdpi );
  Log.i( TestProject, Y DPI:  + metrics.ydpi );
  // --- Sample Code End ---
 
  *Samsung Galaxy Tab (7 inch):*
  X DPI: 168.89351
  Y DPI: 169.3
 
  *Motorola Droid Bionic:*
  X DPI: 258.79245
  Y DPI: 256.67368
 
  *Sony Xperia Play:*
  X DPI: 239.05882
  Y DPI: 243.72585
 
  Steven
  Studio LFPhttp://www.studio-lfp.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

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

2011-10-07 Thread TreKing
On Thu, Oct 6, 2011 at 10:13 PM, Ubiracy Santos ubiracy@gmail.comwrote:

 the users cannot exit. the application in other words will be a embedded
 software


Then build your own version of the platform. Then you will have full
control.

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

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

[android-developers] Scenario where initLoader() does not call onLoadFinished()

2011-10-07 Thread kaciula
I have a simple activity with one fragment. The fragment uses a CursorLoader 
to load some data from a ContentProvider. I just call initLoader() inside 
onActivityCreated() and I populate the UI in onLoadFinished(). If I switch 
orientations, everything works as expected (onLoadFinished() is called 
again).

Now, if I move to a new activity, press BACK to get back to my first 
activity and then switch orientations, I see that onLoaderReset() is called 
and then, in onActivityCreated(), although initLoader() is called, 
onLoadFinished() is never called after that. And as a consequence, my UI 
shows no data.

After doing some testing, I see that this problem appears only if I use 
setRetainInstance(true) in my fragment. So what's the deal? And how can I 
fix this without removing setRetainInstance(true)? Do I have to do something 
in onLoaderReset()? Do I have to somehow give the loader the new activity as 
the context?

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: HTC and LG haven't implemented Android in the right way

2011-10-07 Thread MobileVisuals
I have implemented this according to your approach now. I replaced
attenuated points with texture mapped quads.  I implemented bilinear
filtering and alpha test.
It works, but the visual quality is not good. It doesn't look at all
as good as with Point sprites and size attenuation. It looked shiny
and smooth when I used Point sprites and size attenuation and it was
fast:
http://www.mobile-visuals.com/mgw.php

Now it is just rough and dull and it is slow:
http://www.mobile-visuals.com/dull.png

Are you really sure that is possible to get good visual quality with
your approach?

On Sep 29, 9:26 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 29.09.2011 23:01, MobileVisuals ?:

  I claim that HTC HD doesn't support OpenGL ES 2.0, because size
  attenuation is a part of OpenGL ES 1.1 and it is not supported.

 Quite possibly, you're right...

  So HTC hasn't implemented the things that they say in the
  specification, but why not?

 Who knows?

 You could contact their support, but even if they provide a plausible
 answer (and that's a big if), it's not going to magically fix all the
 HTC devices out there...

  Thanks for the idea, do you mean like this?

  Scale to small size if the sprite is far away.
  Scale to medium size if the sprite is medium distance.
  Scale to big size if the sprite is close.

 More or less - you are currently doing continuous range scaling of your
 sprites (I presume). If you replace them with texture mapped quads, you
 could always use the same image, or pick one of the ones predefined at
 various scale factors, to improve the image quality and performance.
 Sort of like mip-mapping.

 But that's not the core idea - the main thing is to replace attenuated
 points with texture mapped quads.

  That could work for other animations, but it would be very slow for my
  star cluster animations. There are hundreds of stars in each cluster.
  As it is now, I draw each star cluster in one single glDrawArrays
  call. That makes it fast.

 Hundreds doesn't sound too bad - at those poly counts, it's the fill
 rate (overdraw) that can kill performance. But since sprites are
 typically small, it probably won't be an issue.

  Wouldn't I have to make one glDrawArrays call for each one of the
  stars if I had to scale them in different sizes? That would mean
  hundreds of glDrawArrays calls instead of one.

 Not the way I'm reading the docs (mind you, my GL is more than a little
 rusty - last time I worked with 3D was more than 10 years ago)

 But it seems like you should be able to draw all quads that use the same
 texture in one call, using GL_TRIANGLES or GL_QUADS (not _STRIP or _FAN,
 because those are always joined). This can product transparency
 artifacts depending on their z-order, so you'd need to sort the quads
 according to their texture and z-order both.

 Or just forgo the mipmapping for initial tests, then there's be one less
 thing to worry about with respect to sorting.

  A point sprite is a screen-aligned element of variable size that is
  defined by a single point. Would it really be a sprite if it was
  mapped to a quad polygon?

 If it looks like a sprite, and quacks like a sprite...

 --
 Kostya Vasilyev

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


[android-developers] Building my own Android OS for S3C6410

2011-10-07 Thread Mike L.
I need to be able to access the different ports on my S3C6410 board.
Most importantly the Analog to digital converter. I am wondering how
big of a project it is to compile my own Android OS and if anyone can
give me some time saving pointers.

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


[android-developers] Re: Framework Sensor Support

2011-10-07 Thread CVS
Hi Dani,

Android assumes (and rightly so far) that ONLY one sensor of each type is 
present on the device.
Mulitiple sensors of same type are not supported in the framework.

If ur device has multiple sensors of same type onboard and you *really* want 
to enable both, then
1. Enable the kernel drivers for both sensors.
2. Add additonal switch-sensorfunctionality in the sensor-HAL.
(the code that generates your /system/lib/sensor.so)
3. Use the switch-sensor function interface u added in step2 in your 
programs.

Note that other programs (using standard Android API) will NOT be aware of 
the 2 sensors of the same type.
They will continue using the default sensor exposed by the sensor-HAL.

regards
CVS

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

2011-10-07 Thread TreKing
On Fri, Oct 7, 2011 at 12:50 AM, bhumi kania bska...@gmail.com wrote:

 I was asking about the sample algorithm that is removing the overlapped
 node in the hierarchical view.


Sample algorithm?


 Now I have to draw this hierarchy.
 The graph is ready but some nodes are overlapped somewhere.
 So I need to remove that overlapping.


This sounds like a logic bug specific to your app.


 I had googling the algorithm that removes the overlapping of node. But I am
 unable to implement that algorithm.


The algorithm? That algorithm?

If you have any idea about that then let me know.


I have no idea because you have still not explained what the algorithm is,
you're just making vague references to it.

Regardless, whatever algorithm you're having trouble with, figuring it out
is an app-specific logic problem or a general computer-science problem at
best.

This does not appear to be Android specific so you're not going to get much
help here.

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

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

Re: [android-developers] Building my own Android OS for S3C6410

2011-10-07 Thread Appaholics
You should ask this on the android-building and android-porting lists. This
list deals with the SDK. The people there would know this kind of stuff
better than us.

Thanks

On Fri, Oct 7, 2011 at 7:14 PM, Mike L. mpla...@gmail.com wrote:

 I need to be able to access the different ports on my S3C6410 board.
 Most importantly the Analog to digital converter. I am wondering how
 big of a project it is to compile my own Android OS and if anyone can
 give me some time saving pointers.

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




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

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

[android-developers] Re: Building my own Android OS for S3C6410

2011-10-07 Thread Mike L.
Thank you

On Oct 7, 9:47 am, Appaholics raghavs...@appaholics.in wrote:
 You should ask this on the android-building and android-porting lists. This
 list deals with the SDK. The people there would know this kind of stuff
 better than us.

 Thanks

 On Fri, Oct 7, 2011 at 7:14 PM, Mike L. mpla...@gmail.com wrote:
  I need to be able to access the different ports on my S3C6410 board.
  Most importantly the Analog to digital converter. I am wondering how
  big of a project it is to compile my own Android OS and if anyone can
  give me some time saving pointers.

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

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

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


Re: [android-developers] Reduce Application Heap size

2011-10-07 Thread TreKing
On Fri, Oct 7, 2011 at 1:28 AM, Karthik A aykart...@gmail.com wrote:

 Is there any other way to reduce like using command prompt, or API?


Um ... no.

You allocate stuff. The heap grows proportional to how much you allocate. If
you don't want it to grow that much, don't allocate that much. You can't
magically reduce your heap size without addressing what's using it up. Look
at the tools section to see what tools are available to you to track down
your memory use.

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

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

Re: [android-developers] Reduce Application Heap size

2011-10-07 Thread Karthik A
Thank you very much TreKing for your very useful immediate reply.

On Fri, Oct 7, 2011 at 7:19 PM, TreKing treking...@gmail.com wrote:

 On Fri, Oct 7, 2011 at 1:28 AM, Karthik A aykart...@gmail.com wrote:

 Is there any other way to reduce like using command prompt, or API?


 Um ... no.

 You allocate stuff. The heap grows proportional to how much you allocate.
 If you don't want it to grow that much, don't allocate that much. You can't
 magically reduce your heap size without addressing what's using it up. Look
 at the tools section to see what tools are available to you to track down
 your memory use.



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

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




-- 
Regards,
A.Karthik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: HTC and LG haven't implemented Android in the right way

2011-10-07 Thread MobileVisuals
The default Galaxy doesn't use Point sprites with size attenuation. It
looks like it is just using plain points with spinning textures in the
background. It looks like all the points have the same size.

Galactic Core  doesn't use Point sprites either. It looks like it is
just using spinning textures. I can't find Galaxy Live Wallpaper on
the market.

I removed all HTC devices from the compatibility list for my Morphing
galaxy live wallpaper, because the HTC users complained that it didn't
look like it should. Here are some screenshots, which shows how it
looks like:

http://www.mobile-visuals.com/mgw.php

On Sep 28, 9:54 am, Dusk Jockeys Android Apps duskjock...@gmail.com
wrote:
 What is the Morphing Galaxy Live Wallpaper? I cant see that on the
 Market.

 The default Galaxy, Galactic Core and Galaxy Live Wallpaper all work
 perfectly well on my HTC Desire HD, with no blurring, so they are
 probably not doing things the same way as you are.

 On Sep 28, 2:36šam, MobileVisuals eyv...@astralvisuals.com wrote:

  Yes, that is exactly what I am doing. I am using point sprites with
  size attenuation for my space animations, like the Morphing Galaxy
  live wallpaper.
  But what is the use of point sprites if the size attenuation do not
  work?

  The size attenuation is not supported on devices from HTC and LG. This
  is what I mean with size attenuation:

 http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml

  All the point sprites get the same size if the size attenuation do not
  work, which results in a blurry mess.

  It looks like it should on most Android devices, but not those from
  HTC and LG.

  On Sep 27, 7:11špm, Nightwolf mikh...@gmail.com wrote:

   Point sprites can be used to display stars in space.

   On 27 ÓÅÎ, 11:26, MobileVisuals eyv...@astralvisuals.com wrote:

I need Point attenuation to produce space animations with shining
particles, which look like stars. How can I achieve that effect
without using Point attenuation?
Do you mean that I should make small rectangular polygons with
transparent textures instead? I have tried that before on M3G and it
didn't look as good as Point attenuation.

Anti-Aliasing is a method of fooling the eye that a jagged edge is
really smooth.Will that really be enough to get the same effect as
Point attenuation? Could you please be more specific in which OpenGL
technique I should use to make it work on HTC and LG?

Isn't Point attenuation a part of the Android OpenGL standard?
Shouldn't HTC and LG support it in that case?

On Sep 27, 3:34šam, Indicator Veritatis mej1...@yahoo.com wrote:

 Short answer: no. Longer: why do you need point attenuation? There are
 other ways to do anti-aliasing, and some really cool graphics have
 been done for Android phones using that instead of point attenuation.

 On Sep 26, 6:26šam, MobileVisuals eyv...@astralvisuals.com wrote:

  I have found that everything implemented with Point attenuation will
  look like a blurry mess on devices from HTC and šLG. This happens on
  even the newest devices from HTC, like HTC Desire HD. Why is it like
  this? Haven't they implemented Android in the right way?

  Point attenuation works like it should on most Android devices, like
  those from Samsung. I have implemented Point attenuation according 
  to
  the Android specification in two of my company's apps.I have worked
  with Point attenuation on Symbian and C++ before, so I am quite sure
  that I have implemented it the right way. It is about the same code
  implementation in all OpenGL.

  Shouldn't all new Android devices support Point attenuation? It 
  works
  on IPhone, so I think Point attenuation should work on all new 
  Android
  devices too.- Hide quoted text -

  - Show quoted text -

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


Re: [android-developers] Re: Units of measurement

2011-10-07 Thread Studio LFP
Kostya,

I'll have to keep this in mind.  I guess the hardware manufacturers decide 
if they want to follow the rules fully or not in a lot of cases. You would 
think that this would be one of the things that manufacturers would do 
correctly since it's so easy to get right from their perspective.

Niels,

I'm thinking the calibration mode would be necessary if some devices aren't 
reporting their dpi correctly. Since it seems you are looking for the 
ability to show real world size of an object on a phone, you could use a 
common object and have the user size the picture to the object.  Maybe use a 
penny or a dime? Have the user set it on a picture on the phone and use 
plus/minus buttons to match the picture on the phone to the real thing?

Steven
Studio LFP
http://www.studio-lfp.com


On Friday, October 7, 2011 8:09:37 AM UTC-5, Kostya Vasilyev wrote:

 The quantized density value (160/240 etc) is used by resource loading code, 
 and so can be expected to be there. Some devices deliberately use a value 
 that is not the closest match to the actual physical density, but it's the 
 same for all applications on the device.

 The xdpi and ydpi can sometimes be completely nonsensical.

 If you need exact actual physical screen density (e.g. for a ruler type 
 application), consider providing a calibration mode in your application.

 --
 Kostya Vasilyev
 07.10.2011 16:50 пользователь niels nioe...@googlemail.com написал:

 Thanks for the info. As result of another discussion I already had a
 look at the DisplayMetrics class. They clearly state there, that I
 can't rely on dip because it's just based on the default density
 (160dpi, 240dpi, 320dpi, etc.) which is nearest to the device's real
 density. So this (official) docu is simply wrong:
 http://developer.android.com/guide/practices/screens_support.html

 So at least theory allows correct scaling, if I don't use XML (which
 from my point of view is a design error). But in practice HTC
 Sensation unluckily returns crap when trying to read ot X and Y DPI.
 Both values are around 160 whereas they should be something around
 256.

 Regards,
 Niels

 On Oct 6, 4:54 pm, Studio LFP studi...@gmail.com wrote:
  I don't think you will be able to do this with a XML layout. You 
 probably
  want to take a look at this
 
  http://developer.android.com/reference/android/util/DisplayMetrics.ht.
 ..
 
  There is both xdpi and ydpi. That should be checked to get the actual 
 dpi in
  both directions and then a view created with those calculations should 
 get
  you where you want to go.
 
  Here is what I get on a few of my devices in portrait mode:
 
  // --- Sample Code Start ---
  DisplayMetrics metrics = new DisplayMetrics();
  Display display = getWindowManager().getDefaultDisplay();
  display.getMetrics( metrics );
 
  Log.i( TestProject, X DPI:  + metrics.xdpi );
  Log.i( TestProject, Y DPI:  + metrics.ydpi );
  // --- Sample Code End ---
 
  *Samsung Galaxy Tab (7 inch):*
  X DPI: 168.89351
  Y DPI: 169.3
 
  *Motorola Droid Bionic:*
  X DPI: 258.79245
  Y DPI: 256.67368
 
  *Sony Xperia Play:*
  X DPI: 239.05882
  Y DPI: 243.72585
 
  Steven
  Studio LFPhttp://www.studio-lfp.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-d...@googlegroups.com
 To unsubscribe from this group, send email to
 android-develop...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



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

[android-developers] Re: activity running in background problem

2011-10-07 Thread Studio LFP
What exactly are you trying to accomplish?

You want activity B to not be killed? Or a set of code to help you remember 
where B was and recreate it?

Steven
Studio LFP
http://www.studio-lfp.com


On Wednesday, October 5, 2011 6:58:36 AM UTC-5, Rafa Maas wrote:

 I have a IM client and this is my scenario:
 activity A starts activity B.
 The user press back and activity B goes background.
 After ~30 minutes android kill activity B ( This is a normal android
 behavior... i know :P)

 I try to set alwaysRetainTaskState =true and  launchMode=singleTask in
 activity B manifest configuration, but without sucess :(

 How can i prevent this?

 Tanx



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

2011-10-07 Thread Nick Risaro
First learn java, then remove the ; at the end of the lines inside the if
condition

On Thu, Oct 6, 2011 at 12:28 AM, Isaac Ng isaac.n...@gmail.com wrote:

 if (item.equalsIgnoreCase(I. The Global Business Environment));


Should be
if (item.equalsIgnoreCase(I. The Global Business Environment))

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

2011-10-07 Thread Studio LFP
The only way I know people have done this is a simple GPS location update to 
a server.  The server then checks for others that have reported back and 
returns those that are under a specified range.

I think that may be your only option.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: overlapped nodes in graph

2011-10-07 Thread Studio LFP
So you are storing data from a server and drawing a graph on a canvas?

Your explination is throwing me off a bit since you say you have multiple 
activities, which is an object in Android, but could be something like a 
playtime activity also.

If you are just getting data from a server, you could always store it in a 
database and use the DISTINCT or GROUP BY features to help with the overlap. 
You could also use that storage to cache the data and just check to see if 
newer data was available, and if not, just use your local copy and save the 
user time and bandwidth.

Steven
Studio LFP
http://www.studio-lfp.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] Re: HTC and LG haven't implemented Android in the right way

2011-10-07 Thread Kostya Vasilyev
Looking at the dull screenshot, I can see that your sprites are wrong 
- they don't have transparency around the point itself.


The black square quads are clearly visible, and they shouldn't be.

The brightness level is what you put in the textures, you should be able 
to make them as bright as you want.


As for performance, I haven't done any 3D work specifically on Android 
devices, so can't say for sure. Using glDrawArrays should help, does it not?


-- Kostya

07.10.2011 17:44, MobileVisuals пишет:

I have implemented this according to your approach now. I replaced
attenuated points with texture mapped quads.  I implemented bilinear
filtering and alpha test.
It works, but the visual quality is not good. It doesn't look at all
as good as with Point sprites and size attenuation. It looked shiny
and smooth when I used Point sprites and size attenuation and it was
fast:
http://www.mobile-visuals.com/mgw.php

Now it is just rough and dull and it is slow:
http://www.mobile-visuals.com/dull.png

Are you really sure that is possible to get good visual quality with
your approach?

On Sep 29, 9:26 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

29.09.2011 23:01, MobileVisuals ?:


I claim that HTC HD doesn't support OpenGL ES 2.0, because size
attenuation is a part of OpenGL ES 1.1 and it is not supported.

Quite possibly, you're right...


So HTC hasn't implemented the things that they say in the
specification, but why not?

Who knows?

You could contact their support, but even if they provide a plausible
answer (and that's a big if), it's not going to magically fix all the
HTC devices out there...


Thanks for the idea, do you mean like this?
Scale to small size if the sprite is far away.
Scale to medium size if the sprite is medium distance.
Scale to big size if the sprite is close.

More or less - you are currently doing continuous range scaling of your
sprites (I presume). If you replace them with texture mapped quads, you
could always use the same image, or pick one of the ones predefined at
various scale factors, to improve the image quality and performance.
Sort of like mip-mapping.

But that's not the core idea - the main thing is to replace attenuated
points with texture mapped quads.


That could work for other animations, but it would be very slow for my
star cluster animations. There are hundreds of stars in each cluster.
As it is now, I draw each star cluster in one single glDrawArrays
call. That makes it fast.

Hundreds doesn't sound too bad - at those poly counts, it's the fill
rate (overdraw) that can kill performance. But since sprites are
typically small, it probably won't be an issue.


Wouldn't I have to make one glDrawArrays call for each one of the
stars if I had to scale them in different sizes? That would mean
hundreds of glDrawArrays calls instead of one.

Not the way I'm reading the docs (mind you, my GL is more than a little
rusty - last time I worked with 3D was more than 10 years ago)

But it seems like you should be able to draw all quads that use the same
texture in one call, using GL_TRIANGLES or GL_QUADS (not _STRIP or _FAN,
because those are always joined). This can product transparency
artifacts depending on their z-order, so you'd need to sort the quads
according to their texture and z-order both.

Or just forgo the mipmapping for initial tests, then there's be one less
thing to worry about with respect to sorting.


A point sprite is a screen-aligned element of variable size that is
defined by a single point. Would it really be a sprite if it was
mapped to a quad polygon?

If it looks like a sprite, and quacks like a sprite...

--
Kostya Vasilyev


--
Kostya Vasilyev

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


[android-developers] EditText with custom behavior

2011-10-07 Thread Raffaele Sgarro
I want my custom EditText to behave like this

   - When app starts it seems a TextView (ie normal text on solid color 
   background, cursor not shown)
   - When users taps, it changes its appearance to look selected (ie a 
   different background, still cursor not displayed)
   - When user long taps, it requests focus and shows soft keyboard if 
   necessary
   - When user tap anywhere else, the last long tapped custom EditText, if 
   any, goes back in the normal state

It seems quite basic to me, however I can't get it to work properly. A 
number of unwanted things happens, and when I try to repair one of them, a 
plenty of new issues arise. I'd like to know if there is a simple workflow 
for getting an EditText which behaves

   1. like a normal TextView when doesn't interact with user and when user 
   tap it
   2. like a clicked EditText when user long clicks it (ie show soft 
   keyboard if necessary and possibly change appearance)

Please help me. I have read all the docs and the sources for View, TextView 
and EditText, but the interaction among focus, motion events, selection, etc 
are so difficult to understand and the code is not commented at all.

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

2011-10-07 Thread Studio LFP
You are really going at that the hard way.

When using a ListView, checking for a string on a view is really 
inefficient. You could use the position or the id as a trigger point and 
use a case statement to make it faster and easier.

list.setOnItemClickListener(new OnItemClickListener() 
{
@Override
 public void onItemClick( AdapterView? parent, View view, int position, 
long id )
{
jump_to_chapter( position ); // or use the id if that works better in your 
scheme
}
 }

-- OR --

list.setOnItemClickListener(new OnItemClickListener() 
{
@Override
public void onItemClick( AdapterView? parent, View view, int position, 
long id )
{
switch( position ) // or switch on id
{
case 1: // Do something for 1
break;
case 2: // Do something for 2
break;
 case 3: // Do something for 3
break;
 case 4: // Do something for 4
break;
default: break;
 }
}
} 

They give you the position and ID field to make it easier on you, try 
figuring it out that way and it will be much faster and more flexible.

Steven
Studio LFP
http://www.studio-lfp.com

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

[android-developers] Re: EditText with custom behavior

2011-10-07 Thread Ubiracy Santos
public class CustomEditText extends EditText {
//code here
}

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

2011-10-07 Thread Marcin Orlowski
Use zipped SDK, not .exe (with installer). Known issue.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*



On 6 October 2011 18:56, Wojciech wojciech270...@gmail.com wrote:

 Hi everyone who's reading this. I've recently tried to install all
 packages as it's specified but my sdk can't find the path to jdk. I'm
 running win 7 64 bits and Eclipse can handle that. How to I add
 another environment variable or modify existing one?

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

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

[android-developers] Re: EditText with custom behavior

2011-10-07 Thread Raffaele Sgarro
package com.example.custom.edit.text;

import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;

public class CustomEditTextActivity extends Activity {
public static class CustomEditText extends EditText {

public CustomEditText(Context context) {
super(context);
setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
// TODO This isn't called till we setFocusableInTouchMode(false)
((CustomEditText) arg0).setText(SELECTED);
}
});
setOnLongClickListener(new View.OnLongClickListener() {
public boolean onLongClick(View arg0) {
// TODO request focus and show soft keyboard if necessary
return false;
}
});
}
 // TODO save this so that some listener can
// restore it to NORMAL state
private static CustomEditText mLastTapped;
}


public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
CustomEditText cet;
for (int i = 0; i  5; i++) {
cet = new CustomEditText(this);
cet.setText(NORMAL STATE);
cet.setBackgroundColor(Color.WHITE);
cet.setSelectAllOnFocus(true);
layout.addView(cet, new LinearLayout.LayoutParams(-1, -1, 1));
}
setContentView(layout);
}
}

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

  1   2   >