[android-developers] Re: How to create uses-library

2010-05-10 Thread Vinay S
Hi Karteek,

As Mr. Mark Murphy has suggested create a new project for your
reusable set of code.

Export the same as Jar and include where ever you need them.

Regards,
Vinay

On May 11, 10:53 am, Dianne Hackborn  wrote:
> On Mon, May 10, 2010 at 10:29 PM, karteek  wrote:
> > Sorry I said Java files means it is also using android packages.
> > As you said uses-library is for only  sdk add-ons.
> > Can't we generate add ons to include in my applications
>
> No, this is only for things built in to the system image.  Third party
> shared libraries are not supported.
>
> > My overall idea is to make use some repeated functionality as an
> > library.
> > If i want to generate jar file i need to write it as pure Java
> > application but here it is also using some android api's.
> > what is the way to achieve this.
>
> You don't need to write it as pure Java.  You can have whatever Java code
> you want in a .jar and include it as a static library.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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 can I know if OpenGl has drawn something?

2010-05-10 Thread Robert Green
Hmm.. I'm sorry but this has reached the limit of what I know off-
hand.  I'd have to get into debugging your code to be able to help
more.

I have a feeling one of two things is wrong:

1)  Your projection matrix is not matching what glOrthof is doing (fix
by using glLoadMatrix there)
2)  Something is happening to your modelview matrix later that I can't
see from your code snippet and remappedRotationMatrix no longer
matches it.

Sorry I can't help more.  All I know is that if your "Camera" space is
wrong from what you think it should be, you will face nothing but
problems trying to do visibility tests or picking.  I do 3D visibility
testing of objects by creating frustum bounds and testing against
object bounding boxes - this is all in world space.  I actually don't
need unproject to figure out what you touched because for me, it's
just a matter of making a segment from the near plane to the far at
the percentage distance from the sides in the viewport to your touch
point used on the near/far planes.

If you debug my suggestions 1 and 2 and come up with nothing, perhaps
there is an alternative way to check without still checking for drawn
pixels (which makes me shudder.)

On May 10, 8:15 pm, Alfonso  wrote:
> Robert, first of all thanks for your time and kindness. The problem
> for me is not drawing my scene. In fact, the scene is done. I'm going
> to try being more explicit:
>
> First of all, I set the projection matrix with:
>   near_height = 1;
>   zNear = 1;
>   zFar = 100;
>   window_height = height;
>   window_width = width;
>
>   gl.glViewport(0, 0, width, height);   //Reset The Current Viewport
>   gl.glMatrixMode(GL10.GL_PROJECTION);  //Select The Projection Matrix
>   gl.glLoadIdentity();                                  //Reset The 
> Projection Matrix
>   ratio = (float) width / height;
>   Matrix.orthoM(orthoProjectionMatrix, 0, -near_height * ratio,
> near_height * ratio, -near_height, near_height, zNear, zFar); //I get
> the Projection Matrix here
>   gl.glOrthof(-near_height * ratio, near_height * ratio, -near_height,
> near_height, zNear, zFar);
>
> Later, I get the rotation matrix and remap it with the lines:
>   SensorManager.getRotationMatrix(rotationMatrix, null,
> mAccelerometerValues, mMagneticValues);
>   SensorManager.remapCoordinateSystem(rotationMatrix,
> SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X,
> remappedRotationMatrix);
>   gl.glMatrixMode(GL10.GL_MODELVIEW);
>   gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
>   gl.glLoadIdentity();                                  //Reset The Current 
> Modelview Matrix
>   gl.glLoadMatrixf(remappedRotationMatrix, 0);
>
> Then, I draw all wich I want. Don't worry about the ray, it is well
> done. I followed this page instructions  resources/faq/technical/selection.htm>. I use glPushMatrix and
> glPopMatrix, but as you can think it is not necessary. I have the
> modelview untouched in remappedRotationMatrix.
>
> My problem: Once I have finished drawing objects, I want to know if
> there is some of them painted in the screen when I point an exact
> place with the phone. I'm OK to choose an only one object if it is so
> easier. With the next instruction:
>
> GLU.gluProject(pos3DdelPuntoInteres[0], pos3DdelPuntoInteres[1],
> pos3DdelPuntoInteres[2], remappedRotationMatrix, 0,
> orthoProjectionMatrix, 0,new int[] {0,0,window_width,window_height},
> 0, prueba, 0);
>
> I should get the screen coords of the pos3DdelPuntoInteres vector in
> the prueba one. But if I see it with a Log, I can't deduce any
> connection between this values and the screen. In the poing signed by
> pos3DdelPuntoInteres there is an icon, if I move the phone so place
> the icon in the upper left corner, then the first coord of prueba is
> 0, but no one else. In fact, it is impossible get an 0,0 position in
> prueba.
>
> Alternatively, I've found that if I multiply the modelview by
> pos3DdelPuntoInteres, one of the components of prueba takes values
> from 1 to -1 if the icon is displayed on the screen and out of this
> range if not. The problem is that this value only refers to the x axis
> of the screen and not to the y one. The others two values of prueba
> seems to refer the angle of the yaw. Knows someone about a way of
> calculate the position of the y axis like with de x ones using the
> modelview matrix, so I can control if the object is on the screen?
>
> Thanks.
>
> The problem
>
> On 10 mayo, 22:13, Robert Green  wrote:
>
>
>
>
>
> > If you're doing this to set up and draw your scene:
>
> > gl.glMatrixMode(GL10.GL_PROJECTION);
> > gl.glLoadIdentity();
> > GLU.gluPerspective(gl, FOV, viewAspectRatio, zNear, zFar);
> > // **get or recreate this matrix for the unproject projection
> > gl.glMatrixMode(GL10.GL_MODELVIEW);
> > gl.glLoadIdentity();
> > GLU.gluLookAt(gl, pos.x, pos.y, pos.z, lookAt.x, lookAt.y, lookAt.z,
> > upVec.x, upVec.y, upVec.z);
> > // **get or recreate this matrix for the unproject modelview
>
> >

[android-developers] Re: On activity (re)usage en creation

2010-05-10 Thread EnnaN
> > Any thoughts on how "bad" the current behaviour is?
>
> Not sure what you mean - but if you haven't touched anything else, the
> current behavior is the default behavior, which should suffice for most
> apps.


My point was, you're basically doing the equivalent of browsing a
site. But for each click (as you go from an entry to its comments, to
an entry), you start a new activity.
Now i can imagine that for a browser you'd have an activity per tab,
but not per page (as you have one "super"class here, being "page").
This feels more efficient

It is in this case easiest to make a separate activity for each type
of page, but this means that while 'browsing' you're making a new
activity for each click and that feels a bit redundant, expensive or..
well, something like that? I was wondering if it would be wise to make
an effort to keep both pages in the same activity.

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


[android-developers] Re: WCF complex types with android

2010-05-10 Thread ko5tik
I developed small JSON datamarshaller suitable for android (really
small,  only 2 classes ):

http://github.com/ko5tik/jsonserializer

it is capable to read / write complex object trees.
I use it on device to serialize my application data,   and to transfer
highscores back and forth to server
( here is my rest service returning JSON:
http://www.pribluda.de/lines-highscore/Highscore/pull?since=0 )


You will haveto compile it yourself tough (with maven),
but I intend to cut and deploy fresh release soon.

regards,

On 10 Mai, 17:26, Lamia Hannoun  wrote:
> Thanks for ur quick answer but can u give me more information(tutorial) or
> some example code !!!
> Thx
>
> 2010/5/10 Jose Gomez 
>
>
>
> > If you can return JSON then you should be ok
>
> > THanks
> > Sincerely
> > Jose C Gomez
>
> >http://www.josecgomez.com
>
> >   On Mon, May 10, 2010 at 9:38 AM, Lamia Hannoun 
> > wrote:
>
> >>   Hi to all!
>
> >> I made the connection between  my service WCF and my app android. But i'm
> >> wondering if u have ideas about using complex types (classes created on the
> >> server side). should i implement the serialization process? or should i 
> >> juts
> >> create the classes on my client side(android)
>
> >> Plz can u help me
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >   --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] Multiple Notifications - PendingNotifications with different data?

2010-05-10 Thread Nathan
Let's say I have a background service that performs several tasks.

As it completes task A, it posts notification A with a certain intent
and some extra data that indicates viewing result of A.
As it completes task B, it posts notification B with a certain intent
and some extra data that indicates viewing result of B.
As it completes task C, it posts notification C with a certain intent
and some extra data that indicates viewing result of C.

At the end, the notification area has three notifications. Each one
has the same intent, except for one of the extra data fields.
I would expect that each one would load my activity with different
extra data. They don't.

When onNewIntent is called, each has the extra data field set to C. I
have rooted out any possible aliasing and checked the data as it is
placed into a notification. It seems to allow only one set of data per
package.

Is what I am attempting not possible? Has anyone accomplished what I
am attempting? For example, have you had a service download several
large files, and then had notifications that would open each of those
files?

This is some of the relevant code:

// post a finished notification.
Notification finished = new 
Notification(R.drawable.notifier,
tickerText, System.currentTimeMillis());

Intent intent = new Intent();


intent.setClass(DownloadService.this, MyActivity.class);
intent.setAction(MyActivity.OPEN_LOCATION);

// adding parameters to extras

..

intent.putExtra("packageName.layer", layer);

...

// The PendingIntent to launch our activity if the user 
selects
this
// notification
PendingIntent contentIntent =
PendingIntent.getActivity(DownloadService.this, 0,
intent, PendingIntent.FLAG_ONE_SHOT |
PendingIntent.FLAG_UPDATE_CURRENT | Intent.FILL_IN_DATA);

String contentTitle = 
getString(R.string.n_download_completed);
String contentText = 
getString(R.string.n_download_results, layer);

finished.setLatestEventInfo(DownloadService.this, 
contentTitle,
contentText,
contentIntent);

mNotificationManager.notify(finishedid++, finished);


Nathan

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

2010-05-10 Thread Dianne Hackborn
You need to define an attribute for your value:



Then make a custom theme that supplies a value for it:


#ff808080


And now you can reference that value from other XML:

http://schemas.android.com/apk/res/android";
android:shape="rectangle">




Note that "com.my.package" is your manifest's package name.

Also I just wrote this by hand so I won't guarantee it is completely right.
:}

On Mon, May 10, 2010 at 11:02 AM, Mariano Kamp wrote:

> Hmmh, also no answer to this question on themes. Maybe the answer cannot be
> given with two lines? So let me explain what I would expect step by step and
> you stop me were I deviate from the Golden Path? I'll try yes/no questions.
>
> In the simplest terms I would expect that in every place I can specify a
> color in RGB (#) I could also specify a symbolic name instead. This
> should work like @color/xyz, but with one more level of indirection that
> lets me switch between themes, like dark and light.
>
> Is that possible?
>
> I would expect those themes to be applicable to (a) widgets, (b) drawables
> (see the mentioned example) and (c) when I need to style something myself
> like HTML. Are (a) - (c) possible?
>
> Furthermore I would expect that I could define style keys myself, but I got
> the impression that only keys from the "android" namespace can be used? That
> lead me to believe that you can't define abstract colors, but only styles
> for specific attributes used in the widgets' implementations.
>
> And again, if there is any meaningful documentation I would be happy to
> read it. Just send me the link or name of the book.
>
>
> On Sat, May 8, 2010 at 3:26 PM, Mariano Kamp wrote:
>
>> Hi,
>>
>> I have trouble 
>> (example)
>> wrapping my head around styles/themes. Can somebody help me or point me to
>> actual documentation?
>>
>> Let's say I have a drawable that I want to use as the background of a
>> layout:
>>
>> http://schemas.android.com/apk/res/android";
>> android:shape="rectangle">
>> > android:angle="270" />
>> 
>>
>>
>> Now I want to have a dark and a light theme. Depending on the chosen theme I 
>> want to have a different value for startColor and endColor. How do I do 
>> that? I am aware of extending themes, but what do I put into the items? How 
>> do I reference those new values then?
>>
>>
>> Cheers,
>>
>> Mariano
>>
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: How to create uses-library

2010-05-10 Thread Dianne Hackborn
On Mon, May 10, 2010 at 10:29 PM, karteek  wrote:

> Sorry I said Java files means it is also using android packages.
> As you said uses-library is for only  sdk add-ons.
> Can't we generate add ons to include in my applications
>

No, this is only for things built in to the system image.  Third party
shared libraries are not supported.


> My overall idea is to make use some repeated functionality as an
> library.
> If i want to generate jar file i need to write it as pure Java
> application but here it is also using some android api's.
> what is the way to achieve this.
>

You don't need to write it as pure Java.  You can have whatever Java code
you want in a .jar and include it as a static library.

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

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

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

[android-developers] Re: How to create uses-library

2010-05-10 Thread karteek
Log cat is
05-11 11:02:12.062: ERROR/PackageManager(52): Package com.my.lib
requires unavailable shared library com.my.lib; failing!


On May 10, 3:46 pm, Vinay S  wrote:
> Can post the LogCat Output..
>
> -Vinay
>
> On May 10, 12:21 pm, Karteek N  wrote:
>
>
>
> > Hi,
> > In android manifest file there is a tag to include libraries called
> > .
> > Suppose if i have some java files in the package hierarchy called
> > com.my.lib
> > i used the following tag in my manifest file
> > 
> > Now it is compiled successfully.
> > But if i want to launch to emulator it is throwing the following error
> > [2010-05-10 10:38:18 - MyMusicPlayer] Installing MyMusicPlayer.apk...
> > [2010-05-10 10:38:20 - MyMusicPlayer] Installation error:
> > INSTALL_FAILED_MISSING_SHARED_LIBRARY
> > [2010-05-10 10:38:20 - MyMusicPlayer] Please check logcat output for more
> > details.
> > [2010-05-10 10:38:20 - MyMusicPlayer] Launch canceled!
> > And application is not running on emulator.
> > Any help please
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://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 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: How to create uses-library

2010-05-10 Thread karteek
Sorry I said Java files means it is also using android packages.
As you said uses-library is for only  sdk add-ons.
Can't we generate add ons to include in my applications

My overall idea is to make use some repeated functionality as an
library.
If i want to generate jar file i need to write it as pure Java
application but here it is also using some android api's.
what is the way to achieve this.

On May 10, 4:45 pm, Mark Murphy  wrote:
> Karteek N wrote:
> > In android manifest file there is a tag to include libraries called
> > .
>
> This is for SDK add-ons, like the Google Maps add-on.
>
> > Suppose if i have some java files in the package hierarchy called
> > com.my.lib
> > i used the following tag in my manifest file
> > 
> > Now it is compiled successfully.
> > But if i want to launch to emulator it is throwing the following error
> > [2010-05-10 10:38:18 - MyMusicPlayer] Installing MyMusicPlayer.apk...
> > [2010-05-10 10:38:20 - MyMusicPlayer] Installation error:
> > INSTALL_FAILED_MISSING_SHARED_LIBRARY
> > [2010-05-10 10:38:20 - MyMusicPlayer] Please check logcat output for
> > more details.
> > [2010-05-10 10:38:20 - MyMusicPlayer] Launch canceled!
> > And application is not running on emulator.
> > Any help please
>
> Don't use . Put the JAR in your libs/ directory (and, in
> the case of Eclipse users, add it to your build path).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 2.x Programming Books:http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] MapView Marker and Parameter

2010-05-10 Thread Ning
Hi,

Is there API to draw the blue flashing circle at arbitrary location
same as the one provided by MyLocationOverlay in Google Map API? And
is it possible to draw a parameter around the dot given a radius, like
"my location" in Google Map?

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: startActivityForResult returns result BEFORE activity starts.

2010-05-10 Thread Nathan

On May 9, 2:43 pm, TreKing  wrote:
> On Fri, May 7, 2010 at 12:51 PM, Nathan  wrote:
> > Can anyone make any suggestions?
>
> Check where your secondary activity is setting the result and double check
> your logic there.
>

I did. This is all:

Intent data = new Intent();

setResult(RESULT_OK, data);
this.finish();

But the result comes back long before this ever runs, as it comes
before the constructor of the DownloadActivity even runs.

onActivityResult does not get called after finish is called above.

Nathan

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


[android-developers] Check The Pic and comment

2010-05-10 Thread pawan nimje
Hi All,

Check the image attached and let me know if its possible ...

6 tabs ... 4 above and 2 below ...

and if yes .. how??

PS : i have created 4 tabs [all above :) ] using extends TabActivity,tabhost
etc .

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

Re: [android-developers] How can i delete the sms from the inbox

2010-05-10 Thread Mani Android
Hi Manoj

Try this

Uri uri = ContentUris.withAppendedId(Sms.Inbox.CONTENT_URI, 2);
getContentResolver().delete(uri,null);


Regards
Manikandan.D

On Mon, Apr 26, 2010 at 3:45 PM, Manoj  wrote:

> Hi folk,
> I am trying to delete sms from the inbox,
> I am using the following statement
>
> getContentResolver().delete(Uri.parse("content://sms/inbox"), "_id=2",
> null));
>
>
> but its not working.
>
> Does anybody has any suggestion for doing this.
>
> Manoj
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: How to set and get thread priority from Java and native layers

2010-05-10 Thread Krishnakumar Ramachandran
I tried that too. But still when I try to query my audio thread's priority,
it still shows its priority as 5.

On Tue, May 11, 2010 at 8:25 AM, Streets Of Boston
wrote:

> What about Thread.setPriority(...) ?
>
> That seems to be working for me.
> When, using the above method, i set the priority of a background-
> thread too high it has an impact on the GUI (it gets sluggish). It
> must be doing something...
>
>
> On May 10, 9:20 pm, Krishnakumar Ramachandran
>  wrote:
> > Hi has anyone got any idea on this?
> >
> > On Mon, May 10, 2010 at 12:56 PM, KK <
> krishnakumar.ramachand...@gmail.com>wrote:
> >
> >
> >
> >
> >
> > > I have a multithreaded streaming app which has mainly the following 5
> > > threads
> >
> > > 1 Main App(UI) Thread
> > > 1 controller thread (in native)
> > > 1 audio decoder thread (in native)
> > > 1 video decoder thread(in native)
> > > 1 thread to query the head position of audio (in Java)
> > >  Apart from this I have video rendering with OpenGL.
> >
> > > My problem is, if I query the thread priority using the
> > > Thread.getPriority method (my native threads make callbacks to Java
> > > and I am making the query at that point of time), I am getting the
> > > priority of each of them as 5. For my audio query thread (the last one
> > > in the list) I am explicitly setting the priority using
> > > Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO);
> >
> > > Also for my decoder threads, I am giving higher priority than my
> > > controller thread(using pthread APIs in native). But still finally all
> > > of them seem to have same priority.
> >
> > > Can anyone please tell me what is wrong here. Also what should I be
> > > doing to increase the priority of my threads(both from Java and
> > > native).
> >
> > > 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 athttp://
> groups.google.com/group/android-developers?hl=en- 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

Re: [android-developers] Re: sending MMS programming

2010-05-10 Thread Mani Android
Hi

if u want to do it using SDK version, U can't do it. But If u have the
Android platform code, u can do it by the following steps.

My Solution,

1. In MMS application, create a new receiver.

2. Receiver should call the AsyncTask class method to send the mms in the
background (Refer:
http://developer.android.com/reference/android/os/AsyncTask.html)

3. Inside the doInBackground method, u have to initialze the required
SlideView data

4. After assigning the required data, now call the
MmsMessageSender.sendMessage()

>From ur application, bundle ur data and send a broadcast to the new receiver
in the MMS application.


I did it and tested this procedure. I can't share the code as per the
company rules :( But I can guide u :)

Regards
Manikandan.D



2010/5/7 一个某某 

> Hi,do you found this solution
>
> On 4月12日, 下午11时02分, Singelton  wrote:
> > Hi,
> >
> > Is there any options to sendMMS(not calling activity )  - no user
> > action
> >
> > for example a service that run in the background and sendMMSwith the
>  > a random pictures .
> >
> > I found solution to SMS but not toMMS
> >
> > Thanks,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Android Debugging Issues

2010-05-10 Thread SeriousCoder
Guys,

Please let me know if anyone has a solution to this.

Thank you. .

On May 3, 2:00 pm, SeriousCoder  wrote:
> The version of IDE is as follows :
>
> Eclipse IDE for Java Developers
>
> Build id: 20100218-1602
> (c) Copyright Eclipse contributors and others 2000, 2009.  All rights
> reserved.
> Visithttp://eclipse.org/
>
> This product includes software developed by the
> Apache Software Foundationhttp://apache.org/
>
> yes I did run this in debug mode and still no luck.
>
> thanks
>
> On Apr 28, 1:51 am, Andreas  wrote:
>
>
>
>
>
> > Hi,
>
> > What IDE are you using? If you are using eclipse, please be aware that
> > you have to start iin "debug" rather than "run" mode for the IDE to
> > stop at you breakpoints.
>
> > Also please have a look at the logcat. That should give you a stack
> > trace of the exception, and generally be very helpful.
>
> > Gambatte!
> > Bex
>
> > On Apr 28, 2:01 pm, SeriousCoder  wrote:
>
> > > Hi Bob, see my answers below - please help -thanks
>
> > > On Apr 27, 5:38 pm, Bob Kerns  wrote:
>
> > > > Um, by using the debugger, or if you don't want to do that, by looking
> > > > at the logs?
>
> > > > You appear to have gotten an application compiled and built, yet are
> > > > unaware of the development environment. I can't quite figure how you
> > > > got to this point in your exploration, so I'm not sure what help you
> > > > need.
>
> > > > So let's check a few basics. Are you aware:
>
> > > > * There IS a debugger? - yes
>
> > > > * There IS a view in the IDE to show you the log from the device (or
> > > > emulator)? That would show the stack trace (including line numbers)
> > > > for the error in question? - yes
>
> > > > * That the debugger supports breakpoints, and single stepping? - i 
> > > > added a ttoggle breakpoint (by right clicking on the screen -> toggle 
> > > > breakpoint) but the debugger doesnt stop at the exact point.
>
> > > > * That the debugger also supports breaking on exceptions? - I dont 
> > > > know, it doesnt stop on breakpoints.
>
> > > > * That the debugger for Android works essentially the same way as for
> > > > any other Java code? - I dont know
>
> > > > * That the error message you see is the default one presented to end
> > > > users, and is not INTENDED to help developers? - correct.
>
> > > > Any negative answer would be a clue about where to start reading and
> > > > exploring.
>
> > > > On Apr 27, 11:06 am, SeriousCoder  wrote:
>
> > > > > Guys,
>
> > > > > I am new to android development but I know programming and I found out
> > > > > that the android development platform doesnt display error messages
> > > > > that make sense. For eg : I am in the process of creating a to-do-list
> > > > > app and this thing give me a message saying that "The application
> > > > > Widges (process widgets.controls) has stopped unexpectedly please try
> > > > > again". How in the world am I am supposed to debug this error or know
> > > > > what it means. Please advise
>
> > > > > 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 
> > > > > athttp://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 
> > > > athttp://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 
> > > athttp://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 
> > athttp://groups.google.com/group/android-developers?hl=en-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

[android-developers] SimpleDateFormat timezone problem with 2.1

2010-05-10 Thread Don Park
(reposted from http://pastie.org/954797)

I'm looking to convert a unix epoch time to Iso8601. I made the
following method which has worked on my G1 phone for a long time:

  public static String DateTimeIso8601(long offset) {
DateFormat datePattern =  new SimpleDateFormat ("-
MM-dd'T'HH:mm:ssZ");
datePattern.setTimeZone(TimeZone.getTimeZone("GMT"));
String date = datePattern.format(new Date(offset));
return date;
  }

output is the UTC time with an erroneous timezone (got -0800 but
should be - or Z).

log("date test: "+Util.DateTimeIso8601(1273546315000L));
Output from adb logcat: date test: 2010-05-11T02:51:55-0800

As a sanity test, a ruby language script with same int converted to
time:

irb(main):002:0> Time.at(1273546315)
=> 2010-05-10 19:51:55 -0700
irb(main):003:0> Time.at(1273546315).utc
=> 2010-05-11 02:51:55 UTC

is this an Android 2.1 problem?

The same code on my android 1.6 G1 phone returns the UTC time zone
D/GeoRSS  (  381): date test: 2010-05-11T02:51:55+

Don

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

2010-05-10 Thread String
Here's what works for me:

First, in your manifest XML, make sure you have . AFAIK, if that's set to false, the
platform always pre-scales your widget to MDPI-standard measurements.

Then in your ACTION_APPWIDGET_UPDATE handler, you'll need to get an
AppWidgetProviderInfo object (using
AppWidgetManager.getAppWidgetInfo). With that, reference its minHeight
property (like providerInfo.minHeight) to get the real pixel size of
the widget.

String

On May 10, 9:15 pm, James  wrote:
> I'm writing a widget at the moment. It's supposed to fill one cell, so
> I've set the size to be 72dp by 72dp. The layout has a linear layout
> containing a 72x72dp ImageView.
>
> In onUpdate(), I call views.setImageViewBitmap with a 72px x 72px
> bitmap. This worked fine under Android 1.5 on my G1, but now I have a
> Nexus One, the image gets stretched to fill the cell, and looks
> blurry.
>
> What is the correct, device independent way, to work out how big the
> bitmap should be?
>
> James Ots
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] read the inbox messages

2010-05-10 Thread Mani Android
Hi Siddiqui

U can read the sms from the DB using the following URI

To get the inbox sms: content://sms/inbox
To get the send sms: content://sms/sent

Refer the following java files:

1. Telephony.java : framework/base/core/java/android/provider

After query from the DB, How to process the read the data from the cursor

1. MessagingNotification: packages/apps/Mms/src/com/android/mms/transaction

2. SmsReceiverService: packages/apps/Mms/src/com/android/mms/transaction

Any other queries, reply me back

Regards,
Manikandan.D



On Mon, May 10, 2010 at 3:43 PM, Mohammad Siddiqui
wrote:

> Hi  everyone
>
> Can we read the android SMS  messages programmatically in 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 set and get thread priority from Java and native layers

2010-05-10 Thread Streets Of Boston
What about Thread.setPriority(...) ?

That seems to be working for me.
When, using the above method, i set the priority of a background-
thread too high it has an impact on the GUI (it gets sluggish). It
must be doing something...


On May 10, 9:20 pm, Krishnakumar Ramachandran
 wrote:
> Hi has anyone got any idea on this?
>
> On Mon, May 10, 2010 at 12:56 PM, KK 
> wrote:
>
>
>
>
>
> > I have a multithreaded streaming app which has mainly the following 5
> > threads
>
> > 1 Main App(UI) Thread
> > 1 controller thread (in native)
> > 1 audio decoder thread (in native)
> > 1 video decoder thread(in native)
> > 1 thread to query the head position of audio (in Java)
> >  Apart from this I have video rendering with OpenGL.
>
> > My problem is, if I query the thread priority using the
> > Thread.getPriority method (my native threads make callbacks to Java
> > and I am making the query at that point of time), I am getting the
> > priority of each of them as 5. For my audio query thread (the last one
> > in the list) I am explicitly setting the priority using
> > Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO);
>
> > Also for my decoder threads, I am giving higher priority than my
> > controller thread(using pthread APIs in native). But still finally all
> > of them seem to have same priority.
>
> > Can anyone please tell me what is wrong here. Also what should I be
> > doing to increase the priority of my threads(both from Java and
> > native).
>
> > 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 
> athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Re: where to find the image of microphone icon?

2010-05-10 Thread greg
Are you referring to the ic_btn_speak_now.png icon in /platforms/
android-2/data/res/drawable?

On May 10, 6:14 pm, cindy  wrote:
> Hi all,
>
> I want to use the microphone icon used by android OS. Where could I
> find it?
>
> Thanks!
>
> April
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] How to set and get thread priority from Java and native layers

2010-05-10 Thread Krishnakumar Ramachandran
Hi has anyone got any idea on this?

On Mon, May 10, 2010 at 12:56 PM, KK wrote:

> I have a multithreaded streaming app which has mainly the following 5
> threads
>
> 1 Main App(UI) Thread
> 1 controller thread (in native)
> 1 audio decoder thread (in native)
> 1 video decoder thread(in native)
> 1 thread to query the head position of audio (in Java)
>  Apart from this I have video rendering with OpenGL.
>
> My problem is, if I query the thread priority using the
> Thread.getPriority method (my native threads make callbacks to Java
> and I am making the query at that point of time), I am getting the
> priority of each of them as 5. For my audio query thread (the last one
> in the list) I am explicitly setting the priority using
> Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO);
>
> Also for my decoder threads, I am giving higher priority than my
> controller thread(using pthread APIs in native). But still finally all
> of them seem to have same priority.
>
> Can anyone please tell me what is wrong here. Also what should I be
> doing to increase the priority of my threads(both from Java and
> native).
>
> 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 can I know if OpenGl has drawn something?

2010-05-10 Thread Alfonso
Robert, first of all thanks for your time and kindness. The problem
for me is not drawing my scene. In fact, the scene is done. I'm going
to try being more explicit:

First of all, I set the projection matrix with:
  near_height = 1;
  zNear = 1;
  zFar = 100;
  window_height = height;
  window_width = width;

  gl.glViewport(0, 0, width, height);   //Reset The Current Viewport
  gl.glMatrixMode(GL10.GL_PROJECTION);  //Select The Projection Matrix
  gl.glLoadIdentity();  //Reset The Projection 
Matrix
  ratio = (float) width / height;
  Matrix.orthoM(orthoProjectionMatrix, 0, -near_height * ratio,
near_height * ratio, -near_height, near_height, zNear, zFar); //I get
the Projection Matrix here
  gl.glOrthof(-near_height * ratio, near_height * ratio, -near_height,
near_height, zNear, zFar);

Later, I get the rotation matrix and remap it with the lines:
  SensorManager.getRotationMatrix(rotationMatrix, null,
mAccelerometerValues, mMagneticValues);
  SensorManager.remapCoordinateSystem(rotationMatrix,
SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X,
remappedRotationMatrix);
  gl.glMatrixMode(GL10.GL_MODELVIEW);
  gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
  gl.glLoadIdentity();  //Reset The Current 
Modelview Matrix
  gl.glLoadMatrixf(remappedRotationMatrix, 0);

Then, I draw all wich I want. Don't worry about the ray, it is well
done. I followed this page instructions . I use glPushMatrix and
glPopMatrix, but as you can think it is not necessary. I have the
modelview untouched in remappedRotationMatrix.

My problem: Once I have finished drawing objects, I want to know if
there is some of them painted in the screen when I point an exact
place with the phone. I'm OK to choose an only one object if it is so
easier. With the next instruction:

GLU.gluProject(pos3DdelPuntoInteres[0], pos3DdelPuntoInteres[1],
pos3DdelPuntoInteres[2], remappedRotationMatrix, 0,
orthoProjectionMatrix, 0,new int[] {0,0,window_width,window_height},
0, prueba, 0);

I should get the screen coords of the pos3DdelPuntoInteres vector in
the prueba one. But if I see it with a Log, I can't deduce any
connection between this values and the screen. In the poing signed by
pos3DdelPuntoInteres there is an icon, if I move the phone so place
the icon in the upper left corner, then the first coord of prueba is
0, but no one else. In fact, it is impossible get an 0,0 position in
prueba.

Alternatively, I've found that if I multiply the modelview by
pos3DdelPuntoInteres, one of the components of prueba takes values
from 1 to -1 if the icon is displayed on the screen and out of this
range if not. The problem is that this value only refers to the x axis
of the screen and not to the y one. The others two values of prueba
seems to refer the angle of the yaw. Knows someone about a way of
calculate the position of the y axis like with de x ones using the
modelview matrix, so I can control if the object is on the screen?

Thanks.

The problem

On 10 mayo, 22:13, Robert Green  wrote:
> If you're doing this to set up and draw your scene:
>
> gl.glMatrixMode(GL10.GL_PROJECTION);
> gl.glLoadIdentity();
> GLU.gluPerspective(gl, FOV, viewAspectRatio, zNear, zFar);
> // **get or recreate this matrix for the unproject projection
> gl.glMatrixMode(GL10.GL_MODELVIEW);
> gl.glLoadIdentity();
> GLU.gluLookAt(gl, pos.x, pos.y, pos.z, lookAt.x, lookAt.y, lookAt.z,
> upVec.x, upVec.y, upVec.z);
> // **get or recreate this matrix for the unproject modelview
>
> // for each object
> gl.glPushMatrix();
> // transform/rotate/scale to match collision data - do not use this
> matrix for unproject.
> // draw
> gl.glPopMatrix();
>
> then using GLU.gluUnProject with those same matrices that I pointed
> out (projection and modelview) will return the correct point in world
> space which should be the same coordinate system as your collision
> data.   After that you just need to use ((normalize(lookAt - pos) *
> farZ) + the unproject point) and you have your ray.
>
> On May 10, 1:24 pm, Alfonso  wrote:
>
>
>
> > I've got that collision detection system implemented, yet. And I'm
> > agree to use glUnproject as the best achoice. My problem is that I
> > remap the modelview matrix with the sensors and when I rotate the
> > phone, change the coords of the screen returned by glUnproject. Even
> > if I keep the object in the same place of the screen. Furthermore, I
> > don't understand why it doesn't return values according to the given
> > viewport. Because of all this I was looking for alternatives, but if
> > you explain me what's the matter with glUnproject, I'll be really
> > pleasent.
>
> > Thanks you very much for this answer and (I hope) for the next one.
>
> > On 10 mayo, 19:11, Robert Green  wrote:
>
> > > What are you trying to do?
>
> > > glReadPixels is a pipeline stall - it will slow everything down.  If
> > > you want to check to

[android-developers] clock of emulator 1.6 runs 100% slower than real time clock!!!

2010-05-10 Thread HeHe
often the clock of emulator 1.6 runs significantly (100-150%) slower
than real world clock.

for example, after 10 minutes of a human life have elapsed, from
logcat timestamp only 5 minutes have elapsed on my emulator 1.6,

has anyone using emulator 1.6 experienced the same issue? if yes, how
did you tackle with it?

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


Re: [android-developers] Android Pre Compile step just became very slow

2010-05-10 Thread James Moore
On Mon, May 10, 2010 at 3:17 PM, James Moore  wrote:
> On Mon, May 3, 2010 at 4:01 PM, Xavier Ducrohet  wrote:
>> If you're using Eclipse, go to the preferences and under Android >
>> Build, set the output to verbose.
>
> Where should you see this verbose output?  I selected the option, but
> it's not clear where I'm supposed to go to see the verbose output.

Answering my own question - turns out that Eclipse has several
consoles.  There's a button in the console view that switches between
them.  I wasn't seeing any Android output because another part of the
build was writing to the console, and that's all I was seeing.

-- 
James Moore
ja...@restphone.com
http://jamesmoorecode.blogspot.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] How to get selected items in a ListView (multi selection check boxes)? - URGENT PLZ

2010-05-10 Thread dillipk
Hello,
 How do I get the selected items in a ListView which contains a multi
selelected check boxes.? The following code doesn't work correctly...
getContacts() is being called in a Button click().

private String getContacts(){

SparseBooleanArray  selectedContacts =
listView.getCheckedItemPositions();
StringBuffer sb = new StringBuffer();
int size = selectedContacts .size();

for (int sbaKey = 0; sbaKey < size; sbaKey++)
{
if (selectedContacts .get(sbaKey, false))
{
//Log.d(TAG, "Selected Categories : " +
listView.getItemAtPosition(sbaKey).toString());
sb.append(listView.getItemAtPosition(sbaKey).toString());
if(sbaKey <=  size - 2 ){
sb.append(',');
}
}
}

Log.d(TAG, "Selected Contacts : " + sb.toString());
return sb.toString();
}

Creation:

 @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setTitle("Preferences");
setListAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_multiple_choice,
CONTACTS));

listView = getListView();

listView.setItemsCanFocus(false);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

}

Thank you for your help in advance..

-DK

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


Re: [android-developers] Android Pre Compile step just became very slow

2010-05-10 Thread James Moore
On Mon, May 3, 2010 at 4:01 PM, Xavier Ducrohet  wrote:
> If you're using Eclipse, go to the preferences and under Android >
> Build, set the output to verbose.

Where should you see this verbose output?  I selected the option, but
it's not clear where I'm supposed to go to see the verbose output.

-- 
James Moore
ja...@restphone.com
http://jamesmoorecode.blogspot.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] where to find the image of microphone icon?

2010-05-10 Thread cindy
Hi all,

I want to use the microphone icon used by android OS. Where could I
find it?

Thanks!

April

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

2010-05-10 Thread HeHe
mike, is it possible that the situation where ISP changes ip of your
phone differs from the situation where you manually change ip of your
phone ipconfig/renew?

that is, is it possible that a phone cannot detect change of ip until
next time when it tries to send something out?

by the way, what is the java/android api you use to "detect" ip
change? could you share a code example with me? thanks :)

On May 10, 11:46 am, mike  wrote:
> On 05/10/2010 11:24 AM, HeHe wrote:
>
> > when i mentioned "...not be able to receive incoming calls..", i was
> > not thinking about "just server->client streaming". Mike, you knew
> > it :)
>
> > what is your mobile service provider? the sentence "IP address changes
> > are probably pretty rare" looks strange to a T-Moble user like me. at
> > least i find my G1 ip frequently changes :(
>
> So I haven't actually tested this, and I disclaimed because I
> wasn't sure :) If you're getting lots of IP address changes regardless
> of what's happening at the 3gpp/l2 layer, you're probably not going
> to not have a very good experience with streaming media of any kind
> because once the IP address changes, the RTP stream is going to
> tank regardless of SIP, RTSP, Skype, etc.
>
> That's why you'd need to deal with it more directly like using IP
> handoffs using Mobile IP, etc. Handoffs could be done using SIP, but
> it would be ugly. Which probably means that somebody has proposed it
> and that the working group has taken it on :) AFAIK, mobile IP is still
> not deployed widely,  even though we were working on it the handoff
> probelm almost 10 years ago...
>
> Part of the reason probably is because 3GPP's latency is really awful for
> real time conversations so there's still too high an energy barrier to
> actually
> deal with the truly difficult problem of dealing with handoffs when TDM
> still
> works just fine. Maybe 4G will get rid of all that bizarre leftovers
> from the
> ATM/bellhead days that 3G had to live with to get standardized.
>
> In any case as far as SIP registration goes, it should be relatively easy to
> camp on an event for when the IP address changes and quickly reregister
> inside the SIP stack. It wouldn't be surprising that most of the SIP stacks
> already have that feature. How bad this is on battery life is obviously
> dependent on how often IP addresses are actually changing, but you have
> the exact same problem with IM so at some level it's "acceptable" since
> people do use IM...
>
> Mike
>
>
>
>
>
> > On May 10, 10:47 am, mike  wrote:
>
> >> On 05/10/2010 10:24 AM, HeHe wrote:
>
> >>> i was not thinking about media.
>
> >>> i guess the reason why sipdroid+TCP+pbxes can lower battery use is to
> >>> enlarge sip registration expiration, eg. to 5 minutes or longer. what
> >>> if mobile service provider changes phone IP earlier than 5 min when
> >>> the provider finds no traffic to/from the phone? it will not be able
> >>> to receive incoming calls without re-registration.
>
> >>> anyway, i am just guessing. do you know the usual (or by default)
> >>> registration expiration between sipdroid and pbxes?
>
> >> Again, if this is just server->client streaming this is yet another
> >> reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol,
> >> and all rendezvous protocols are complicated, with lots of things to
> >> consider.
>
> >> AFAIK -- it's been a long time -- SIP registrations can be very long
> >> lasting. Unless something has actually changed -- like your IP address
> >> moved -- it shouldn't be a problem. I'm not entirely convinced that this
> >> is a huge issue anyway because the cellular guys are probably moving
> >> you around at L2 for the most part (again, it's been a long time since I've
> >> paid attention to the 3gpp guys), so IP address changes are probably
> >> pretty rare. I have no idea if anybody's been deploying mobile IP which
> >> would more directly solve this issue.
>
> >> Mike, who used to like to make fun of Henning, Cullen and Jonathan and
> >>             many others in the SIP WG because of SIP's complexity.
>
> >>> On May 10, 9:32 am, mike    wrote:
>
>  On 05/10/2010 09:04 AM, HeHe wrote:
>
> > i saw this in sipdroid project FAQ:
>
> >      "Sipdroid now uses TCP for the signaling connection and keeps the
> > corresponding port open."
>
> > does anyone know how peer servers of sipdroid handle scalability when
> > there are a million of sipdroid clients connecting with the servers
> > using TCP?
>
> > as i observed, T-mobile Intermittently changes IP of my G1 phone
> > without any notice, which in fact tears down the TCP connection.
>
>  Remember that SIP doesn't actually transport the media, that's
>  RTP which is over UDP. So losing the connection shouldn't generally
>  be any worse than losing a http connection generally.
>
>  As far as scalability, I woudn't worry about that too much. UDP
>  based SIP suffers from a lot of problems, not the least of which

Re: [android-developers] Re: Twitter app's popup aligned with ListView item - how did they do it?

2010-05-10 Thread skink


Mark Murphy wrote:
> westmeadboy wrote:
> > Anyone any ideas?
>
> Ummm...figure out where the item is positioned on screen, then use some
> margin tricks to position their popup to match, I suppose.
>

if you use PopupWindow you don't have to use margins at all - you can
position your popup in any (x,y) location

moreover: using showAsDropDown you don't even have to locate anchor
view position

pskink

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


Re: [android-developers] Re: PNG quality in WebView based app

2010-05-10 Thread mike

On 05/10/2010 01:52 PM, Yahel wrote:

I ran into the same problem a few monthes back.

I spent hours trying to figure out why a webview would degrade the
quality of an image.

Turns out it was not the webview, it was my provider : When browsing
the web on gprs or edge my provider downgrades image quality on their
server so that its a lot lighter to download on their network.
When I tried over wifi everything came back to normal.

In the end I implemented a regular binary file download from my
server, and then displayed that image.
   


Yikes! Or TLS :)

Mike

Yahel


On 10 mai, 22:20, Jeff  wrote:
   

I am using WebView to display html content in an app. One of the pages
has a rather large PNG image. The image is large and detailed on
purpose because the idea is to use it as a map and allow users to zoom
in to see the detail.

Unfortunately, when the image is displayed with WebView, the quality
is horrific. I am assuming that WebView is attempting to do some image
optimization to reduce the size of the graphic.

Is there anyway to prevent it from doing this? I don't want the image
to lose any of its quality.

Thanks,
Jeff

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group 
athttp://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: PNG quality in WebView based app

2010-05-10 Thread Yahel
I ran into the same problem a few monthes back.

I spent hours trying to figure out why a webview would degrade the
quality of an image.

Turns out it was not the webview, it was my provider : When browsing
the web on gprs or edge my provider downgrades image quality on their
server so that its a lot lighter to download on their network.
When I tried over wifi everything came back to normal.

In the end I implemented a regular binary file download from my
server, and then displayed that image.

Yahel


On 10 mai, 22:20, Jeff  wrote:
> I am using WebView to display html content in an app. One of the pages
> has a rather large PNG image. The image is large and detailed on
> purpose because the idea is to use it as a map and allow users to zoom
> in to see the detail.
>
> Unfortunately, when the image is displayed with WebView, the quality
> is horrific. I am assuming that WebView is attempting to do some image
> optimization to reduce the size of the graphic.
>
> Is there anyway to prevent it from doing this? I don't want the image
> to lose any of its quality.
>
> Thanks,
> Jeff
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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: I've found a way to stop piracy of my apps

2010-05-10 Thread strazzere
Without introducing any new content - it makes it a very desirable
target for patching. A simple patch will make sure the date check
doesn't matter, and if you aren't introducing any new functionality,
then there isn't a real reason for the user to upgrade.

IMHO your just asking people to get fed up with the fake updates and
patch it.

-Tim

On May 10, 4:29 pm, niko20  wrote:
> Actually I think another pretty good solution is to simply put a date
> lock on the app, sort of how Astro works.
>
> What you do is make the app expire at a certain date. Before that date
> you release the next version with another lock moving forward. Maybe
> try a 2 or 3 month lock. Then when it does it simply asks the user to
> go to the market and update the app. If they are legit customers,
> that's easy, they just go an update it. But if they are pirated copies
> they wont be able to easily update it.
>
> -niko
>
> On May 10, 3:24 pm, niko20  wrote:
>
>
>
> > Well I will say one thing, if it was opened up, that would allow each
> > dev to make small code changes, so it would never be cookie cutter
> > then...however, I am not against that you are trying to make some
> > income from it, I mean you still did have to do the work.
>
> > -niko
>
> > On May 10, 10:06 am, dadical  wrote:
>
> > > That argument assumes that I don't respond to those cracks with
> > > improvements to AAL that will make it more difficult! :)  Also, each
> > > app will need to be cracked individually, and I'm trying to work out
> > > some ways to make that a job that isn't cookie-cutter.  The point here
> > > is to get this past the pain threshold where it won't be worth the
> > > trouble for an app that is only a few bucks.
>
> > > This is fascinating stuff, but very, very non-lucrative.  I don't
> > > really want to engage in this game, but I don't see an alternative
> > > until it gets solved at the platform level.
>
> > > Given the lack of commercial interest (and the prodding of several
> > > smart devs), I've considered opening this up, but I'm not sure how to
> > > do that without it simply lowering the barrier for pirates.
>
> > > On May 10, 3:55 am, MobDev  wrote:
>
> > > > " It took several days (almost a week) for crackers
> > > > to decompile Screebl Pro and find a way to circumvent AAL.  Typically
> > > > it takes about 90 secs from the time that we publish to the market for
> > > > the various warez sites to start tweeting the location of the
> > > > download."
>
> > > > I was wondering, after the first crack-run they obviously will have
> > > > devised a crack-method, which means that every other app using AAL
> > > > will be cracked within 90 seconds till a new version is released... A
> > > > week of cracking will only be the case during the first attempt...
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group 
> > > > athttp://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 
> > > athttp://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 
> > athttp://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 
> athttp://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: I've found a way to stop piracy of my apps

2010-05-10 Thread westmeadboy
That works in most cases but not in a significant number of other
cases.

Consider users who go on an extended holiday to a non-paid app
country. Astro works partly because its free.

But then there is also the situation where you go on holiday and are
using your phone offline. Then all of a sudden certain apps expire and
you're faced with either expensive roaming charges (to update) or
being without your favourite app(s).

Also remember that in China, Google Sync (and therefore Android
Market) is often blocked.

On May 10, 10:29 pm, niko20  wrote:
> Actually I think another pretty good solution is to simply put a date
> lock on the app, sort of how Astro works.
>
> What you do is make the app expire at a certain date. Before that date
> you release the next version with another lock moving forward. Maybe
> try a 2 or 3 month lock. Then when it does it simply asks the user to
> go to the market and update the app. If they are legit customers,
> that's easy, they just go an update it. But if they are pirated copies
> they wont be able to easily update it.
>
> -niko
>
> On May 10, 3:24 pm, niko20  wrote:
>
>
>
>
>
> > Well I will say one thing, if it was opened up, that would allow each
> > dev to make small code changes, so it would never be cookie cutter
> > then...however, I am not against that you are trying to make some
> > income from it, I mean you still did have to do the work.
>
> > -niko
>
> > On May 10, 10:06 am, dadical  wrote:
>
> > > That argument assumes that I don't respond to those cracks with
> > > improvements to AAL that will make it more difficult! :)  Also, each
> > > app will need to be cracked individually, and I'm trying to work out
> > > some ways to make that a job that isn't cookie-cutter.  The point here
> > > is to get this past the pain threshold where it won't be worth the
> > > trouble for an app that is only a few bucks.
>
> > > This is fascinating stuff, but very, very non-lucrative.  I don't
> > > really want to engage in this game, but I don't see an alternative
> > > until it gets solved at the platform level.
>
> > > Given the lack of commercial interest (and the prodding of several
> > > smart devs), I've considered opening this up, but I'm not sure how to
> > > do that without it simply lowering the barrier for pirates.
>
> > > On May 10, 3:55 am, MobDev  wrote:
>
> > > > " It took several days (almost a week) for crackers
> > > > to decompile Screebl Pro and find a way to circumvent AAL.  Typically
> > > > it takes about 90 secs from the time that we publish to the market for
> > > > the various warez sites to start tweeting the location of the
> > > > download."
>
> > > > I was wondering, after the first crack-run they obviously will have
> > > > devised a crack-method, which means that every other app using AAL
> > > > will be cracked within 90 seconds till a new version is released... A
> > > > week of cracking will only be the case during the first attempt...
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group 
> > > > athttp://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 
> > > athttp://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 
> > athttp://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 
> athttp://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: Twitter app's popup aligned with ListView item - how did they do it?

2010-05-10 Thread Mark Murphy
westmeadboy wrote:
> Anyone any ideas?

Ummm...figure out where the item is positioned on screen, then use some
margin tricks to position their popup to match, I suppose.

You can see a really crude equivalent of that here, just aiming for
putting something on the upper or lower half of the screen:

http://github.com/commonsguy/cw-advandroid/tree/master/Maps/EvenNooerYawk/

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

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: I've found a way to stop piracy of my apps

2010-05-10 Thread niko20
Actually I think another pretty good solution is to simply put a date
lock on the app, sort of how Astro works.

What you do is make the app expire at a certain date. Before that date
you release the next version with another lock moving forward. Maybe
try a 2 or 3 month lock. Then when it does it simply asks the user to
go to the market and update the app. If they are legit customers,
that's easy, they just go an update it. But if they are pirated copies
they wont be able to easily update it.

-niko

On May 10, 3:24 pm, niko20  wrote:
> Well I will say one thing, if it was opened up, that would allow each
> dev to make small code changes, so it would never be cookie cutter
> then...however, I am not against that you are trying to make some
> income from it, I mean you still did have to do the work.
>
> -niko
>
> On May 10, 10:06 am, dadical  wrote:
>
>
>
>
>
> > That argument assumes that I don't respond to those cracks with
> > improvements to AAL that will make it more difficult! :)  Also, each
> > app will need to be cracked individually, and I'm trying to work out
> > some ways to make that a job that isn't cookie-cutter.  The point here
> > is to get this past the pain threshold where it won't be worth the
> > trouble for an app that is only a few bucks.
>
> > This is fascinating stuff, but very, very non-lucrative.  I don't
> > really want to engage in this game, but I don't see an alternative
> > until it gets solved at the platform level.
>
> > Given the lack of commercial interest (and the prodding of several
> > smart devs), I've considered opening this up, but I'm not sure how to
> > do that without it simply lowering the barrier for pirates.
>
> > On May 10, 3:55 am, MobDev  wrote:
>
> > > " It took several days (almost a week) for crackers
> > > to decompile Screebl Pro and find a way to circumvent AAL.  Typically
> > > it takes about 90 secs from the time that we publish to the market for
> > > the various warez sites to start tweeting the location of the
> > > download."
>
> > > I was wondering, after the first crack-run they obviously will have
> > > devised a crack-method, which means that every other app using AAL
> > > will be cracked within 90 seconds till a new version is released... A
> > > week of cracking will only be the case during the first attempt...
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group 
> > > athttp://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 
> > athttp://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 
> athttp://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: I've found a way to stop piracy of my apps

2010-05-10 Thread niko20
Well I will say one thing, if it was opened up, that would allow each
dev to make small code changes, so it would never be cookie cutter
then...however, I am not against that you are trying to make some
income from it, I mean you still did have to do the work.


-niko

On May 10, 10:06 am, dadical  wrote:
> That argument assumes that I don't respond to those cracks with
> improvements to AAL that will make it more difficult! :)  Also, each
> app will need to be cracked individually, and I'm trying to work out
> some ways to make that a job that isn't cookie-cutter.  The point here
> is to get this past the pain threshold where it won't be worth the
> trouble for an app that is only a few bucks.
>
> This is fascinating stuff, but very, very non-lucrative.  I don't
> really want to engage in this game, but I don't see an alternative
> until it gets solved at the platform level.
>
> Given the lack of commercial interest (and the prodding of several
> smart devs), I've considered opening this up, but I'm not sure how to
> do that without it simply lowering the barrier for pirates.
>
> On May 10, 3:55 am, MobDev  wrote:
>
>
>
>
>
> > " It took several days (almost a week) for crackers
> > to decompile Screebl Pro and find a way to circumvent AAL.  Typically
> > it takes about 90 secs from the time that we publish to the market for
> > the various warez sites to start tweeting the location of the
> > download."
>
> > I was wondering, after the first crack-run they obviously will have
> > devised a crack-method, which means that every other app using AAL
> > will be cracked within 90 seconds till a new version is released... A
> > week of cracking will only be the case during the first attempt...
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://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 
> athttp://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: Twitter app's popup aligned with ListView item - how did they do it?

2010-05-10 Thread westmeadboy
Anyone any ideas?

On May 9, 4:33 pm, westmeadboy  wrote:
> In the official Twitter app, in the Tweets activity, if you click on
> the small down arrow (right side of each tweet entry), a really nice
> popup appears just above or below the entry.
>
> How did they do this (i.e. position the popup alongside the relevant
> item)?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] PNG quality in WebView based app

2010-05-10 Thread Jeff
I am using WebView to display html content in an app. One of the pages
has a rather large PNG image. The image is large and detailed on
purpose because the idea is to use it as a map and allow users to zoom
in to see the detail.

Unfortunately, when the image is displayed with WebView, the quality
is horrific. I am assuming that WebView is attempting to do some image
optimization to reduce the size of the graphic.

Is there anyway to prevent it from doing this? I don't want the image
to lose any of its quality.

Thanks,
Jeff

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


[android-developers] Getting widget size

2010-05-10 Thread James
I'm writing a widget at the moment. It's supposed to fill one cell, so
I've set the size to be 72dp by 72dp. The layout has a linear layout
containing a 72x72dp ImageView.

In onUpdate(), I call views.setImageViewBitmap with a 72px x 72px
bitmap. This worked fine under Android 1.5 on my G1, but now I have a
Nexus One, the image gets stretched to fill the cell, and looks
blurry.

What is the correct, device independent way, to work out how big the
bitmap should be?

James Ots

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


[android-developers] Re: How can I know if OpenGl has drawn something?

2010-05-10 Thread Robert Green
If you're doing this to set up and draw your scene:

gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadIdentity();
GLU.gluPerspective(gl, FOV, viewAspectRatio, zNear, zFar);
// **get or recreate this matrix for the unproject projection
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();
GLU.gluLookAt(gl, pos.x, pos.y, pos.z, lookAt.x, lookAt.y, lookAt.z,
upVec.x, upVec.y, upVec.z);
// **get or recreate this matrix for the unproject modelview

// for each object
gl.glPushMatrix();
// transform/rotate/scale to match collision data - do not use this
matrix for unproject.
// draw
gl.glPopMatrix();

then using GLU.gluUnProject with those same matrices that I pointed
out (projection and modelview) will return the correct point in world
space which should be the same coordinate system as your collision
data.   After that you just need to use ((normalize(lookAt - pos) *
farZ) + the unproject point) and you have your ray.

On May 10, 1:24 pm, Alfonso  wrote:
> I've got that collision detection system implemented, yet. And I'm
> agree to use glUnproject as the best achoice. My problem is that I
> remap the modelview matrix with the sensors and when I rotate the
> phone, change the coords of the screen returned by glUnproject. Even
> if I keep the object in the same place of the screen. Furthermore, I
> don't understand why it doesn't return values according to the given
> viewport. Because of all this I was looking for alternatives, but if
> you explain me what's the matter with glUnproject, I'll be really
> pleasent.
>
> Thanks you very much for this answer and (I hope) for the next one.
>
> On 10 mayo, 19:11, Robert Green  wrote:
>
>
>
>
>
> > What are you trying to do?
>
> > glReadPixels is a pipeline stall - it will slow everything down.  If
> > you want to check to see if an object has been touched, use a
> > collision detection system, unproject the touch point into a ray and
> > get the closest item that intersects with that ray.  It's actually
> > easier, more reliable and faster.
>
> > On May 10, 10:16 am, Alfonso  wrote:
>
> > > glReadPixels is too slow, so I need another way. Without testing
> > > object by object, Is there any other way?
>
> > > Thanks you 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 
> > > athttp://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 
> > athttp://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 
> athttp://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: Scala, Android, Eclipse - not including Scala jar?

2010-05-10 Thread James Moore
On Thu, May 6, 2010 at 7:55 PM, Bob Kerns  wrote:
> The lesson there is that if you use Proguard, and something odd goes
> wrong, always try disabling that first -- because the amount of time
> you can potentially waste is huge!
>
> Proguard works pretty well, and is pretty useful. But this, together
> with its learning curve and setup time, are its big drawbacks. But
> shrinking and optimizing apps means phones can do more...

Except that proguard is a required part of the Scala + Android process
right now, for Scala 2.8.0.RC1.  Android won't take the standard Scala
library without proguard (or something else) first stripping it down.
It's not something you can bypass easily.

-- 
James Moore
ja...@restphone.com
http://jamesmoorecode.blogspot.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: How can I fix this touch ev ent / draw loop “deadlock”?

2010-05-10 Thread niko20
Yes you should definitely put a small Yield or sleep in the drawing
thread, this will allow the UI thread to process events. Also make
sure to only synchronize exactly when you need to. For example, dont
synchronize while checking which touch action it is, etc. Instead
synchronize only right before you change the global shared value.

-niko

On May 9, 9:41 am, Josh  wrote:
> Thanks for your thoughts.  I've started handing off my input events
> using a concurrent queue, and that seems to handle the blocking issue.
>
> Now I've started testing out my saveState code, which also has a synch
> block, and it's having the same issue.  Should I send a "savestate"
> message down the pipeline and let the thread itself handle the save?
> Or do the yield thing?
>
> BTW, I've checked out your blog before, nice, informative stuff!
>
> On May 8, 1:09 am, Robert Green  wrote:
>
>
>
>
>
> > Josh,
>
> > I used to have that exact same problem.  There are a few things you
> > can do.  One is try having your logic thread call Thread.yield() which
> > hopefully will let the UI thread get the synchronized block and inject
> > the touch event.  The other is to separate the locking so that you
> > only block the UI thread when you're processing touch events, not
> > while your thread is running (which is always and is why you're having
> > this problem).
>
> > I set up a queue for input objects and the only time the queue
> > insertion is blocked is when my logic thread is actually processing
> > the events, which is for only a fraction of the total update time.
> > Check out my code here 
> > -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> > Once you implement that (if you do), you should have less problems.
>
> > On May 7, 1:05 pm, Josh  wrote:
>
> > > I'm trying to use the structure laid out in LunarLander to create a
> > > simple game in which the user can drag some bitmaps around on the
> > > screen (the actual game is more complex, but that's not important). I
> > > ripped out the irrelevant parts of LanderLander, and set up my own
> > > bitmap drawing, something like
>
> > > In BoardThread (an inner class of BoardView):
> > > run()
> > > {
> > >   while(mRun)
> > >   {
> > >     canvas = lockSurfaceHolder...
> > >     syncronized(mSurfaceHolder)
> > >     {
> > >       /* drawStuff using member position fields
> > >          in BoardView */
> > >     }
> > >     unlockSurfaceHolder
> > >   }
>
> > > }
>
> > > My drawStuff simply walks through some arrays and throws bitmaps onto
> > > the canvas. All that works fine. Then I wanted to start handling touch
> > > events so that when the user presses a bitmap, it is selected, when
> > > the user unpresses a bitmap, it is deselected, and if a bitmap is
> > > selected during a touch move event, the bitmap is dragged. I did this
> > > stuff by listening for touch events in the BoardView's parent,
> > > BoardActivity, and passing them down into the BoardView. Something
> > > like
>
> > > In BoardView
> > > handleTouchEvent(MotionEvent e)
> > > {
> > >   synchronized(mSurfaceHolder)
> > >   {
> > >     /* Modify shared member fields in BoardView
> > >        so BoardThread can render the bitmaps */
> > >   }
>
> > > }
>
> > > This ALSO works fine. I can drag my tiles around the screen no
> > > problem.
>
> > > However, every once in a while, when the app first starts up and I
> > > trigger my first touch event, the handleTouchEvent stops executing at
> > > the synchronized line (as viewed in DDMS). The drawing loop is active
> > > during this time (I can tell because a timer changes onscreen), and it
> > > usually takes several seconds or more before a bunch of touch events
> > > come through the pipeline and everything is fine again.
>
> > > This doesn't seem like deadlock to me, since the draw loop is
> > > constantly going in and out of its syncronized block. Shouldn't this
> > > allow the event handling thread to grab a lock on mSurfaceHolder?
> > > What's going on here? Anyone have suggestions for improving how I've
> > > structured this?
>
> > > Some other info. This "hang" only ever occurs on first touch event
> > > after activity start. This includes on orientation change after
> > > restoreState has been called. Also, I can remove EVERYTHING within the
> > > syncronized block in the event handler, and it will still get hung up
> > > at the syncronized call.
>
> > > 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 
> > > athttp://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

Re: [android-developers] Re: SIP Stack

2010-05-10 Thread mike

On 05/10/2010 11:24 AM, HeHe wrote:

when i mentioned "...not be able to receive incoming calls..", i was
not thinking about "just server->client streaming". Mike, you knew
it :)

what is your mobile service provider? the sentence "IP address changes
are probably pretty rare" looks strange to a T-Moble user like me. at
least i find my G1 ip frequently changes :(
   


So I haven't actually tested this, and I disclaimed because I
wasn't sure :) If you're getting lots of IP address changes regardless
of what's happening at the 3gpp/l2 layer, you're probably not going
to not have a very good experience with streaming media of any kind
because once the IP address changes, the RTP stream is going to
tank regardless of SIP, RTSP, Skype, etc.

That's why you'd need to deal with it more directly like using IP
handoffs using Mobile IP, etc. Handoffs could be done using SIP, but
it would be ugly. Which probably means that somebody has proposed it
and that the working group has taken it on :) AFAIK, mobile IP is still
not deployed widely,  even though we were working on it the handoff
probelm almost 10 years ago...

Part of the reason probably is because 3GPP's latency is really awful for
real time conversations so there's still too high an energy barrier to 
actually
deal with the truly difficult problem of dealing with handoffs when TDM 
still
works just fine. Maybe 4G will get rid of all that bizarre leftovers 
from the

ATM/bellhead days that 3G had to live with to get standardized.

In any case as far as SIP registration goes, it should be relatively easy to
camp on an event for when the IP address changes and quickly reregister
inside the SIP stack. It wouldn't be surprising that most of the SIP stacks
already have that feature. How bad this is on battery life is obviously
dependent on how often IP addresses are actually changing, but you have
the exact same problem with IM so at some level it's "acceptable" since
people do use IM...

Mike

On May 10, 10:47 am, mike  wrote:
   

On 05/10/2010 10:24 AM, HeHe wrote:

 

i was not thinking about media.
   
 

i guess the reason why sipdroid+TCP+pbxes can lower battery use is to
enlarge sip registration expiration, eg. to 5 minutes or longer. what
if mobile service provider changes phone IP earlier than 5 min when
the provider finds no traffic to/from the phone? it will not be able
to receive incoming calls without re-registration.
   
 

anyway, i am just guessing. do you know the usual (or by default)
registration expiration between sipdroid and pbxes?
   

Again, if this is just server->client streaming this is yet another
reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol,
and all rendezvous protocols are complicated, with lots of things to
consider.

AFAIK -- it's been a long time -- SIP registrations can be very long
lasting. Unless something has actually changed -- like your IP address
moved -- it shouldn't be a problem. I'm not entirely convinced that this
is a huge issue anyway because the cellular guys are probably moving
you around at L2 for the most part (again, it's been a long time since I've
paid attention to the 3gpp guys), so IP address changes are probably
pretty rare. I have no idea if anybody's been deploying mobile IP which
would more directly solve this issue.

Mike, who used to like to make fun of Henning, Cullen and Jonathan and
many others in the SIP WG because of SIP's complexity.





 

On May 10, 9:32 am, mikewrote:
   
 

On 05/10/2010 09:04 AM, HeHe wrote:
 
 

i saw this in sipdroid project FAQ:
   
 

 "Sipdroid now uses TCP for the signaling connection and keeps the
corresponding port open."
   
 

does anyone know how peer servers of sipdroid handle scalability when
there are a million of sipdroid clients connecting with the servers
using TCP?
   
 

as i observed, T-mobile Intermittently changes IP of my G1 phone
without any notice, which in fact tears down the TCP connection.
   
 

Remember that SIP doesn't actually transport the media, that's
RTP which is over UDP. So losing the connection shouldn't generally
be any worse than losing a http connection generally.
 
 

As far as scalability, I woudn't worry about that too much. UDP
based SIP suffers from a lot of problems, not the least of which is
the lack of security (unless you manage to find DTLS or are running
it over IPsec). And of course NAT's are tricky as I mentioned before.
 
 

But I still haven't heard why RTSP wouldn't be a better choice if
this is just server->client streaming. SIP is a kitchen sink of a
protocol.
 
 

Mike
 
 

On May 9, 10:14 pm, "Nandan ."  wrote:
   
 

yaa android cod support *sip stack s*uch as mjsip, now  pjsip is already
ported in android platform.
 
 

i can refer you just see sipdroid project.
sipdroid.org
 
 

yo

[android-developers] Re: ProgressDialog Problem with Rotation

2010-05-10 Thread Aaron
The solution is very simple, for anyone who runs into this in the
future...

As Kumar stated when the phone is rotated the activity is destroyed
and recreated - you don't have to play with Android for very long
before you realize that.

What I didn't know is you can override that behavior by adding this to
to the activity node in the android manifest:
android:configChanges="orientation"

there is more information about it here:
http://groups.google.com/group/android-developers/browse_thread/thread/c2ff370c99317236/f955457847fc69b8#f955457847fc69b8

and

http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges

but basically instead of destroying the activity the method
onConfigurationChanged method is called.  I'm not sure what other
problems this creates but this seems to be better default behavior
than destroying and recreating everything

-Aaron

On May 10, 11:15 am, Aaron  wrote:
> Thanks Mike, that was very helpful!
>
> I'll See if I can use the info to get my example working correctly,
> and post it for the next person...
>
> On May 10, 9:05 am, Mike dg  wrote:
>
>
>
>
>
> > Evan Charlton wrote a great article that might help you.
>
> >http://evancharlton.com/thoughts/rotating-async-tasks/
>
> > -Mike dg
>
> > On May 10, 12:37 am, Aaron  wrote:
>
> > > I have a managed ProgressDialog that show the status as tasks are
> > > moving along.  The Activity.show is kicked off by an AsyncTask
> > > progressUpdates and the final Activity.closeDialog is called through
> > > the AsyncTask as well.  Everything works beautifully as long as the
> > > screen is not rotated...
>
> > > What am I doing wrong? I thought having the Activity manage my dialog
> > > would solve this for me... Here is the code I'm playing with:
>
> > > public class Enter extends Activity {
> > >         ProgressDialog progressDialog;
> > >         private final static int PROGRESS_DIALOG_ID = 1;
>
> > >     @Override
> > >     public void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
> > >         setContentView(R.layout.main);
>
> > >         Button button = (Button)findViewById(R.id.progressbar_button);
>
> > >         button.setOnClickListener(new View.OnClickListener(){
>
> > >                         @SuppressWarnings("unchecked")
> > >                         public void onClick(View v) {
>
> > >                                 Enter.this.showDialog(PROGRESS_DIALOG_ID);
> > >                                 new AsyncTask(){
>
> > >                                         @Override
> > >                                         protected Object 
> > > doInBackground(Object... params) {
> > >                                                 progressDialog.setMax(30);
> > >                                                 for (int a = 0; a < 30; 
> > > a++){
> > >                                                         
> > > publishProgress(new Integer((a+1)));
> > >                                                         try {
> > >                                                                 
> > > Thread.sleep(1000);
> > >                                                                 
> > > Log.d("Enter", "Click: " + a);
> > >                                                         } catch 
> > > (InterruptedException e) {
> > >                                                                 
> > > e.printStackTrace();
> > >                                                         }
> > >                                                 }
> > >                                                 return null;
> > >                                         }
>
> > >                                         @Override
> > >                                         protected void 
> > > onProgressUpdate(Object... values) {
> > >                                                 
> > > super.onProgressUpdate(values);
> > >                                                 Integer progress = 
> > > (Integer)values[0];
> > >                                                 
> > > progressDialog.setProgress(progress.intValue());
> > >                                         }
>
> > >                                         @Override
> > >                                         protected void 
> > > onPostExecute(Object result) {
> > >                                                 
> > > super.onPostExecute(result);
> > >                                                 
> > > Enter.this.dismissDialog(PROGRESS_DIALOG_ID);
> > >                                         }
> > >                                 }.execute((Object[]) null);
> > >                         }
> > >         });
> > >     }
>
> > >     @Override
> > >     protected Dialog onCreateDialog(int id) {
> > >         Dialog dialog = null;
> > >         if (id == PROGRESS_DIALOG_ID){
> > >             progressDialog = new ProgressDialog(this);
>
> > > progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);

Re: [android-developers] Re: On activity (re)usage en creation

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 1:34 PM, EnnaN  wrote:

> Any thoughts on how "bad" the current behaviour is?


Not sure what you mean - but if you haven't touched anything else, the
current behavior is the default behavior, which should suffice for most
apps.

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

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

2010-05-10 Thread EnnaN
> > In the meanwhile, is there a standard method to ensure some sort of
> > singleton effect?
>
> Not sure what you mean by "singleton effect",

I was referring to the singleton pattern (http://en.wikipedia.org/wiki/
Singleton_pattern), but as its not completely correct in this case i
obfuscaded the term somewhat to "singleton effect" :) Sorry bout that.

> but you probably want to look
> at the launch mode flags when starting your activities. The singleTask flag,
> in particular, might be of interest to you.

I'll check that so i'll atleast have the choice between the two
options.
Any thoughts on how "bad" the current behaviour is?


(ow, and many thanks for the replies :)  )

Nanne.

>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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: Strange ListView divider behaviour

2010-05-10 Thread Ondra
Ok, I've probably solved the problem (but i still don't understand
it).

When I add  into app's manifest
file, all problems mentioned earlier and badly rendered pixels
disappear (no matter which IDE i use).

Ondra

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

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 1:18 PM, EnnaN  wrote:

> In the meanwhile, is there a standard method to ensure some sort of
> singleton effect?
>

Not sure what you mean by "singleton effect", but you probably want to look
at the launch mode flags when starting your activities. The singleTask flag,
in particular, might be of interest to you.

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

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

2010-05-10 Thread EnnaN
Well that was easy:

Entry 1->click->Comments 1->click->Entry 2.

Using back works like you'd expect (that sounds good), so that would
mean i'm starting a string of activities (could be bad).
Anyone care to give advice about this? Is this a big memoryproblem, or
could this just work?


Nanne.


On May 10, 8:18 pm, EnnaN  wrote:
> > You can test this pretty easily by doing what you described and backing out.
> > If it's the former, you should have 2 back presses. If it's the latter, you
> > should have to back out as many times as activities you started. Yes?
>
> Good point I think! That would mean that the back-button is defined as
> "go back 1 activity", and not something more fancy with states. I
> couldn't find the precize definition of the back button, so i'll
> assume you're right and go test. In the meanwhile, is there a standard
> method to ensure some sort of singleton effect?
> I'll check back later.
>
>
>
> > -
> > TreKing - Chicago transit tracking app for Android-powered 
> > deviceshttp://sites.google.com/site/rezmobileapps/treking
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://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 
> athttp://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: SIP Stack

2010-05-10 Thread HeHe
when i mentioned "...not be able to receive incoming calls..", i was
not thinking about "just server->client streaming". Mike, you knew
it :)

what is your mobile service provider? the sentence "IP address changes
are probably pretty rare" looks strange to a T-Moble user like me. at
least i find my G1 ip frequently changes :(

On May 10, 10:47 am, mike  wrote:
> On 05/10/2010 10:24 AM, HeHe wrote:
>
> > i was not thinking about media.
>
> > i guess the reason why sipdroid+TCP+pbxes can lower battery use is to
> > enlarge sip registration expiration, eg. to 5 minutes or longer. what
> > if mobile service provider changes phone IP earlier than 5 min when
> > the provider finds no traffic to/from the phone? it will not be able
> > to receive incoming calls without re-registration.
>
> > anyway, i am just guessing. do you know the usual (or by default)
> > registration expiration between sipdroid and pbxes?
>
> Again, if this is just server->client streaming this is yet another
> reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol,
> and all rendezvous protocols are complicated, with lots of things to
> consider.
>
> AFAIK -- it's been a long time -- SIP registrations can be very long
> lasting. Unless something has actually changed -- like your IP address
> moved -- it shouldn't be a problem. I'm not entirely convinced that this
> is a huge issue anyway because the cellular guys are probably moving
> you around at L2 for the most part (again, it's been a long time since I've
> paid attention to the 3gpp guys), so IP address changes are probably
> pretty rare. I have no idea if anybody's been deploying mobile IP which
> would more directly solve this issue.
>
> Mike, who used to like to make fun of Henning, Cullen and Jonathan and
>            many others in the SIP WG because of SIP's complexity.
>
>
>
>
>
> > On May 10, 9:32 am, mike  wrote:
>
> >> On 05/10/2010 09:04 AM, HeHe wrote:
>
> >>> i saw this in sipdroid project FAQ:
>
> >>>     "Sipdroid now uses TCP for the signaling connection and keeps the
> >>> corresponding port open."
>
> >>> does anyone know how peer servers of sipdroid handle scalability when
> >>> there are a million of sipdroid clients connecting with the servers
> >>> using TCP?
>
> >>> as i observed, T-mobile Intermittently changes IP of my G1 phone
> >>> without any notice, which in fact tears down the TCP connection.
>
> >> Remember that SIP doesn't actually transport the media, that's
> >> RTP which is over UDP. So losing the connection shouldn't generally
> >> be any worse than losing a http connection generally.
>
> >> As far as scalability, I woudn't worry about that too much. UDP
> >> based SIP suffers from a lot of problems, not the least of which is
> >> the lack of security (unless you manage to find DTLS or are running
> >> it over IPsec). And of course NAT's are tricky as I mentioned before.
>
> >> But I still haven't heard why RTSP wouldn't be a better choice if
> >> this is just server->client streaming. SIP is a kitchen sink of a
> >> protocol.
>
> >> Mike
>
> >>> On May 9, 10:14 pm, "Nandan ."    wrote:
>
>  yaa android cod support *sip stack s*uch as mjsip, now  pjsip is already
>  ported in android platform.
>
>  i can refer you just see sipdroid project.
>  sipdroid.org
>
>  you can use  rtpsender and reciver java file of sipdroid project of media
>  folder.
>
>  bhavesh
>
>  On Mon, May 10, 2010 at 3:24 AM, mike    wrote:
>
> > On 05/06/2010 01:24 AM, vaibhav wrote:
>
> >> Hi
>
> >> When I went through the document "opencore_framework_capabilities.pdf"
> >> I came to know that Android supports RTP streaming for 3gpp format.
>
> >> After doing a anaysis I found that the data from a server could be
> >> streamed to the android device and played back. i.e the RTP payloads
> >> sent from the server are parsed by the Android device and sent to the
> >> decoder for playback.
>
> >> 1. I want to know if it is possible that the PCM data captured from a
> >> camera and then encoded using a particular encoder could be streamed
> >> using  RTP from  android code i.e is RTP sender support present in the
> >> Android code ?. If not then can someone please mention what could be
> >> the possible modifications required.
>
> >> 2. Does Android code support SIP stack ?.
>
> > I assume that know that RTP is the actual media payloads, and that SIP
> > is the rendezvous protocol to facilitate setting up the RTP listeners 
> > via
> > an SDP announcement?
>
> > That said, it sounds like you ought to look into RTSP if what you're 
> > trying
> > to do is just stream. SIP is very, very complicated in comparison, and 
> > has
> > all kinds of issues surrounding NAT's that are likely to just confuse 
> > the
> > issue if all you're trying to do is Server->Client streaming.
>
> > Mike
>
> > --
> > You received this message because you 

[android-developers] Re: How can I know if OpenGl has drawn something?

2010-05-10 Thread Alfonso
I've got that collision detection system implemented, yet. And I'm
agree to use glUnproject as the best achoice. My problem is that I
remap the modelview matrix with the sensors and when I rotate the
phone, change the coords of the screen returned by glUnproject. Even
if I keep the object in the same place of the screen. Furthermore, I
don't understand why it doesn't return values according to the given
viewport. Because of all this I was looking for alternatives, but if
you explain me what's the matter with glUnproject, I'll be really
pleasent.

Thanks you very much for this answer and (I hope) for the next one.

On 10 mayo, 19:11, Robert Green  wrote:
> What are you trying to do?
>
> glReadPixels is a pipeline stall - it will slow everything down.  If
> you want to check to see if an object has been touched, use a
> collision detection system, unproject the touch point into a ray and
> get the closest item that intersects with that ray.  It's actually
> easier, more reliable and faster.
>
> On May 10, 10:16 am, Alfonso  wrote:
>
> > glReadPixels is too slow, so I need another way. Without testing
> > object by object, Is there any other way?
>
> > Thanks you 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 
> > athttp://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 
> athttp://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] Check The Pic and comment

2010-05-10 Thread pawan nimje
Hi All,

Check the image attached and let me know if its possible ...

6 tabs ... 4 above and 2 below ...

and if yes .. how??

PS : i have created 4 tabs [all above :) ] using extends TabActivity,tabhost
etc .

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

2010-05-10 Thread EnnaN

> You can test this pretty easily by doing what you described and backing out.
> If it's the former, you should have 2 back presses. If it's the latter, you
> should have to back out as many times as activities you started. Yes?

Good point I think! That would mean that the back-button is defined as
"go back 1 activity", and not something more fancy with states. I
couldn't find the precize definition of the back button, so i'll
assume you're right and go test. In the meanwhile, is there a standard
method to ensure some sort of singleton effect?
I'll check back later.


>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] Go back to previous activity

2010-05-10 Thread pawan nimje
The resone why i want all this is ...

what im wanting is since all those activities are already created ... on
button click i jus want to switch [jump] to those activities ... instead of
using the startActivity(intent) method ...anyways forget it and thnx for the
help

On Mon, May 10, 2010 at 10:47 PM, TreKing  wrote:

> On Mon, May 10, 2010 at 11:46 AM, pawan nimje wrote:
>
>> hey Treking ... is there any way to find out the contents of Activity
>> Stack ..
>
>
> There should be a most recently used list somewhere - dig around the
> documentation (ApplicationInfo, Packagemanager, etc would be likely
> culprits).
>
> i.e getting the name and position of Activities ... and den bringing
>> forward any of the activities ..
>
>
> You probably won't be able to directly access other activities to bring
> them to the front, though you could theoretically start those activities
> with the proper intent.
>
> All this begs the question of why you want to do this anyway?
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: On using themes?!

2010-05-10 Thread Mariano Kamp
Hmmh, also no answer to this question on themes. Maybe the answer cannot be
given with two lines? So let me explain what I would expect step by step and
you stop me were I deviate from the Golden Path? I'll try yes/no questions.

In the simplest terms I would expect that in every place I can specify a
color in RGB (#) I could also specify a symbolic name instead. This
should work like @color/xyz, but with one more level of indirection that
lets me switch between themes, like dark and light.

Is that possible?

I would expect those themes to be applicable to (a) widgets, (b) drawables
(see the mentioned example) and (c) when I need to style something myself
like HTML. Are (a) - (c) possible?

Furthermore I would expect that I could define style keys myself, but I got
the impression that only keys from the "android" namespace can be used? That
lead me to believe that you can't define abstract colors, but only styles
for specific attributes used in the widgets' implementations.

And again, if there is any meaningful documentation I would be happy to read
it. Just send me the link or name of the book.

On Sat, May 8, 2010 at 3:26 PM, Mariano Kamp  wrote:

> Hi,
>
> I have trouble 
> (example)
> wrapping my head around styles/themes. Can somebody help me or point me to
> actual documentation?
>
> Let's say I have a drawable that I want to use as the background of a
> layout:
>
> http://schemas.android.com/apk/res/android";
> android:shape="rectangle">
>  android:angle="270" />
> 
>
>
> Now I want to have a dark and a light theme. Depending on the chosen theme I 
> want to have a different value for startColor and endColor. How do I do that? 
> I am aware of extending themes, but what do I put into the items? How do I 
> reference those new values then?
>
>
> Cheers,
>
> Mariano
>
>

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

2010-05-10 Thread mike

On 05/10/2010 10:24 AM, HeHe wrote:

i was not thinking about media.

i guess the reason why sipdroid+TCP+pbxes can lower battery use is to
enlarge sip registration expiration, eg. to 5 minutes or longer. what
if mobile service provider changes phone IP earlier than 5 min when
the provider finds no traffic to/from the phone? it will not be able
to receive incoming calls without re-registration.

anyway, i am just guessing. do you know the usual (or by default)
registration expiration between sipdroid and pbxes?
   


Again, if this is just server->client streaming this is yet another
reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol,
and all rendezvous protocols are complicated, with lots of things to
consider.

AFAIK -- it's been a long time -- SIP registrations can be very long
lasting. Unless something has actually changed -- like your IP address
moved -- it shouldn't be a problem. I'm not entirely convinced that this
is a huge issue anyway because the cellular guys are probably moving
you around at L2 for the most part (again, it's been a long time since I've
paid attention to the 3gpp guys), so IP address changes are probably
pretty rare. I have no idea if anybody's been deploying mobile IP which
would more directly solve this issue.

Mike, who used to like to make fun of Henning, Cullen and Jonathan and
  many others in the SIP WG because of SIP's complexity.


On May 10, 9:32 am, mike  wrote:
   

On 05/10/2010 09:04 AM, HeHe wrote:

 

i saw this in sipdroid project FAQ:
   
 

"Sipdroid now uses TCP for the signaling connection and keeps the
corresponding port open."
   
 

does anyone know how peer servers of sipdroid handle scalability when
there are a million of sipdroid clients connecting with the servers
using TCP?
   
 

as i observed, T-mobile Intermittently changes IP of my G1 phone
without any notice, which in fact tears down the TCP connection.
   

Remember that SIP doesn't actually transport the media, that's
RTP which is over UDP. So losing the connection shouldn't generally
be any worse than losing a http connection generally.

As far as scalability, I woudn't worry about that too much. UDP
based SIP suffers from a lot of problems, not the least of which is
the lack of security (unless you manage to find DTLS or are running
it over IPsec). And of course NAT's are tricky as I mentioned before.

But I still haven't heard why RTSP wouldn't be a better choice if
this is just server->client streaming. SIP is a kitchen sink of a
protocol.

Mike





 

On May 9, 10:14 pm, "Nandan ."wrote:
   
 

yaa android cod support *sip stack s*uch as mjsip, now  pjsip is already
ported in android platform.
 
 

i can refer you just see sipdroid project.
sipdroid.org
 
 

you can use  rtpsender and reciver java file of sipdroid project of media
folder.
 
 

bhavesh
 
 

On Mon, May 10, 2010 at 3:24 AM, mikewrote:
 
 

On 05/06/2010 01:24 AM, vaibhav wrote:
   
 

Hi
 
 

When I went through the document "opencore_framework_capabilities.pdf"
I came to know that Android supports RTP streaming for 3gpp format.
 
 

After doing a anaysis I found that the data from a server could be
streamed to the android device and played back. i.e the RTP payloads
sent from the server are parsed by the Android device and sent to the
decoder for playback.
 
 

1. I want to know if it is possible that the PCM data captured from a
camera and then encoded using a particular encoder could be streamed
using  RTP from  android code i.e is RTP sender support present in the
Android code ?. If not then can someone please mention what could be
the possible modifications required.
 
 

2. Does Android code support SIP stack ?.
 
 

I assume that know that RTP is the actual media payloads, and that SIP
is the rendezvous protocol to facilitate setting up the RTP listeners via
an SDP announcement?
   
 

That said, it sounds like you ought to look into RTSP if what you're trying
to do is just stream. SIP is very, very complicated in comparison, and has
all kinds of issues surrounding NAT's that are likely to just confuse the
issue if all you're trying to do is Server->Client streaming.
   
 

Mike
   
 

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

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

[android-developers] Re: SIP Stack

2010-05-10 Thread HeHe
i was not thinking about media.

i guess the reason why sipdroid+TCP+pbxes can lower battery use is to
enlarge sip registration expiration, eg. to 5 minutes or longer. what
if mobile service provider changes phone IP earlier than 5 min when
the provider finds no traffic to/from the phone? it will not be able
to receive incoming calls without re-registration.

anyway, i am just guessing. do you know the usual (or by default)
registration expiration between sipdroid and pbxes?

On May 10, 9:32 am, mike  wrote:
> On 05/10/2010 09:04 AM, HeHe wrote:
>
> > i saw this in sipdroid project FAQ:
>
> >    "Sipdroid now uses TCP for the signaling connection and keeps the
> > corresponding port open."
>
> > does anyone know how peer servers of sipdroid handle scalability when
> > there are a million of sipdroid clients connecting with the servers
> > using TCP?
>
> > as i observed, T-mobile Intermittently changes IP of my G1 phone
> > without any notice, which in fact tears down the TCP connection.
>
> Remember that SIP doesn't actually transport the media, that's
> RTP which is over UDP. So losing the connection shouldn't generally
> be any worse than losing a http connection generally.
>
> As far as scalability, I woudn't worry about that too much. UDP
> based SIP suffers from a lot of problems, not the least of which is
> the lack of security (unless you manage to find DTLS or are running
> it over IPsec). And of course NAT's are tricky as I mentioned before.
>
> But I still haven't heard why RTSP wouldn't be a better choice if
> this is just server->client streaming. SIP is a kitchen sink of a
> protocol.
>
> Mike
>
>
>
>
>
> > On May 9, 10:14 pm, "Nandan ."  wrote:
>
> >> yaa android cod support *sip stack s*uch as mjsip, now  pjsip is already
> >> ported in android platform.
>
> >> i can refer you just see sipdroid project.
> >> sipdroid.org
>
> >> you can use  rtpsender and reciver java file of sipdroid project of media
> >> folder.
>
> >> bhavesh
>
> >> On Mon, May 10, 2010 at 3:24 AM, mike  wrote:
>
> >>> On 05/06/2010 01:24 AM, vaibhav wrote:
>
>  Hi
>
>  When I went through the document "opencore_framework_capabilities.pdf"
>  I came to know that Android supports RTP streaming for 3gpp format.
>
>  After doing a anaysis I found that the data from a server could be
>  streamed to the android device and played back. i.e the RTP payloads
>  sent from the server are parsed by the Android device and sent to the
>  decoder for playback.
>
>  1. I want to know if it is possible that the PCM data captured from a
>  camera and then encoded using a particular encoder could be streamed
>  using  RTP from  android code i.e is RTP sender support present in the
>  Android code ?. If not then can someone please mention what could be
>  the possible modifications required.
>
>  2. Does Android code support SIP stack ?.
>
> >>> I assume that know that RTP is the actual media payloads, and that SIP
> >>> is the rendezvous protocol to facilitate setting up the RTP listeners via
> >>> an SDP announcement?
>
> >>> That said, it sounds like you ought to look into RTSP if what you're 
> >>> trying
> >>> to do is just stream. SIP is very, very complicated in comparison, and has
> >>> all kinds of issues surrounding NAT's that are likely to just confuse the
> >>> issue if all you're trying to do is Server->Client streaming.
>
> >>> Mike
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com >>>  cr...@googlegroups.com>
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en
>
> >> --
> >> 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 
> >> athttp://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 
> athttp://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 grou

Re: [android-developers] Go back to previous activity

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 11:46 AM, pawan nimje  wrote:

> hey Treking ... is there any way to find out the contents of Activity Stack
> ..


There should be a most recently used list somewhere - dig around the
documentation (ApplicationInfo, Packagemanager, etc would be likely
culprits).

i.e getting the name and position of Activities ... and den bringing forward
> any of the activities ..


You probably won't be able to directly access other activities to bring them
to the front, though you could theoretically start those activities with the
proper intent.

All this begs the question of why you want to do this anyway?

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

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

[android-developers] Re: How can I know if OpenGl has drawn something?

2010-05-10 Thread Robert Green
What are you trying to do?

glReadPixels is a pipeline stall - it will slow everything down.  If
you want to check to see if an object has been touched, use a
collision detection system, unproject the touch point into a ray and
get the closest item that intersects with that ray.  It's actually
easier, more reliable and faster.

On May 10, 10:16 am, Alfonso  wrote:
> glReadPixels is too slow, so I need another way. Without testing
> object by object, Is there any other way?
>
> Thanks you 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 
> athttp://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: draw a 2d marker on a openGL scene

2010-05-10 Thread Robert Green
I couldn't find it either, hrmm  Anyway it's like this:

gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glPushMatrix();
gl.glLoadIdentity();
GLU.gluOrtho2D(gl, 0, viewportWidth, viewportHeight, 0);
gl.glMatrixMode(GL10.GL_MODELVIEW);

// draw your quad in 2d here - coordinate system is top left = 0,0 to
bottom right = width,height

gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glPopMatrix();
gl.glMatrixMode(GL10.GL_MODELVIEW);


On May 10, 5:32 am, Paolo  wrote:
> I searched for that, but i did't find anything... Could you link it,
> please?
>
> On 4 Mag, 17:48, Robert Green  wrote:
>
>
>
>
>
> > Paolo,
>
> > If you want to do it the canvas-style,
>
> > Just flip the projection to orthographic and draw a 2D quad.  I have
> > posted the code for that more than once on here so if you do a search
> > you'll probably find it somewhere.
>
> > On May 4, 5:02 am, Paolo  wrote:
>
> > > Hi robert, thanks for your answer.
> > > It could be a possible way, but i i think is too much for my
> > > objective. In my case the camera is static, instead it is the grid
> > > that moves around me.
>
> > > I have only to put some static object over the grid. I say object, but
> > > is more correct say small picture. Consider that I'm developing an
> > > Augmented Reality App.
>
> > > I hoped that was possible to do that, using canvas on the opengl grid,
> > > but maybe is impossible.
>
> > > On 3 Mag, 21:10, Robert Green  wrote:
>
> > > > If you want the 2D objects to have depth, you'll want to use
> > > > billboarded quads.  You may want to look around to find a better
> > > > implementation but here's a tutorial 
> > > > -http://www.lighthouse3d.com/opengl/billboarding/
>
> > > > On May 3, 8:47 am, Paolo  wrote:
>
> > > > > Hi guys!
>
> > > > > I've a problem and I'm not able to solve at the moment.
>
> > > > > I have realized a grid with openGL on a GLSurfaceview. This grid
> > > > > rotates at 360° on all the aces using the orientation sensors.
>
> > > > > Now I'd like to put over it some markers at specified coordinates,
> > > > > such as 2D objects, as if they were attached to the grid, because they
> > > > > have to rotate together to the grid.
>
> > > > > How how I can make it?
>
> > > > > Thanks.
>
> > > > > Paolo
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to 
> > > > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscr...@googlegroups.com
> > > > > For more options, visit this group 
> > > > > athttp://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 
> > > > athttp://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 
> > > athttp://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 
> > athttp://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 
> athttp://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: Need Assistance !!!

2010-05-10 Thread Maps.Huge.Info (Maps API Guru)
You might consider using a webview UI in an application such as this,
it's easier for beginners to learn and has a lot of power behind it.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Having a back button functioning like the emulators

2010-05-10 Thread pawan nimje
sorry and thank u ...

On Mon, May 10, 2010 at 10:03 PM, TreKing  wrote:

> On Mon, May 10, 2010 at 11:09 AM, pawan nimje wrote:
>
>> wat code should i write to make my back button behave like the emulators
>> ...
>
>
> finish().
>
> And please don't double post - it's really unnecessary.
>
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Go back to previous activity

2010-05-10 Thread pawan nimje
yup ... finish() is working ...

hey Treking ... is there any way to find out the contents of Activity Stack
..

i.e getting the name and position of Activities ... and den bringing forward
any of the activities ..

plz help ..

On Mon, May 10, 2010 at 9:59 PM, TreKing  wrote:

> On Mon, May 10, 2010 at 11:24 AM, pawan nimje wrote:
>
>> I want to go back to previous activity
>> What code should i write for back button
>>
>
> How about finish() ?
>
>
>> plz dont suggest
>>
>> Intent i = new Intent(Constants.CountryContext, selectcountry.class);
>>
> startActivity(i);
>>
>
> I have no idea what ContryContext or selectcountry.class are. Why in the
> world would anyone suggest that?
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Go back to previous activity

2010-05-10 Thread pawan nimje
By

Intent i = new Intent(Constants.CountryContext, selectcountry.class);
>
startActivity(i);
>

i meant

Intent i = new Intent(getApplicationContext(), SomeClass.class);
>
startActivity(i);



On Mon, May 10, 2010 at 9:59 PM, TreKing  wrote:

> On Mon, May 10, 2010 at 11:24 AM, pawan nimje wrote:
>
>> I want to go back to previous activity
>> What code should i write for back button
>>
>
> How about finish() ?
>
>
>> plz dont suggest
>>
>> Intent i = new Intent(Constants.CountryContext, selectcountry.class);
>>
> startActivity(i);
>>
>
> I have no idea what ContryContext or selectcountry.class are. Why in the
> world would anyone suggest that?
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] On activity (re)usage en creation

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 11:35 AM, EnnaN  wrote:

> If I call the "entry" activity (with an intent) on a link to show
> this entry, am I re-using the old activity, or am I creating an
> endless string of entry, comment, entry, comment activities (pretty
> cost- ineffective that would be).
>

You can test this pretty easily by doing what you described and backing out.
If it's the former, you should have 2 back presses. If it's the latter, you
should have to back out as many times as activities you started. Yes?

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

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

[android-developers] On activity (re)usage en creation

2010-05-10 Thread EnnaN
A question that might be a bit general/basic knowledge, but for me it
has a quite direct background, so i'll form it as an example:

I have an activity "entry" showing something equivalent of a blogpost,
that might have comments. You can click somewhere to open a "comments"
activity. But in this activity there are links back to entries,
creating a nice line of activities.

If I call the "entry" activity (with an intent) on a link to show this
entry, am I re-using the old activity, or am I creating an endless
string of entry, comment, entry, comment activities (pretty cost-
ineffective that would be).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Having a back button functioning like the emulators

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 11:09 AM, pawan nimje  wrote:

> wat code should i write to make my back button behave like the emulators
> ...


finish().

And please don't double post - it's really unnecessary.

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

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

2010-05-10 Thread mike

On 05/10/2010 09:04 AM, HeHe wrote:

i saw this in sipdroid project FAQ:

   "Sipdroid now uses TCP for the signaling connection and keeps the
corresponding port open."

does anyone know how peer servers of sipdroid handle scalability when
there are a million of sipdroid clients connecting with the servers
using TCP?

as i observed, T-mobile Intermittently changes IP of my G1 phone
without any notice, which in fact tears down the TCP connection.
   



Remember that SIP doesn't actually transport the media, that's
RTP which is over UDP. So losing the connection shouldn't generally
be any worse than losing a http connection generally.

As far as scalability, I woudn't worry about that too much. UDP
based SIP suffers from a lot of problems, not the least of which is
the lack of security (unless you manage to find DTLS or are running
it over IPsec). And of course NAT's are tricky as I mentioned before.

But I still haven't heard why RTSP wouldn't be a better choice if
this is just server->client streaming. SIP is a kitchen sink of a
protocol.

Mike


On May 9, 10:14 pm, "Nandan ."  wrote:
   

yaa android cod support *sip stack s*uch as mjsip, now  pjsip is already
ported in android platform.

i can refer you just see sipdroid project.
sipdroid.org

you can use  rtpsender and reciver java file of sipdroid project of media
folder.

bhavesh





On Mon, May 10, 2010 at 3:24 AM, mike  wrote:
 

On 05/06/2010 01:24 AM, vaibhav wrote:
   
 

Hi
 
 

When I went through the document "opencore_framework_capabilities.pdf"
I came to know that Android supports RTP streaming for 3gpp format.
 
 

After doing a anaysis I found that the data from a server could be
streamed to the android device and played back. i.e the RTP payloads
sent from the server are parsed by the Android device and sent to the
decoder for playback.
 
 

1. I want to know if it is possible that the PCM data captured from a
camera and then encoded using a particular encoder could be streamed
using  RTP from  android code i.e is RTP sender support present in the
Android code ?. If not then can someone please mention what could be
the possible modifications required.
 
 

2. Does Android code support SIP stack ?.
 
 

I assume that know that RTP is the actual media payloads, and that SIP
is the rendezvous protocol to facilitate setting up the RTP listeners via
an SDP announcement?
   
 

That said, it sounds like you ought to look into RTSP if what you're trying
to do is just stream. SIP is very, very complicated in comparison, and has
all kinds of issues surrounding NAT's that are likely to just confuse the
issue if all you're trying to do is Server->Client streaming.
   
 

Mike
   
 

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

--
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 
athttp://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] Go back to previous activity

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 11:24 AM, pawan nimje  wrote:

> I want to go back to previous activity
> What code should i write for back button
>

How about finish() ?


> plz dont suggest
>
> Intent i = new Intent(Constants.CountryContext, selectcountry.class);
>
startActivity(i);
>

I have no idea what ContryContext or selectcountry.class are. Why in the
world would anyone suggest that?

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

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

[android-developers] Go back to previous activity

2010-05-10 Thread pawan nimje
I want to go back to previous activity

What code should i write for back button

plz dont suggest

Intent i = new Intent(Constants.CountryContext, selectcountry.class);
startActivity(i);

This creates the whole activity again ... which i dont want ..
 i want somthing like emulators back button ..

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

2010-05-10 Thread Aaron
Thanks Mike, that was very helpful!

I'll See if I can use the info to get my example working correctly,
and post it for the next person...

On May 10, 9:05 am, Mike dg  wrote:
> Evan Charlton wrote a great article that might help you.
>
> http://evancharlton.com/thoughts/rotating-async-tasks/
>
> -Mike dg
>
> On May 10, 12:37 am, Aaron  wrote:
>
>
>
>
>
> > I have a managed ProgressDialog that show the status as tasks are
> > moving along.  The Activity.show is kicked off by an AsyncTask
> > progressUpdates and the final Activity.closeDialog is called through
> > the AsyncTask as well.  Everything works beautifully as long as the
> > screen is not rotated...
>
> > What am I doing wrong? I thought having the Activity manage my dialog
> > would solve this for me... Here is the code I'm playing with:
>
> > public class Enter extends Activity {
> >         ProgressDialog progressDialog;
> >         private final static int PROGRESS_DIALOG_ID = 1;
>
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.main);
>
> >         Button button = (Button)findViewById(R.id.progressbar_button);
>
> >         button.setOnClickListener(new View.OnClickListener(){
>
> >                         @SuppressWarnings("unchecked")
> >                         public void onClick(View v) {
>
> >                                 Enter.this.showDialog(PROGRESS_DIALOG_ID);
> >                                 new AsyncTask(){
>
> >                                         @Override
> >                                         protected Object 
> > doInBackground(Object... params) {
> >                                                 progressDialog.setMax(30);
> >                                                 for (int a = 0; a < 30; 
> > a++){
> >                                                         publishProgress(new 
> > Integer((a+1)));
> >                                                         try {
> >                                                                 
> > Thread.sleep(1000);
> >                                                                 
> > Log.d("Enter", "Click: " + a);
> >                                                         } catch 
> > (InterruptedException e) {
> >                                                                 
> > e.printStackTrace();
> >                                                         }
> >                                                 }
> >                                                 return null;
> >                                         }
>
> >                                         @Override
> >                                         protected void 
> > onProgressUpdate(Object... values) {
> >                                                 
> > super.onProgressUpdate(values);
> >                                                 Integer progress = 
> > (Integer)values[0];
> >                                                 
> > progressDialog.setProgress(progress.intValue());
> >                                         }
>
> >                                         @Override
> >                                         protected void onPostExecute(Object 
> > result) {
> >                                                 super.onPostExecute(result);
> >                                                 
> > Enter.this.dismissDialog(PROGRESS_DIALOG_ID);
> >                                         }
> >                                 }.execute((Object[]) null);
> >                         }
> >         });
> >     }
>
> >     @Override
> >     protected Dialog onCreateDialog(int id) {
> >         Dialog dialog = null;
> >         if (id == PROGRESS_DIALOG_ID){
> >             progressDialog = new ProgressDialog(this);
>
> > progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
> >             progressDialog.setTitle("Pleae Wait");
> >             progressDialog.setMessage("Running a long process...");
> >             progressDialog.setCancelable(true);
> >             dialog = progressDialog;
> >         }
> >         return dialog;
> >     }
>
> > Thanks!
>
> > -Aaron
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You r

[android-developers] Having a back button functioning like the emulators

2010-05-10 Thread pawan nimje
Hi all

I have 3 activities

1: Welcome screen

2:List of country

3:Details abt that country

Now i want to from activity 3 to 2

Currently wat im doing is

 Intent i = new Intent(getApplicationContext(), selectcountry.class);
 startActivity(i);

This way the onCreate methode of 2nd activity is called ... and the whole
list is populated again ...

But the back button of emulated function differently ...

wat code should i write to make my back button behave like the emulators ...

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

2010-05-10 Thread HeHe
i saw this in sipdroid project FAQ:

  "Sipdroid now uses TCP for the signaling connection and keeps the
corresponding port open."

does anyone know how peer servers of sipdroid handle scalability when
there are a million of sipdroid clients connecting with the servers
using TCP?

as i observed, T-mobile Intermittently changes IP of my G1 phone
without any notice, which in fact tears down the TCP connection.

On May 9, 10:14 pm, "Nandan ."  wrote:
> yaa android cod support *sip stack s*uch as mjsip, now  pjsip is already
> ported in android platform.
>
> i can refer you just see sipdroid project.
> sipdroid.org
>
> you can use  rtpsender and reciver java file of sipdroid project of media
> folder.
>
> bhavesh
>
>
>
>
>
> On Mon, May 10, 2010 at 3:24 AM, mike  wrote:
> > On 05/06/2010 01:24 AM, vaibhav wrote:
>
> >> Hi
>
> >> When I went through the document "opencore_framework_capabilities.pdf"
> >> I came to know that Android supports RTP streaming for 3gpp format.
>
> >> After doing a anaysis I found that the data from a server could be
> >> streamed to the android device and played back. i.e the RTP payloads
> >> sent from the server are parsed by the Android device and sent to the
> >> decoder for playback.
>
> >> 1. I want to know if it is possible that the PCM data captured from a
> >> camera and then encoded using a particular encoder could be streamed
> >> using  RTP from  android code i.e is RTP sender support present in the
> >> Android code ?. If not then can someone please mention what could be
> >> the possible modifications required.
>
> >> 2. Does Android code support SIP stack ?.
>
> > I assume that know that RTP is the actual media payloads, and that SIP
> > is the rendezvous protocol to facilitate setting up the RTP listeners via
> > an SDP announcement?
>
> > That said, it sounds like you ought to look into RTSP if what you're trying
> > to do is just stream. SIP is very, very complicated in comparison, and has
> > all kinds of issues surrounding NAT's that are likely to just confuse the
> > issue if all you're trying to do is Server->Client streaming.
>
> > Mike
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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 
> athttp://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] Set an ImageView at a particular position inside GridView

2010-05-10 Thread tilo1583
I am using the GridView along with an ImageAdapter. The functionality
I want is that I select a particular image and drop it on to the
GridView. I want this image to snap to a cell closest to where it has
been dropped.

How do I tell the GridView (or the Adapter) to set this dropped Image
in the appropriate location?

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


[android-developers] Namespaces and custom widgets

2010-05-10 Thread Edward Falk
As a continuation of the thread in
http://groups.google.com/group/android-developers/browse_thread/thread/390e8188cedd66a6,
I'm still trying to figure out how a custom widget can use
getIdentifier() to read attributes.

As an example, I have a widget class called CustomWidget.  It has
attributes "inner_margin" and "outer_margin".  Normally, to read these
attributes, I would do the following in source code:

  import com.example.customactivity.R;// I don't want to do this.

  ...

  TypedArray a =
  ctx.obtainStyledAttributes(attrs, R.styleable.CustomWidget);

  innerMargin = a.getInt(R.styleable.CustomWidget_inner_margin, 0);


Because my CustomWidget is intended to be shared among a number of
projects, or even get published, it's a real problem having to import
R from whatever activity it's going to be linked with.

What I'd rather do is:

  int resid = ctx.getResources().getIdentifier("inner_margin", "int",
  "com.example.customwidget");
  innerMargin = a.getInt(resid, 0);

but getidentifier always returns zero.

Can anybody tell me the magic I need to perform to do what I want?

For completeness, my CustomWidget.xml file that defines the resources
looks like this:



  


 


and for even more completeness, the entire source code can be found at
http://www.efalk.org/tmp/CustomWidget.tar.gz

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

2010-05-10 Thread Lamia Hannoun
Thanks for ur quick answer but can u give me more information(tutorial) or
some example code !!!
Thx



2010/5/10 Jose Gomez 

> If you can return JSON then you should be ok
>
> THanks
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
>   On Mon, May 10, 2010 at 9:38 AM, Lamia Hannoun 
> wrote:
>
>>   Hi to all!
>>
>> I made the connection between  my service WCF and my app android. But i'm
>> wondering if u have ideas about using complex types (classes created on the
>> server side). should i implement the serialization process? or should i juts
>> create the classes on my client side(android)
>>
>> Plz can u help me
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>   --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2010-05-10 Thread Alfonso
glReadPixels is too slow, so I need another way. Without testing
object by object, Is there any other way?

Thanks you 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] Re: Strange ListView divider behaviour

2010-05-10 Thread Ondra
Next observation:
When i build/run application from within Eclipse, everything behaves
normal (that means all dividers are visible).
However, when i create/build/run new project by means of "android
create", "and debug" and "adb install" tools, the app is rendered
badly (some of the dividers are invisible, as can be seen in attached
picture).

Could it be caused by differences building tools/process?

Thanks
Ondra

On May 5, 5:09 pm, Ondra  wrote:
> Hi,
> can anyone help me out with a problem I've run into?
>
> I have been trying to create aListViewActivity with an ImageView in
> every row. I've used this 
> tutorial:http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
>
> The issue is that there are always some dividers missing whenever I
> run the example. The dividers are disappearing/appearing and
> flickering as i scroll the list (tested in emulator and HTC Tattoo).
>
> Strangeis that the same example downloaded from the market (API Demos
> app) behaves correctly.
>
> Here is a screenshot of how it looks:http://yfrog.com/4cnokp
>
> Thanks
> Andy
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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: I've found a way to stop piracy of my apps

2010-05-10 Thread dadical
That argument assumes that I don't respond to those cracks with
improvements to AAL that will make it more difficult! :)  Also, each
app will need to be cracked individually, and I'm trying to work out
some ways to make that a job that isn't cookie-cutter.  The point here
is to get this past the pain threshold where it won't be worth the
trouble for an app that is only a few bucks.

This is fascinating stuff, but very, very non-lucrative.  I don't
really want to engage in this game, but I don't see an alternative
until it gets solved at the platform level.

Given the lack of commercial interest (and the prodding of several
smart devs), I've considered opening this up, but I'm not sure how to
do that without it simply lowering the barrier for pirates.

On May 10, 3:55 am, MobDev  wrote:
> " It took several days (almost a week) for crackers
> to decompile Screebl Pro and find a way to circumvent AAL.  Typically
> it takes about 90 secs from the time that we publish to the market for
> the various warez sites to start tweeting the location of the
> download."
>
> I was wondering, after the first crack-run they obviously will have
> devised a crack-method, which means that every other app using AAL
> will be cracked within 90 seconds till a new version is released... A
> week of cracking will only be the case during the first attempt...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] Need Assistance !!!

2010-05-10 Thread Sattanaathan Ravi
Alright thanks for your Advice TreKing

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

2010-05-10 Thread Paul
I think if this thread gets enough response and attention then someone
from Google may notice. They've got to have people looking at these
posts once in a while.

Is there no official Bug list for Android Market? I did post a thread
here : 
http://www.google.com/support/forum/p/Android+Market/thread?tid=6bdc164d35206f39&hl=en,
which claims its a Feature Request "forum". Of course no responses
there yet.

For Android to continue to succeed they need strong support from the
Development community, how do we get heard?


> You can't actually make Google do anything, but it wouldn't surprise
> me if this is the sort of thing they have already thought long and
> hard about, but their many lawyers and bizdev types will have to
> completely grok the problem before anything is done.
>

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


[android-developers] Re: Is Google working on the Bluetooth bug? Any estimated date of completion?

2010-05-10 Thread frankentux
The same problem seems to be detailed here: 
http://forum.samdroid.net/threads/598
Looks like SPP is completely broken on the i5700 - possibly because of
the Broadcom BCM4325.
On the positive side, that chip has a FM module :-)

On May 3, 6:56 pm, frankentux  wrote:
> http://stackoverflow.com/questions/2661932http://pastebin.org/199621
>
> could also be interesting
>
> On May 2, 2:32 am, DonFrench  wrote:
>
> > Nexus One.  No experience with spica.
>
> > On May 1, 6:35 am, frankentux  wrote:
>
> > > My device is a i5700 Samsung spica. The stackoverflow links and the
> > > logcats i pasted to pastebin.com (again, see my last post above) all
> > > relate to the issue on the spica. Do you have a similar issue with a
> > > spica?
>
> > > On 1 Mai, 00:13, dan raaka  wrote:
>
> > > > is the device being referred here Spica (i5700)?
>
> > > > -Dan
>
> > > > On Fri, Apr 30, 2010 at 12:10 PM, DonFrench  wrote:
> > > > > I am not sure if it is the same issue but it sounds related.  My app
> > > > > was eventually able to connect to the device I was having trouble with
> > > > > but only after I manually unpaired it.  I never deliberately paired it
> > > > > in the first place and I was never asked for a pin during the time it
> > > > > was failing to connect.  The device had apparently been automatically
> > > > > paired by Android when it was first detected, as are other nearby
> > > > > laptops and phones and PDAs.   After unpairing it, I did not re-pair
> > > > > through the Android utility but ran my app again and attempted to
> > > > > connect to it, at which time I was prompted to enter the pin and to
> > > > > pair.  This request to pair did not come directly from my code but
> > > > > resulted from a call to BluetoothSocket.connect( ).  At this point it
> > > > > successfully connected and continues to connect.  So it seems like the
> > > > > automatic pairing does something that prevents later connection.  I
> > > > > wonder if once it is automatically paired without a pin, future
> > > > > attempts to connect recognize that it has been paired but doesn't
> > > > > recognize that no pin was ever requested and so fails for lack of a
> > > > > valid pin.  Just a guess.
>
> > > > > On Apr 29, 9:21 am, frankentux  wrote:
> > > > > > Is this related to:
>
> > > > > >http://stackoverflow.com/questions/2661932/problem-with-bluetooth-on-...
>
> > > > >http://pastebin.org/191806http://pastebin.org/191824http://pastebin.o...
>
> > > > > > It sounds like the same issue...
>
> > > > > > On Apr 29, 2:09 am, DonFrench  wrote:
>
> > > > > > > (sorry, premature Send of previous message)
>
> > > > > > > As I was saying, the two devices have the same name but different 
> > > > > > > MAC
> > > > > > > addresses.  Whether this was related to the problem I am not sure.
> > > > > > > But simply unpairing the device that would not connect solved the
> > > > > > > problem.  It re-paired the next time my code tried to connect and 
> > > > > > > from
> > > > > > > then on I could connect to either device without doing any more
> > > > > > > unpairing.
>
> > > > > > > On Apr 28, 5:03 pm, DonFrench  wrote:
>
> > > > > > > > Update to this problem:  I discovered that the device that 
> > > > > > > > could not
> > > > > > > > be connected to had been paired at some time in the past.  Both
> > > > > > > > devices have the same name but different MAC
>
> > > > > > > > On Apr 24, 4:30 pm, DonFrench  wrote:
>
> > > > > > > > > There is an apparentbugin theBluetoothservice discovery code, 
> > > > > > > > > as
> > > > > > > > > has been mentioned by several people on several forums.  The 
> > > > > > > > > upshot
> > > > > is
> > > > > > > > > that the BluetoothSocket.connect( ) method consistently fails 
> > > > > > > > > to
> > > > > > > > > discover a valid SPP service on some devices that are 
> > > > > > > > > discoverable
> > > > > > > > > with non-Android devices while it consistently succeeds to 
> > > > > > > > > discover
> > > > > > > > > the SPP service on seemingly identical devices.  Obviously, 
> > > > > > > > > the two
> > > > > > > > > devices are not identical but the fact is that I manufacture 
> > > > > > > > > two
> > > > > such
> > > > > > > > > devices and there is nothing obviously different about them.  
> > > > > > > > > I can
> > > > > > > > > consistently connect to both devices from a Windows Mobile 
> > > > > > > > > app.   I
> > > > > > > > > hope thatGooglewill address thisbugin the very near future.  I
> > > > > > > > > will be willing to test any trialbug-fixes on my devices.
>
> > > > > > > > > Here is the relevant log output from the failed attempt:
>
> > > > > > > > > 04-24 15:23:33.268: INFO/ActivityManager(82): Starting 
> > > > > > > > > activity:
> > > > > > > > > Intent { cmp=com.thegadgetworks/.DeviceListActivity }
> > > > > > > > > 04-24 15:23:33.308: DEBUG/DeviceListActivity(8055): 
> > > > > > > > > doDiscovery()
> > > > > > > > > 04-24 15:23:33.318: ERROR/BluetoothEventLoop.cpp(82): 
> > > > > >

[android-developers] Re: Eclipse: running junit tests

2010-05-10 Thread Patrick
I checked it again, unfortunately this is not the problem. The package
matches the package of the application:



at.test.android.myapplication  is the package, in which the source of
the application is.

On May 10, 12:12 am, "Fred Grott(Android Expert, 
http://mobilebytes.wordpress.com)"
 wrote:
> recheck your test manifest do you have the right package listed in the
> manifest?
>
> On May 9, 2:51 pm, Patrick  wrote:
>
>
>
> > Hallo!
>
> > I implemented a junit3 test in an Android Test Project (which was
> > created by the wizard) testing classes of my real project. Running the
> > unittest I get the following error:
>
> > [2010-05-09 21:30:05 - AndroidConsumerApplicationTest] Performing
> > android.test.InstrumentationTestRunner JUnit launch
> > [2010-05-09 21:30:05 - AndroidConsumerApplicationTest] Automatic
> > Target Mode: using existing emulator 'emulator-5554' running
> > compatible AVD 'AVD1.6'
> > [2010-05-09 21:30:05 - AndroidConsumerApplicationTest] Uploading
> > MyApplicationTest.apk onto device 'emulator-5554'
> > [2010-05-09 21:30:06 - AndroidConsumerApplicationTest] Installing
> > MyApplicationTest.apk...
> > [2010-05-09 21:30:08 - AndroidConsumerApplicationTest] Success!
> > [2010-05-09 21:30:08 - AndroidConsumerApplicationTest] Project
> > dependency found, installing: MyApplication
> > [2010-05-09 21:30:10 - AndroidConsumerApplication] Application already
> > deployed. No need to reinstall.
> > [2010-05-09 21:30:10 - AndroidConsumerApplicationTest] Launching
> > instrumentation android.test.InstrumentationTestRunner on device
> > emulator-5554
> > [2010-05-09 21:30:14 - MyApplicationTest] Test run failed: Unable to
> > find instrumentation target package: at.test.android.myapplication
>
> > Do you have an idea, what could cause this problem?
>
> > 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 
> > athttp://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 
> athttp://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] Communication between Activities in Tabs

2010-05-10 Thread Patrick
My application contains several Tabs. Each tab is it's own activity.
They are created by using for example Intent intent = new
Intent().setClass(this, SearchActivity.class); There I pass only the
class of the activity.
My question: how do I get the instance? (I want to invoke a method,
which hides some buttons in another tab, therefore I need the instance
of the activity). What is the best way to achieve this?

Thanks in advance for your help.

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


[android-developers] Re: Problem in sending in SMS

2010-05-10 Thread Brion Emde
Another option is to use the built-in ACTION_SEND or its variants, so
that you are using the facilities that are already available. This is
and especially useful approach for a beginner.

Look for ACTION_SEND in this document:
http://developer.android.com/reference/android/content/Intent.html

and you can piece together how to use it.

As an example, this bit of code lets the user choose whether to send
the information as SMS or as an email.

---


private void sendData(String value) {
// We're going to send the data in two forms, as message text 
and as
an
// attachment
FileOutputStream fos;
if (value == null || !(mSendText.isChecked() ||
mSendFile.isChecked())) {
Toast.makeText(this, R.string.msg_nothing_to_send,
Toast.LENGTH_LONG).show();
return;
}
try {
fos = this.openFileOutput("data.csv", 
Context.MODE_WORLD_READABLE);
fos.write(value.getBytes());
fos.close();
Uri fileUri = 
Uri.fromFile(getFileStreamPath("data.csv"));
// Log.d(TAG, "File Uri: " + fileUri.toString());
Intent i = new Intent(Intent.ACTION_SEND);
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (mSendText.isChecked())
i.putExtra(Intent.EXTRA_TEXT, value);
if (mSendFile.isChecked())
i.putExtra(Intent.EXTRA_STREAM, fileUri);
i.putExtra(Intent.EXTRA_TITLE, "bpdata.csv");
i.putExtra(Intent.EXTRA_SUBJECT, "bpdata.csv");
i.setType("text/plain");
Intent ai = Intent.createChooser(i,

getString(R.string.msg_choose_send_method));
ai.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ai);
} catch (FileNotFoundException e) {
Log.e(TAG, getString(R.string.title_error));
Toast.makeText(this, getString(R.string.title_error),
Toast.LENGTH_LONG).show();
e.printStackTrace();
} catch (IOException e) {
Log.e(TAG, getString(R.string.title_error));
Toast.makeText(this, getString(R.string.title_error),
Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}

---

On May 10, 2:20 am, rajesh chandrasekaran 
wrote:
> Hi all
>
> I am new in android, i need to send the sms in android, i have tryed
> with the following code, and i have tested in emulator, but i am
> getting error.
>
> i need to know how to send sms, and also please tell me below code
> will work or not
>
> import android.app.Activity;
> import android.app.AlertDialog;
> import android.app.PendingIntent;
> import android.content.Intent;
> import android.os.Bundle;
> import android.telephony.gsm.SmsManager;
> import android.view.View;
> import android.view.View.OnClickListener;
> import android.widget.Button;
> import android.widget.EditText;
>
> public class email extends Activity {
>     /** Called when the activity is first created. */
>
>         public EditText name_text;
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.email);
>
>         final EditText to_text = (EditText)
> findViewById(R.id.to_text);
>         to_text.setOnClickListener(new OnClickListener() {
>                         public void onClick(View v) {
>                                 to_text.setText("");
>                         }
>                 });
>
>                 final EditText message_label = (EditText)
> findViewById(R.id.message_text);
>                 message_label.setOnClickListener(new OnClickListener() {
>                         public void onClick(View v) {
>                                 message_label.setText("");
>                         }
>                 });
>
>         Button send_button = (Button) findViewById(R.id.send_button);
>         send_button.setOnClickListener(new OnClickListener() {
>
>                 public void onClick(View arg0) {
>                         String tvstring = to_text.getText().toString();
>                         String bodystring = 
> message_label.getText().toString();
>                         tvstring = tvstring.trim();
>
>                 if (tvstring.equalsIgnoreCase("Enter The Email-ID")
>                                         || tvstring.equalsIgnoreCase(""))
>                 {
>                                 AlertDialog.Builder builder = new
> AlertDialog.Builder(email.this);
>                              

[android-developers] Re: ProgressDialog Problem with Rotation

2010-05-10 Thread Mike dg
Evan Charlton wrote a great article that might help you.

http://evancharlton.com/thoughts/rotating-async-tasks/

-Mike dg

On May 10, 12:37 am, Aaron  wrote:
> I have a managed ProgressDialog that show the status as tasks are
> moving along.  The Activity.show is kicked off by an AsyncTask
> progressUpdates and the final Activity.closeDialog is called through
> the AsyncTask as well.  Everything works beautifully as long as the
> screen is not rotated...
>
> What am I doing wrong? I thought having the Activity manage my dialog
> would solve this for me... Here is the code I'm playing with:
>
> public class Enter extends Activity {
>         ProgressDialog progressDialog;
>         private final static int PROGRESS_DIALOG_ID = 1;
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         Button button = (Button)findViewById(R.id.progressbar_button);
>
>         button.setOnClickListener(new View.OnClickListener(){
>
>                         @SuppressWarnings("unchecked")
>                         public void onClick(View v) {
>
>                                 Enter.this.showDialog(PROGRESS_DIALOG_ID);
>                                 new AsyncTask(){
>
>                                         @Override
>                                         protected Object 
> doInBackground(Object... params) {
>                                                 progressDialog.setMax(30);
>                                                 for (int a = 0; a < 30; a++){
>                                                         publishProgress(new 
> Integer((a+1)));
>                                                         try {
>                                                                 
> Thread.sleep(1000);
>                                                                 
> Log.d("Enter", "Click: " + a);
>                                                         } catch 
> (InterruptedException e) {
>                                                                 
> e.printStackTrace();
>                                                         }
>                                                 }
>                                                 return null;
>                                         }
>
>                                         @Override
>                                         protected void 
> onProgressUpdate(Object... values) {
>                                                 
> super.onProgressUpdate(values);
>                                                 Integer progress = 
> (Integer)values[0];
>                                                 
> progressDialog.setProgress(progress.intValue());
>                                         }
>
>                                         @Override
>                                         protected void onPostExecute(Object 
> result) {
>                                                 super.onPostExecute(result);
>                                                 
> Enter.this.dismissDialog(PROGRESS_DIALOG_ID);
>                                         }
>                                 }.execute((Object[]) null);
>                         }
>         });
>     }
>
>     @Override
>     protected Dialog onCreateDialog(int id) {
>         Dialog dialog = null;
>         if (id == PROGRESS_DIALOG_ID){
>             progressDialog = new ProgressDialog(this);
>
> progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
>             progressDialog.setTitle("Pleae Wait");
>             progressDialog.setMessage("Running a long process...");
>             progressDialog.setCancelable(true);
>             dialog = progressDialog;
>         }
>         return dialog;
>     }
>
> Thanks!
>
> -Aaron
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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: [Help] how to draw multiple lines in Edittext?

2010-05-10 Thread social hub
What exactly is your problem here . getting line count 18 when u filled
textbox with 18 lines?

On Sat, May 8, 2010 at 12:53 AM, Vincent Tsao wrote:

> @Soical Hub: thanks for your help, your suggestion inspired me a lot
>
> i finally find this way to get padding: *getCompoundPaddingTop()*, and it
> works fine now
>
> what' more, i find another "tricky" way to meet my requirement:
>
> *Step 1: fill in the EditText with 18 'empty' line rows*
>
> StringBuilder sb = new StringBuilder();
>  for (int i = 0; i < 18; i++) {
>  sb.append("\n");
>  }
>
> * this.setText(sb.toString());*
>
>
> *Step 2: draw those 18 lines
>
> *
> *  *  @Override
>
> protected void onDraw(Canvas canvas) {
> canvas.drawColor(paperColor);
> * int count = getLineCount(); // that's the tricky part, now count
> will return 18*
>  Rect r = mRect;
>
>  for (int i = 0; i < count; i++) {
>  int baseline = getLineBounds(i, r);
>
>  // Draw ruled lines
>  canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1,
>
>  linePaint);
>
>  canvas.save();
>  }
>  super.onDraw(canvas);
>  canvas.restore();**
> *  *}
>
> but i don't like this tricky way personally :)
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Java Help, Replace first line of text file!

2010-05-10 Thread Abhi
Hi,

I am looking for a way to replace the first line of a file. Until now,
I was using BufferedReader to read the contents of the file into and
then going through each line and look for the one I want to replace.
This caused some memory issues as a large file with large data would
slow things down on the phone. So I moved the line to be the first
line of the file and all I want to do is whenever there is a need,
replace the contents of first line with something else without caring
about the rest of the file.

I have been suggested different ways to do this, StringBuilder,
RandomAccessFile but I am looking for a neat example for any of the
above solutions or any other solution.

Please help

Thanks,

Abhi

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required!

2010-05-10 Thread Abhi
Al

Could you give an example of how to use StringBuilder to replace what
I am doing?

Thanks,

Abhi

On May 6, 3:37 pm, Al  wrote:
> This isn't an error, it's just a message to inform you it is better to
> specify the size of thebufferyou need in the constructor.
>
> Abhi wrote:
> >   String line = "", oldtext = "";
>
> >      while((line = reader.readLine()) != null)
> >              {
> >                  oldtext += line + "\r\n";
> >              }
>
> Don't do that, use a StringBuilder and StringBuilder#append() instead.
> String concatenation like the way you are doing it slows things down
> and creates more objects.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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] WCF complex types with android

2010-05-10 Thread Jose Gomez
If you can return JSON then you should be ok

THanks
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, May 10, 2010 at 9:38 AM, Lamia Hannoun wrote:

> Hi to all!
>
> I made the connection between  my service WCF and my app android. But i'm
> wondering if u have ideas about using complex types (classes created on the
> server side). should i implement the serialization process? or should i juts
> create the classes on my client side(android)
>
> Plz can u help me
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Wired crash with ActivityUnitTestCase and dimens.xml

2010-05-10 Thread T-Droid
Hi @all,

I wrote a test case with ActivityUnitTestCase which was working fine.

Now I added a dimensions file (dimens.xml) and using the values with a
style.xml.

Here some parts from the dimens.xml:


  
  15dp


Here the attrs.xml:

  

  


And here the style.xml:

  
@dimen/my_height
?theHeight
  


The style.xml is in the android manifest.

On the G1 and the emulator the code works fine. In the test case I'm
getting a crash.

05-10 15:03:48.658: INFO/TestRunner(748):
java.lang.UnsupportedOperationException: Can't convert to dimension:
type=0x2

>From the call stack I can see that this line causes the crash:

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

this.setContentView(R.layout.my_layout);
   }

Any idea?

T-Droid

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


[android-developers] MMS URI Structure

2010-05-10 Thread Daniel Wiedenheft
Inspired by a post by CJ a few months ago, and because I ran into the
same problem, I did a little (OK, a LOT) of poring through endless
screens of code, and finally made some headway on how MMS messages are
stored.  Although the documentation blatantly omits this (read:
unsupported, may change in the future, don't rely on it, danger Will
Robinson) the list of supported URIs for accessing the parts of MMSes
is pasted below directly from the MMSprovider.java file.  Each of
these is preceded by "content://mms/", and the # sign means that you
put in a number (ID) to select a specific record.  I hope others will
find this to be the breakthrough that I found it to be!

Example: To find a certain MMS record whose ID is 326 in the Inbox,
use the URI "content://mms/inbox/326"
To return all addresses related to message ID 326, use "content://mms/
326/addr"

sURLMatcher.addURI("mms", null, MMS_ALL);
sURLMatcher.addURI("mms", "#",  MMS_ALL_ID);
sURLMatcher.addURI("mms", "inbox",  MMS_INBOX);
sURLMatcher.addURI("mms", "inbox/#",MMS_INBOX_ID);
sURLMatcher.addURI("mms", "sent",   MMS_SENT);
sURLMatcher.addURI("mms", "sent/#", MMS_SENT_ID);
sURLMatcher.addURI("mms", "drafts", MMS_DRAFTS);
sURLMatcher.addURI("mms", "drafts/#",   MMS_DRAFTS_ID);
sURLMatcher.addURI("mms", "outbox", MMS_OUTBOX);
sURLMatcher.addURI("mms", "outbox/#",   MMS_OUTBOX_ID);
sURLMatcher.addURI("mms", "part",   MMS_ALL_PART);
sURLMatcher.addURI("mms", "#/part", MMS_MSG_PART);
sURLMatcher.addURI("mms", "part/#", MMS_PART_ID);
sURLMatcher.addURI("mms", "#/addr", MMS_MSG_ADDR);
sURLMatcher.addURI("mms", "rate",   MMS_SENDING_RATE);
sURLMatcher.addURI("mms", "report-status/#",  MMS_REPORT_STATUS);
sURLMatcher.addURI("mms", "report-request/#", MMS_REPORT_REQUEST);
sURLMatcher.addURI("mms", "drm",MMS_DRM_STORAGE);
sURLMatcher.addURI("mms", "drm/#",  MMS_DRM_STORAGE_ID);

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


[android-developers] WCF complex types with android

2010-05-10 Thread Lamia Hannoun
Hi to all!

I made the connection between  my service WCF and my app android. But i'm
wondering if u have ideas about using complex types (classes created on the
server side). should i implement the serialization process? or should i juts
create the classes on my client side(android)

Plz can u help me

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

Re: [android-developers] Re: ProgressDialog - how to remove the numbers

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 4:05 AM, oriharel  wrote:

> I got an answer that there is no answer.


Sure there is - find wherever the sample is placing those numbers and take
that part out.

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

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

2010-05-10 Thread TreKing
On Mon, May 10, 2010 at 12:38 AM, flumby  wrote:

> The user experience is very much like the play controls button on Media
> controls. Any suggestion/sample code on how to implement it?
>

Isn't that part of the open source code? If so, seems like the best place to
look.

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

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

2010-05-10 Thread Mark Murphy
Esdras Beleza wrote:
> 5) Here comes the problem: if I go to other application (browser, for
> example) and go back to my application, the intent seems to be received
> again, onResume() is called and the dialog A, B or C is shown. But they
> must be shown *only* when the widget is clicked.
>
> Any suggestion? I'm so tired of this problem that I can't think about
> any new solution.

I am assuming there is more to the application than the three dialogs,
by virtue of: "if I go to other application (browser, for example) and
go back to my application". This means, apparently, that you are trying
to use the same activity for at least four different things:

-- dialog A
-- dialog B
-- dialog C
-- whatever other functionality you "go back to"

Move your dialog A/B/C handling into an activity that finish()-es itself
when done, so that it is not in the user's BACK button history. If need
be, do that after calling startActivity() for the activity that does the
rest of your app. That way, your dialog-displaying activities cannot be
navigated to except by your widget.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] Need Assistance !!!

2010-05-10 Thread TreKing
On Sun, May 9, 2010 at 11:53 PM, Sattanaathan Ravi
wrote:

> Architecture and other guidances(how to get things done)


What does "Architecture" mean? How to get WHAT things done? Everything? Do
you want someone to come on here and post you a how-to-make-an-app guide
from start to finish? Do you really think that's going to happen?


> and any tips that relates to the app will be of a great help..,


Tip: Read the documentation, get a good book, and get started on your own.
Then, as you get stuck on SPECIFIC problems you need help with come back and
post here. Sorry, but realistically no one is going to drop what they're
doing to walk you through making an app, which is what it sounds like you're
asking for.

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Max number of bluetooth devices that can be paired?

2010-05-10 Thread Sandeep Phansekar
Hi

you can pair max 7 device for proper functionality.

-- 
Regards

Sandeep


On Mon, May 10, 2010 at 3:10 PM, guru  wrote:

> Hi All
>
> is there any max limit that we can pair with bluetooth devices? How to
> check this limit.?
>
> when i tried to pair with more than 15 devices, it becomes slow and
> later it doesnt pair.
>
> Regards
> Gururaja B O
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Common code reuse

2010-05-10 Thread Max Gilead
As Mark said, resources are going to be an issue.

For code though there's a simple way which would allow you to edit the
shared code on the fly. Create a standard Android project and manually
remove Android nature from its .project file (it you do this from inside
Eclipse it'll all get automatically updated). With this change you'll be
able to treat it as a library and reference its code from other Android
projects.

Cheers,
Max


On 7 May 2010 12:16, Mark Murphy  wrote:

> Ajay wrote:
> > Hi,
> >I have a set of common code (including .java files and resources) ,
> > which I have to use for two similar applications with different
> > package names (for different vendors). How can I maintain two packages
> > which share the common code without making two copies of the common
> > source?
>
> You can compile the source code into a JAR and have the other projects
> incorporate that JAR file. However, resources are then a problem -- you
> can't use R.layout, R.id, R.string, or similar ways to identify those
> resources.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Beginning Android 2_ from Apress Now Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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