[android-developers] BitmapDrawable with unexpected size in Android 2.0.1 WVA854

2009-12-28 Thread Hermes Pique
I want to display a 480x320 JPEG file stored in the SD card in Android
2.0.1 with WVGA854 skin and 240 lcd density (Motorola Droid).

However, when I create a BitmapDrawable through Drawable.createFromPath
(), the resulting BitmapDrawable has the following values:

mBitmapWidth = 320
mBitmapHeight = 213
mTargetDensity = 160

The manifest includes the following configuration:




Apparently Android is resizing the bitmap. What could be the cause of
this behavior? How can I avoid it?

Thank you in advance.

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


[android-developers] Searching a BaseExpandableListAdapter

2009-12-28 Thread sriram
Hi All,

I am implementing a tree view using the BaseExpandableListAdapter.
Pretty much done with it and am abkle to display the data in a parent-
child format. Now I want to add the search feature to it.
What is the suggested implementation?
1) Do I create a custom toast and filter the tree basing on the text
entered in toast.
2) Or is there some sort of native implementation (like using
Fiterable etc) to do the searching?

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: Facebook login fail

2009-12-28 Thread npak...@gmail.com
Hi all,
I also use FBrocket library but I can not post anything on my Wall
after finishing log in.
My error is:
==
12-29 14:09:55.672: INFO/System.out(798): Facebook Server Error + 104
- Incorrect signature
12-29 14:09:55.681: WARN/System.err(798): Facebook Server Error + 104
- Incorrect signature
12-29 14:09:55.681: WARN/System.err(798): at
net.xeomax.FBRocket.QueryProcessor.errorCheck(QueryProcessor.java:89)
12-29 14:09:55.691: WARN/System.err(798): at
net.xeomax.FBRocket.QueryProcessor.getBoolean(QueryProcessor.java:15)
12-29 14:09:55.691: WARN/System.err(798): at
net.xeomax.FBRocket.Facebook.setStatus(Facebook.java:253)
12-29 14:09:55.691: WARN/System.err(798): at
net.xeomax.TestRocket.TestRocket.onLoginSuccess(TestRocket.java:49)
12-29 14:09:55.691: WARN/System.err(798): at
net.xeomax.FBRocket.LoginWindow$CustomWebViewClient.onPageFinished
(LoginWindow.java:73)
12-29 14:09:55.702: WARN/System.err(798): at
android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:222)
12-29 14:09:55.712: WARN/System.err(798): at
android.os.Handler.dispatchMessage(Handler.java:99)
12-29 14:09:55.712: WARN/System.err(798): at android.os.Looper.loop
(Looper.java:123)
12-29 14:09:55.722: WARN/System.err(798): at
android.app.ActivityThread.main(ActivityThread.java:3948)
12-29 14:09:55.722: WARN/System.err(798): at
java.lang.reflect.Method.invokeNative(Native Method)
12-29 14:09:55.722: WARN/System.err(798): at
java.lang.reflect.Method.invoke(Method.java:521)
12-29 14:09:55.722: WARN/System.err(798): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
12-29 14:09:55.722: WARN/System.err(798): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
12-29 14:09:55.731: WARN/System.err(798): at
dalvik.system.NativeStart.main(Native Method)
==
Does anyone know what problem which I'm meeting?
Please give an advice for this problem.
Thanks in advance,
NPAK






On Dec 16, 2:10 am, Ward Willats  wrote:
> A friend of mine uses the FB APIs on another platform and posted that the
> latest release of the FB SDK broke their logins. So perhaps it is something
> recent on the FB side.

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

2009-12-28 Thread Android Development
Should the possibility of handling real-time audio and video streams by the
application be a part of the roadmap for Android?

This feature can be incorporated as an extension to the existing Media
framework.

Why I request for this feature, because this is the most basic requirement
of any telephony application installed on Android that needs to put across a
simple voice/video call.

For now, I have managed a work-around for achieving this. But having an API
at the framework layer would have greatly simplified development.

Any feedback from the *Google team* on this feature request is appreciated.
I can open an issue if needed.

I am providing some practical applications that can be developed if this
feature is available to support the above feature request:

*1. **Customer Care Troubleshooting Application:*
*
*
The user can directly connect to a customer care representative and explain
their problem to the representative or even show the product under
consideration by simply pointing their mobile device towards the product.
This will significantly simplify and enhance the level of support the
customer gets for their product.

*2. Security/ Intelligence applications*:

Security agencies in a corporate/government setup can establish a video call
to a data center and stream live videos from their mobile handset cameras.

*3. Remote learning:*

Developing countries can use a remote learning application that uses a white
board coupled with audio and video to impart eduction to children in remote
areas.

*4. Mobile Advertising: *

Telecom operators currently provide Ringback tone applications to
subscribers. The ringback is network generated, and controlled by a CRBT
(Colored RingBack Tone) server. Telecom operators can offer their
subscribers extra pre-paid credit if they agree to watch multimedia
advertisements as a ringback every time an incoming call is received. These
Ads can be rendered by an application that resides locally on the device.

*5. Sports applications:*

Football and Baseball matches can be streamed to the device in case the user
happens to be on the move while the match is on. There will be no need for a
TV tuning chip on the device for achieving this.

I hope the feature request makes sense.

Best Regards..


On Tue, Dec 29, 2009 at 10:02 AM, hongki park
wrote:

> I think your request is not supported at the framework layer.
>
> under the framework media.
>
> 2009/12/29 Android Development 
>
>> Any thoughts friends?
>>
>> On 12/28/09, Android Development  wrote:
>> > Hello,
>> >
>> > Android provides a use-friendly API for playing and handling media
>> > (audio/video).
>> >
>> > However, I have the following requirements which i wish to realize with
>> > this
>> > framework :
>> >
>> > 1. My requirement is to have knowledge of the ports that the android
>> media
>> > framework opens and uses for sending/receiving media streams. I use this
>> > information for signaling on the Session Description Protocol (SDP) that
>> i
>> > add as a payload to SIP.
>> >
>> > Is it possible for me to get this information in the form of a RTP
>> session
>> > from the framework ? (ports and address combination).
>> >
>> > *Use Case for this requirement:*
>> >
>> > If I initiate a multimedia call towards a peer, I will need to open my
>> > audio
>> > and video ports and start streaming media once the signaling is complete
>> > and
>> > successful. For successful streaming, the remote end needs to have
>> > knowledge
>> > of the ports I have opened for media as the streams are bi-directional
>> and
>> > I
>> > will also need to receive media from the remote end.(sendrecv in SDP) .
>> > This
>> > is for the outgoing call.
>> >
>> > Similarly, for an incoming call, once the signaling succeeds, I will
>> need
>> > to
>> > receive audio/video streams from the remote end and play them on the
>> device
>> > (the remote end will send media to the ports that I had advertised in
>> the
>> > SDP payload offer).
>> >
>> > Thanks in advance
>> >
>>
>> --
>>
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 gr

[android-developers] Re: Tomcat httppost bufferedreader problem

2009-12-28 Thread Chander Pechetty
Use org.apache.http.impl.client.BasicResponseHandler if you just need
a String.
Also, you can use  org.apache.http.util.EntityUtils class to retrieve
the response in different forms or write your own ResponseHandler.

-Chander

On Dec 28, 10:33 pm, Maurice  wrote:
> Hi
>
> My (client)application connects to a Tomcat server through http post
> requests.
> My problem is that the application sometimes does not get the complete
> response.
> The last X bytes are missing.
> The length of a response is, however, below 1K (did not count or
> measure it).
>
> My application retrieves data from the Tomcat server at various
> moments in time. I also have a PC version of the application that has
> exactly the same code-base for this part. On the PC there is not a
> problem.
> Also, it does not happen all the time. I cannot pinpoint when it goes
> right and when wrong.
> It seems like a timing problem.
>
> I tried several things to solve the problem. This ranges from reading
> the result of the post two times to letting the thread sleep at
> various places in the code.
> None of the solutions are a silver bullets, although the problem seems
> less frequent.
>
> So maybe I'm doing something wrong.
>
> Did somebody have a similar problem?
> Should I post requests, or readout the response in a different way?
>
> My code is as follows:
>
> import org.apache.http.HttpEntity;
> import org.apache.http.HttpResponse;
> import org.apache.http.client.methods.HttpPost;
>
> HttpPost httpost = new HttpPost(aUrl);
> HttpResponse response = RL.getHttpClient().execute(httpost);
> HttpEntity entity = response.getEntity();
>
> if (entity != null) {
>    br = new BufferedReader(new InputStreamReader(entity.getContent
> ())) ;
>
> } else {
>   br = null ;
> }
>
> BufferedReader is read out by using the method readLine()
>
> Any help is appreciated.
>
> Regards,
>
> Maurice

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


[android-developers] Mobile Network Setting

2009-12-28 Thread pperotti
Hi Everyone,

I just want to ask you if you anyone knows how to change the Setting
available in: Settings->Wireless Settings->Mobile Network from code or
Setting: Settings->Wireless Settings->Mobile Network Settings->Network
operators->Select Automatically?

I had been unable to find a property that match this setting in the
Settings.System / Settings.Secure classes.

Is there any alternative way to "turn on/off" the MOBILE
connectivity ? The reason I need to solve this is to workaround the
bug occur during transitioning from WIFI to MOBILE that do not enable
CELL data automatically.

Thanks in advance,

Pablo

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


[android-developers] Crop a Picture after Using Camera to Take It

2009-12-28 Thread Wysie
Hi all, in the following code, I am able to get the photo editor to
come up after I take a picture, and am able to crop it. However, the
aspectX and aspectY does not seem to be in effect, as the aspect ratio
is not locked at all.

What I is that after taking a picture, the crop/editor comes up, with
a fixed aspect ratio of 1:1. Please help, thank you!

Code:

   private void doTakePhotoAction() {

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString());
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("outputX", 96);
intent.putExtra("outputY", 96);

try {
intent.putExtra("return-data", true);
startActivityForResult(intent, PICK_FROM_CAMERA);
} catch (ActivityNotFoundException e) {
//Do nothing for now
}
}

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


[android-developers] WebView issue

2009-12-28 Thread neha
Hi,

On a browser menu click I need to fetch URL from a file one by one,
load it in webview and dump its Render Tree in some file.

I am able to do the same for a single URL but when file has multiple
URLs then only last URL is rendered completely.

Is this the looping problem?
Could anyone help me out of this?

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


[android-developers] AudioRecord + Android 1.5 = Error

2009-12-28 Thread Hunter Peress
Hi, I'm using the AudioRecord to capture raw PCM sound data. On both
1.5 devices (Motorola Cliq, and Droid Eris) I get:

AudioRecord(28661): Error obtaining an audio buffer, giving up.I/
AudioHardwareMSM72XX( 2224): AudioHardware PCM record is going to
standby.

Any ideas why?

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

2009-12-28 Thread hongki park
I think your request is not supported at the framework layer.

under the framework media.

2009/12/29 Android Development 

> Any thoughts friends?
>
> On 12/28/09, Android Development  wrote:
> > Hello,
> >
> > Android provides a use-friendly API for playing and handling media
> > (audio/video).
> >
> > However, I have the following requirements which i wish to realize with
> > this
> > framework :
> >
> > 1. My requirement is to have knowledge of the ports that the android
> media
> > framework opens and uses for sending/receiving media streams. I use this
> > information for signaling on the Session Description Protocol (SDP) that
> i
> > add as a payload to SIP.
> >
> > Is it possible for me to get this information in the form of a RTP
> session
> > from the framework ? (ports and address combination).
> >
> > *Use Case for this requirement:*
> >
> > If I initiate a multimedia call towards a peer, I will need to open my
> > audio
> > and video ports and start streaming media once the signaling is complete
> > and
> > successful. For successful streaming, the remote end needs to have
> > knowledge
> > of the ports I have opened for media as the streams are bi-directional
> and
> > I
> > will also need to receive media from the remote end.(sendrecv in SDP) .
> > This
> > is for the outgoing call.
> >
> > Similarly, for an incoming call, once the signaling succeeds, I will need
> > to
> > receive audio/video streams from the remote end and play them on the
> device
> > (the remote end will send media to the ports that I had advertised in the
> > SDP payload offer).
> >
> > Thanks in advance
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2009-12-28 Thread Android Development
Any thoughts friends?

On 12/28/09, Android Development  wrote:
> Hello,
>
> Android provides a use-friendly API for playing and handling media
> (audio/video).
>
> However, I have the following requirements which i wish to realize with
> this
> framework :
>
> 1. My requirement is to have knowledge of the ports that the android media
> framework opens and uses for sending/receiving media streams. I use this
> information for signaling on the Session Description Protocol (SDP) that i
> add as a payload to SIP.
>
> Is it possible for me to get this information in the form of a RTP session
> from the framework ? (ports and address combination).
>
> *Use Case for this requirement:*
>
> If I initiate a multimedia call towards a peer, I will need to open my
> audio
> and video ports and start streaming media once the signaling is complete
> and
> successful. For successful streaming, the remote end needs to have
> knowledge
> of the ports I have opened for media as the streams are bi-directional and
> I
> will also need to receive media from the remote end.(sendrecv in SDP) .
> This
> is for the outgoing call.
>
> Similarly, for an incoming call, once the signaling succeeds, I will need
> to
> receive audio/video streams from the remote end and play them on the device
> (the remote end will send media to the ports that I had advertised in the
> SDP payload offer).
>
> Thanks in advance
>

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


Re: [android-developers] view lifecycle

2009-12-28 Thread Romain Guy
Yes :)

On Mon, Dec 28, 2009 at 2:34 PM, bnovc  wrote:
> Is onDetachedFromWindow guaranteed to be called on a View no matter
> what (unless the process aborts). i.e. Is it safe to register
> observers in onAttachedToWindow and un-register them in
> onDetachedFromWindow?
>
> If not, what is the preferred path?
>
> 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
>



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

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

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


[android-developers] Any way to uninstall application with "persistent=true"?

2009-12-28 Thread Eddie
Any way to do so?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do you change EditText's popup list text colour?

2009-12-28 Thread Nilz
But you can change the panel background and title background through
styles and themes on alertDialogs.

When you change the alertDialogStyle to something that's black, the
text isn't visible anymore. So I want to change it to white, but can't
figure out how.

On 29 Dec, 00:40, Mark Murphy  wrote:
> Nilz wrote:
> > Does anyone know how to change the colour of the text within the popup
> > list that appears when you longclick an EditText view? In my app when
> > I perform a long click on the EditText view I get a popup menu dialog
> > with Copy, Paste, Input Method appear, and I can't figure out how to
> > change the default text colour in this dialog.
>
> I doubt you can. That's not your dialog -- it's the system's.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 In Print!

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


[android-developers] Re: Http Authentication

2009-12-28 Thread Brion Emde
This looked like a promising approach for OAUTH. I did succeed in
getting the library installed and linked to, then decided on another
approach that doesn't use full OAUTH.

http://brainflush.wordpress.com/2009/05/03/introducing-signpost-easy-oauth-for-java-and-apache-httpcomponents-android-too/


On Dec 28, 3:20 am, Rohit Roy  wrote:
> How to do Http Authentication in Android?
> I am checking out class org.apache.http.auth but unable to connect and
> post credentials data.
> I have learned how do http get and post which is working fine.
> I need to learn how to pass credentials using HttpAuthentication.
>
> 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: AsyncTask & Queries

2009-12-28 Thread Scott
In this case you need an AsyncQueryHandler instead of AsyncTask.
Give the SimpleCursorAdapter a null cursor and set autoRequry to
false. Query database with AsyncQueryHandler.startQuery() and set the
cursor to the adapter when query completed.

--Scott
On Dec 27, 3:23 pm, Realm X  wrote:
> Hi Android Devs,
>
> Can anyone point me to a good example where a AsyncTask queries a
> local SQLite database and then updates the UI successfully. I have a
> database which I query using doInBackground... create a new custom
> SimpleCursorAdapter (overriding onViewBind), return the adapter
> (SimpleCursorAdapter), then in postExecute() create ListView adapter
> which is set to the the SimpleCursorAdapter, that was returned, then I
> set the listview adapter using SetAdapter(adapter);...
>
> For some reason I throw an exception on fillWindow.java:200
>
> Can anyone help me with the matter.
>
> Thanks!
> Longshore

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

2009-12-28 Thread James Wang
we wonder when this **may** will happen?

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


[android-developers] JetPlayer

2009-12-28 Thread Business Talk
I have created a jet file, with a controller event in it, using the
JetCreator and defined a OnJetListener. And although other methods on
the listener are called, the onJetEvent method is not. Am I missing
something here?

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


Re: [android-developers] How do you change EditText's popup list text colour?

2009-12-28 Thread Mark Murphy
Nilz wrote:
> Does anyone know how to change the colour of the text within the popup
> list that appears when you longclick an EditText view? In my app when
> I perform a long click on the EditText view I get a popup menu dialog
> with Copy, Paste, Input Method appear, and I can't figure out how to
> change the default text colour in this dialog.

I doubt you can. That's not your dialog -- it's the system's.

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

_Android Programming Tutorials_ Version 1.0 In Print!

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

2009-12-28 Thread theSmith
I'm glad you saw those flaws with my idea, I have finish()'ed
activities from separate threads before, this is not an issue so long
as you have a reference to the activity in the other thread.  And yes
you would need to keep track of every activity, which is why your
original proposal is not such a bad idea.

Consider this example:

//here we are launching a new activity

Intent i = new Intent(this, nextActivity.class);
startActivityForResult(i, START_SUBMIT);

//this activity will return a result code
//which is handled here in the class that started the new activity
//request is the int that called the new activity (START_SUBMIT)
//result is the code the activity returned when it finished
onActivityResult(int requestCode, int resultCode, Intent intent)

So if your application determines that the service is no longer
running it would set is result code to some int you have defined, say
INVALID_STATE and finishes itself.

Then the calling activity would call the onActivityResult with both
the code that was started (allowing you to know which activity you
came from) and the result code (in this case INVALID_STATE).  From
here this can continue until you reach the bottom of the stack and you
can start the first activity over.


On Dec 28, 12:35 pm, André Oriani  wrote:
> There is some difficulties with you proposal.
> -Service and UI are running on different process.
> -I will have to keep track of activities ( they will have to put
> themselves in some data structure) .
> - They are killed ( SIGKILL) , they won't have time to save anything
> neither to excute onDestroy.  The problem will happen when process are
> launched again ( so no memory abou what happened before, just the
> stack of activity because framework does the job)
>
> On Dec 28, 2:56 pm, theSmith  wrote:
>
> > If you want to, you can override the onDestroy() method of the service
> > and have it call finish() on each of you activities in the stack.
> > This should result in the behavior you are looking for I believe,
> > because the system would be forced to create a new instance of your
> > application, thus starting a new service with it.
>
> > -theSmith
>
> > On Dec 28, 10:35 am, André Oriani  wrote:
>
> > > Hi all,
>
> > > Differently from most application, the state of my application is not
> > > controlled by its stack of activities but by the state of a background
> > > service.
>
> > > Here is my problem. Suppose I have a task running  with  a non empty
> > > stack of activities. The top activity is paused on background and not
> > > visible.  Then for some reason the  process that host both the service
> > > and top activity is killed.  When I somehow return to my app
> > > application ( by pressing back key, resumimg from recent apps menu),
> > > the framework launches  the application again with the activity that
> > > was on the top of the activity stack  before process got killed.
>
> > > Okay, you would say that it is the expected behavior. But because my
> > > service is no longer alive , the top activity is no longer valid ( as
> > > the other activities which remain  on stack) . I would like to clear
> > > the whole activity stack  and launch another activity to explain the
> > > current situation to user.
>
> > > I could put the follow code on every activity "if(not valid state)
> > > finish() and launch a new activity with clear top flag  enabled " but
> > > I don't think it is clever.  Is there a better way to control which
> > > activity will be launched after application is killed ?
>
> > > Tks,
> > > André

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


[android-developers] Re: Getting Data off the Net

2009-12-28 Thread Brion Emde
Here's an extract of an implementation that encapsulates httpPost()
into a ContentProvider insert() function. In this case the server is
expecting the json object to be posted to be an http entity and the
server returns the new object in json format. The getId function
decodes the json block that's received to get the id. The
buildJSONStringEntity is just converting the ContentValues into a json
object.

@Override
public Uri insert(Uri uri, ContentValues initialValues) {
// Validate the requested uri
Uri serverUrl = GoBeeringProvider.serverUri(uri);
Uri respUri = null;
HttpPost httpPost = new HttpPost(serverUrl.toString());
String responseBody;
long id;

try {
switch (sUriMatcher.match(uri)) {
// Here is where things get personal
case BREWERIES:

httpPost.setEntity(buildJSONStringEntity(initialValues,
BREWERY_KEY));
responseBody = mClient.execute(httpPost, new 
BasicResponseHandler
(), mHttpContext);
id = getId(responseBody, BREWERY_KEY, 
sBreweryProjectionMap.get
(Breweries.Brewery._ID));
respUri = 
uri.buildUpon().appendPath(String.valueOf(id)).build();
break;
default:
throw new IllegalArgumentException("Unknown URI " + uri);
}
} catch (HttpResponseException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
return respUri;
}

On Dec 28, 2:35 pm, Skid  wrote:
> Thanks for the help, I've got it working now, both pulling back data
> from a database using JSON and putting data on the server using
> HttpGet. I've also found out I can still use session type
> authorisation by keeping a HttpClient open rather then creating a new
> one for each request (which the example I was working off did). That
> will stop the need of submitting auth data with each request which was
> something I was a little concerned about doing.
> Also does anyone have a small example of something that uses HttpPost
> rather then HttpGet to submit data, otherwise I'll post the code I
> have so far and I would appreciate any advice about better ways of
> doing it, don't worry to much about the blank exception catching,
> they're more there for my reference for where they should be when I
> decide how to handle them.
>
> package net.skid_inc.webprototype;
>
> import android.os.Handler;
> import android.util.Log;
> import android.telephony.TelephonyManager;
>
> import java.io.BufferedReader;
> import java.io.InputStream;
> import java.io.InputStreamReader;
>
> import java.util.Timer;
> import java.util.TimerTask;
>
> import org.apache.http.HttpResponse;
> import org.apache.http.client.HttpClient;
> import org.apache.http.client.methods.HttpGet;
> import org.apache.http.impl.client.DefaultHttpClient;
> import org.json.JSONArray;
>
> /**
>  *
>  * @author Skid
>  */
> public class NetComms
> {
>         private static final String LOGTAG = "ServiceLog";
>
>         // Delay between start of the timer and the first time it runs the
> task
>         private static final long TIMERDELAY = 0;
>         // Inverval between each time the task is run
>         private static final long TIMERPERIOD = 6;
>
>         // Link to the activity that called this class
>         private final MainActivity parent;
>         // Stores the phones device id
>         private String imei;
>         private String android_id;
>
>         // HttpClient is created now to test if it can both hold a session ID
> and keep it
>         public HttpClient client = new DefaultHttpClient();
>
>         // Timer for regualer updates
>         private Timer updatetimer;
>         // Task to run when timer is tiggered
>         private UpdateTask updatetask;
>
>         // Result of a manual update
>         private String update;
>         // Allows the getUpdate thread to return the data it retrives
>         private final Handler updateHandler;
>         // Called after getUpdate has finished and sends the data back to the
> activity
>         private final Runnable updateRunnable = new Runnable ()
>         {
>                 public void run()
>                 {
>                         String output = "";
>                         try
>                         {
>                                 JSONArray json = new JSONArray(update);
>                                 for (int t = 0; t < json.length(); t++)
>                                 {
>                                         JSONArray json2 = 
> json

[android-developers] How do you change EditText's popup list text colour?

2009-12-28 Thread Nilz
Hi,

Does anyone know how to change the colour of the text within the popup
list that appears when you longclick an EditText view? In my app when
I perform a long click on the EditText view I get a popup menu dialog
with Copy, Paste, Input Method appear, and I can't figure out how to
change the default text colour in this dialog.

Cheers,
Nilz.

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

2009-12-28 Thread schwiz
I don't believe the dev phones have root either, only the ability to
flash a new image onto the phone, but like smith said its relatively
straight forward to root your g1 and give it the ability to flash your
custom roms.  do a google search for XDA g1 root for instructions,
also XDA is a great place for you to hang out if you are wanting to
build your own android roms.

On Dec 28, 6:17 pm, theSmith  wrote:
> None that I've heard of, but you can always buy a cheap G1 and root it
> if you want to. (root access is the only advantage of having a dev
> phone correct?)
>
> -theSmith
>
> On Dec 28, 10:51 am, QAH  wrote:
>
>
>
> > Hello everyone! I am a highschool student and I really love
> > programming. I would love to play around with the kernel code and test
> > it on a dev phone. Do students get any discounts on them like some
> > development products have huge discounts for students? Please let me
> > know.
>
> > 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: Devphone discount?

2009-12-28 Thread theSmith
None that I've heard of, but you can always buy a cheap G1 and root it
if you want to. (root access is the only advantage of having a dev
phone correct?)

-theSmith

On Dec 28, 10:51 am, QAH  wrote:
> Hello everyone! I am a highschool student and I really love
> programming. I would love to play around with the kernel code and test
> it on a dev phone. Do students get any discounts on them like some
> development products have huge discounts for students? Please let me
> know.
>
> 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: Droid 2.1?

2009-12-28 Thread pcm2a
They ported the Nexus 2.1 build to the droid weeks ago over on
alldroid.

On Dec 28, 5:25 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> I've seen Nexus already, today was the first time I saw Droid with
> 2.1. Maybe a test device?
>
> -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


[android-developers] Where to find this graphic? com.android.internal.R.id.keyboardView

2009-12-28 Thread pcm2a
I am looking for several graphics from Android 2.0 source but I am
unsure where online to locate them.

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: Droid 2.1?

2009-12-28 Thread Maps.Huge.Info (Maps API Guru)
I've seen Nexus already, today was the first time I saw Droid with
2.1. Maybe a test device?

-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


[android-developers] Altering the alpha level of MapView

2009-12-28 Thread Aniruddh Bajirao
How do you alter the alpha level of MapView to make it translucent.?

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

[android-developers] Re: custom keyboard

2009-12-28 Thread schwiz
Ok that was the problem thanks.  This leaves me with two questions,
how do I enable the keyboard without making the user do it, and how do
I make it the default keyboard for my app.  Thanks for the reply!

On Dec 28, 10:06 am, Dai Hiro  wrote:
> Hi,
>
> Did you activate it in Locale & Text Settings ?
>
> Kwaku
>
>
>
> On Sun, Dec 27, 2009 at 11:53 PM, schwiz  wrote:
> > I am wanting to add a custom keyboard for my app, I was taking a look
> > at the softkeyboard example on the included sample code in the SDK.
> > When I install it in the emulator it isn't showing up though.  I try
> > to access it by longpressing an input box and then clicking select
> > input when the context menu pops up.  However, the latin keyboard made
> > in the example doesn't show up as one of the options.  Am I missing
> > something?  Anyone have advice or know of another example I can look
> > at?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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] view lifecycle

2009-12-28 Thread bnovc
Is onDetachedFromWindow guaranteed to be called on a View no matter
what (unless the process aborts). i.e. Is it safe to register
observers in onAttachedToWindow and un-register them in
onDetachedFromWindow?

If not, what is the preferred path?

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: Http Authentication

2009-12-28 Thread Skid
I was looking up the org.apache.http package earlier and I found this
page that might be useful,
http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/httpclient/src/examples/org/apache/http/examples/client/ClientAuthentication.java

On Dec 28, 10:20 am, Rohit Roy  wrote:
> How to do Http Authentication in Android?
> I am checking out class org.apache.http.auth but unable to connect and
> post credentials data.
> I have learned how do http get and post which is working fine.
> I need to learn how to pass credentials using HttpAuthentication.
>
> Thanks

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


Re: [android-developers] Re: Debugging on mobile

2009-12-28 Thread Sébastien Canart
Did you have set your application as debuggable ?
In the AndroidManifest.xml, for the application :
android:debuggable="true"

On Sun, Dec 27, 2009 at 6:44 PM, LeGeNDuS  wrote:

> Yes I have done it, but it doesn't work, it only stops on the
> breakpoints when I use the emulator, but in the device, it seems like
> it would be running (run...).
>
> On 24 dic, 22:55, Frank Weiss  wrote:
> > Have you set a breakpoint in your code? Double-click in the left margin
> of
> > the code at the line you want to set a breakpoint.
> >
> > On Dec 24, 2009 12:44 PM, "José Évora"  wrote:
> >
> > Hello!
> >
> > I have tried to debug in my device (HTC Hero) that has android 1.5 (I
> > think, and even I don't know how to update) and well...I have right
> > checked the debugging option on the mobile adjustments of apps. So
> > when I click on run, it goes fine... but when I click on debug (all of
> > this in eclipse) it does the same actions that it does in the run
> > option. So I cant see it step by step. Any idea of what happens?.
> > Thanks 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 cr...@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
>



-- 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBnxJE6JjEsxKwDOsRAnnqAJ9ajbJqfPUWIITbSvW3w4weax7uOACeKC77
cK2Dj4jpYma4JUxKGRxEvmY=
=un9J
-END PGP SIGNATURE-

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

[android-developers] DatagramSocket.receive() sometimes blocks for too long

2009-12-28 Thread Omer Gilad
Hello,
I have a thread that constantly polls a UDP connection and posts the
received data to another thread. It uses a connected DatagramSocket,
reads a packet (which is always the same side), gets the data and
posts it.

Code looks like:

protected void work() {
   byte[] buffer = new byte[SOME_BUFFER_SIZE];

   // Read UDP packet
   DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
   long startTime = System.currentTimeMillis();
   socket.receive(packet);
   long elapsed = System.currentTimeMillis() - startTime;
   Log.out.d("UDPReader: time for socket read: " + elapsed);

   // Post the data

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

2009-12-28 Thread v4lkyrie
U found a solution? I got the same issue too. As i can see there is a
problem on kernel launch:

5.837158] AKM8976A compass driver: init
<3>[5.837646] msm_i2c msm_i2c.0: error, status c8
<3>[5.837768] msm_i2c msm_i2c.0: Error during data xfer (-5)
<3>[5.837829] AKM8976 AKI2C_TxData: transfer error
<4>[5.837921] akm8976: probe of 0-001c failed with error -5

Drivers are not created on dev folder and compass software doesn't
work.

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

2009-12-28 Thread youssef maher
Dear ALL :
i face this problem and i dont know how solve it if any body can help really
thanks  to him
I try to sending Mutiparttext Sms or text sms not dataSMS on port but i fail
any body know how do that .

On Sat, Dec 26, 2009 at 8:12 AM, <
android-developers+nore...@googlegroups.com
> wrote:

>   Today's Topic Summary
>
> Group: http://groups.google.com/group/android-developers/topics
>
>- Accessing character data (CDATA) of XML 
> element<#125c99d74e83bafa_group_thread_0>[5 Updates]
>- A question regarding AsyncTasks <#125c99d74e83bafa_group_thread_1> [1
>Update]
>- Is there any way to let the app know whenever any media file is
>inserted into the sdcard? <#125c99d74e83bafa_group_thread_2> [1 Update]
>- problem in AutoCompleteTextView <#125c99d74e83bafa_group_thread_3> [1
>Update]
>- Send Manual Broadcast <#125c99d74e83bafa_group_thread_4> [1 Update]
>- How to check available RAM storage inside an 
> application?<#125c99d74e83bafa_group_thread_5>[1 Update]
>- ProgressDialog during location tasks either won't show or force
>closes - I have tried everything! <#125c99d74e83bafa_group_thread_6> [2
>Updates]
>- V4L2:"/dev/video0" is not generated when USB Camera is 
> connected<#125c99d74e83bafa_group_thread_7>[1 Update]
>- RuntimeException without any linenumber in my code. What could be the
>error? What can I do? <#125c99d74e83bafa_group_thread_8> [1 Update]
>- Which one is more efficient, ImageView.setImageBitmap(bitmap) or
>ImageView.setImageDrawable(drawable)?<#125c99d74e83bafa_group_thread_9>[1 
> Update]
>- AudioTrack stop/release <#125c99d74e83bafa_group_thread_10> [1
>Update]
>- Translate Animation from Left To Right Infinite 
> Times<#125c99d74e83bafa_group_thread_11>[1 Update]
>- draw bitmap fastest mode <#125c99d74e83bafa_group_thread_12> [1
>Update]
>- Multitouch code examples? <#125c99d74e83bafa_group_thread_13> [2
>Updates]
>
>   Topic: Accessing character data (CDATA) of XML 
> element
>
>estivenrpo  Dec 25 01:17PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>Hi
>
>I'm try to parse character data (CDATA) whit SAX Parser.
>
>I support in this code for that:
>
>
>
> http://www.java2s.com/Code/Java/XML/AccessingcharacterdataCDATAofXMLelement.htm
>
> more...
>
>
>jotobjects  Dec 25 05:42PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>That error says that Android does not support a validating SAX parser
>(does not validate documents with DTD). So you have to remove the
>"spf.setValidating(true); " statement.
>
>
> more...
>
>
>estivenrpo  Dec 25 09:14PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>Ok, perfect, thanks for the answer, but this option is needed to parse
>character data (CDATA), or not?
>
>I have an application and it use a RSS in spanish, so when the program
>read a no standard 
> more...
>
>
>Frank Weiss  Dec 25 09:34PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>Could you be more specific about how the program crashes? I can give
>two
>possible causes for you to investigate.
>
>Is the document you are trying to parse encoded in Latin-1 (same as
>
> more...
>
>
>jotobjects  Dec 25 10:00PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>> Ok, perfect, thanks for the answer, but this option is needed to
>parse
>> character data (CDATA), or not?
>
>Probably not. Validating parser should have nothing to do with reading
>characters
>
>
> more...
>
>   Topic: A question regarding 
> AsyncTasks
>
>Android Development  Dec 26 11:21AM +0530 
> ^<#125c99d74e83bafa_digest_top>
>
>"instance" here is the magic word.
>
>
> more...
>
>   Topic: Is there any way to let the app know whenever any media file is
> inserted into the 
> sdcard?
>
>manoj  Dec 25 09:51PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>Hi all,
>
>is there any way to let my app know whenever a media file is inserted
>or deleted from the sdcard.
>
>Thanks,
>Manoj.
>
> more...
>
>   Topic: problem in 
> AutoCompleteTextView
>
>Nemat  Dec 25 09:18PM -0800 
> ^<#125c99d74e83bafa_digest_top>
>
>Hi Friends
>
>  

[android-developers] Windows 7 Htc Sync

2009-12-28 Thread Willo
Im using 32bit windows 7 and its driving me insane, the drivers
install automatically (i have no idea how too stop them) and when i
try too update them, windows says it already has a newer version. im
trying too re-root my phone so i can install a rom, is there possibly
a way or re-rooting without the htc sync?

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

2009-12-28 Thread Ron Pinkas

> On the other hand, some parts of the phone (like camera) are not open
> source and so for that, HTC or the hardware manufacturer has to
> release a binary for upgrades.
>
> So yes you can build current code and flash it to your handset but
> proprietary stuff won't work.

This begs the question why such support isn't implemented by means of
drivers, which could be easily installed onto newer version od the O/
S. Such solution is the defacto standard in curennt day O/Ss.

IAE, I hope to quickly discover detailed explnataions of how to build
or download new versions, AND load it onto the ADP2.

> *Note, knowing that I gave up building so my understanding may be off
> - but I do think the repository is getting closer and closer to
> supporting building a new version for ADP2.

I must admit I'm confused and even disappointed, to see official
announcements of 2.0 and 2.0.1, and yet no clear answers to what I'm
convinced are simple questions.

Ron Pinkas

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


[android-developers] Blocking on a Socket read operation while in sleep mode

2009-12-28 Thread Omer Gilad
I have code that runs in the background and holds a connected Socket
and it's InputStream.
It calls read() infinitely until something is received, then continues
to parse. Socket timeout is 0 of course.

I am interested in what would happen when the device goes to sleep? Is
the CPU off? Will this socket be responsive in this case (Say, my
server sends some notification)?

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] Http Authentication

2009-12-28 Thread Rohit Roy
How to do Http Authentication in Android?
I am checking out class org.apache.http.auth but unable to connect and
post credentials data.
I have learned how do http get and post which is working fine.
I need to learn how to pass credentials using HttpAuthentication.

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] Widget does not render on wvga854 ?

2009-12-28 Thread Guy
Hi All,
I've written a simple widget application based on the wikitionary
code.

When run on an wvga854 emulator, the widget view does *not* update
after a call to:

  // Build the widget update for today
  RemoteViews updateViews = buildUpdate(this);

  // Push update for this widget to the home screen
  ComponentName thisWidget = new ComponentName(this,
HebCalWidget.class);
  AppWidgetManager manager = AppWidgetManager.getInstance(this);
  manager.updateAppWidget(thisWidget, updateViews);

The code seems to be executed (i've checked through the debugger), and
no exceptions are thrown,
still, the AppWidget view does not seem to be updated.


Any ideas?

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


[android-developers] Devphone discount?

2009-12-28 Thread QAH
Hello everyone! I am a highschool student and I really love
programming. I would love to play around with the kernel code and test
it on a dev phone. Do students get any discounts on them like some
development products have huge discounts for students? Please let me
know.

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] Orientation Change effect on Spinner control

2009-12-28 Thread Arif
I was trying the API Demos that come along with Android SDK v1.5
If you select an item in a spinner widget and change the orientation
of the phone twice the selection goes.

I am having similar problem in my app, I just checked the Demo app and
the behaviour appears to be same. When you change the orientation say
from Portrait to Landscape the text you selected is there, do it once
more and the first item in the list appears as selected option.

Is it a bug or is it that we explicitly need to maintain state with a
spinner control?

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


[android-developers] Processing MMS Messages

2009-12-28 Thread Diego
Hi,
when processing SMS messages, class SmsMessage is used to get all the
information related to the received message.
What is the class to be used in case of MMS messages?

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] DatagramSocket.receive() sometimes blocks for too long

2009-12-28 Thread Omer Gilad
Hello,
I have a thread that constantly polls a UDP connection and posts the
received data to another thread. It uses a connected DatagramSocket,
reads a packet (which is always the same side), gets the data and
posts it to a message queue (not the android one, my implementation).
The problem happens mainly over 3G connection, not wifi.

Code looks like:

protected void work() {
   byte[] buffer = new byte[SOME_BUFFER_SIZE];

   // Read UDP packet
   DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
   long startTime = System.currentTimeMillis();
   socket.receive(packet);
   long elapsed = System.currentTimeMillis() - startTime;
   Log.out.d("UDPReader: time for socket read: " + elapsed);

   // Post the data
   messageQueue.post(packet.getData());
}

My server side sends the UDP packets at a constant rate (About 80
millis) and I expect that rate more or less for streaming purposes.
Problem is: in the beginning all is fine (log print shows a good
interval - around 80ms), then there a huge gap (about half a second),
then some packets arrive with no interval at all (like they were
buffered somewhere), then everything gets normal for the rest of the
operation.
So the effect for me is having a glitch in the beginning of the
stream, and the everything is back to normal infinitely.

I verified that my reader thread isn't blocking anywhere else, and
that the socket read elapsed time really covers just the read itself,
so I get reliable log prints (as seen in the code). I also used
wireshark in the server side to verify constant packet rate.
So the 2 left options are:
1. Network issue - but that would happen for the whole duration, not
just in the beginning, right? It always glitches like mad in the
start, then everything is normal.
2. Platform issue - is there anything about DatagramSocket
implementation on Android that might cause this? It seems like there's
an initial capacity for buffering and then it's increased after that
first glitch and it doesn't happen anymore...

I also checked: 1. CPU usage during the glitch and after (using
traceview), nothing unusual. 2. DatagramSocket receive buffer size -
it seems to default to 10+ bytes which is far more than my packet
size.

I would appreciate any help =)

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


[android-developers] Re: Getting Data off the Net

2009-12-28 Thread Skid
Thanks for the help, I've got it working now, both pulling back data
from a database using JSON and putting data on the server using
HttpGet. I've also found out I can still use session type
authorisation by keeping a HttpClient open rather then creating a new
one for each request (which the example I was working off did). That
will stop the need of submitting auth data with each request which was
something I was a little concerned about doing.
Also does anyone have a small example of something that uses HttpPost
rather then HttpGet to submit data, otherwise I'll post the code I
have so far and I would appreciate any advice about better ways of
doing it, don't worry to much about the blank exception catching,
they're more there for my reference for where they should be when I
decide how to handle them.

package net.skid_inc.webprototype;

import android.os.Handler;
import android.util.Log;
import android.telephony.TelephonyManager;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

import java.util.Timer;
import java.util.TimerTask;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;

/**
 *
 * @author Skid
 */
public class NetComms
{
private static final String LOGTAG = "ServiceLog";

// Delay between start of the timer and the first time it runs the
task
private static final long TIMERDELAY = 0;
// Inverval between each time the task is run
private static final long TIMERPERIOD = 6;

// Link to the activity that called this class
private final MainActivity parent;
// Stores the phones device id
private String imei;
private String android_id;

// HttpClient is created now to test if it can both hold a session ID
and keep it
public HttpClient client = new DefaultHttpClient();

// Timer for regualer updates
private Timer updatetimer;
// Task to run when timer is tiggered
private UpdateTask updatetask;

// Result of a manual update
private String update;
// Allows the getUpdate thread to return the data it retrives
private final Handler updateHandler;
// Called after getUpdate has finished and sends the data back to the
activity
private final Runnable updateRunnable = new Runnable ()
{
public void run()
{
String output = "";
try
{
JSONArray json = new JSONArray(update);
for (int t = 0; t < json.length(); t++)
{
JSONArray json2 = json.getJSONArray(t);
for (int tt = 0; tt < json2.length(); 
tt++)
{
if (tt != json2.length() - 1)
{
output += 
json2.getString(tt) + ", ";
}
else
{
output += 
json2.getString(tt);
}
}
output += "\n";
}
}
catch (Exception ex)
{
}
finally
{
parent.content.setText(output);
}
}
};

/**
 * Creates a new Net Communications class and links it to the
MainActivity
 * @param parent MainActivity that created this instance.
 */
public NetComms (MainActivity parent)
{
this.parent = parent;
Log.i(LOGTAG, "Created");
TelephonyManager mTelephonyMgr = (TelephonyManager)
parent.getSystemService(MainActivity.TELEPHONY_SERVICE);
imei = mTelephonyMgr.getDeviceId();
android_id = android.provider.Settings.System.getString
(parent.getContentResolver(),
android.provider.Settings.System.ANDROID_ID);

updatetimer = new Timer();
updatetask = new UpdateTask();

update = "";
updateHandler = new Handler();
}

/**
 * Starts the Update Task with the preset delays
 */
public void startUpdater()
{
Log.i(LOGTAG, "Started");
updatetimer

Re: [android-developers] Re: Droid 2.1?

2009-12-28 Thread Abdul Mateen
Exactly , My application also sees 2.1. I can confirm it with Flurry stats
also...

On Mon, Dec 28, 2009 at 2:25 PM, theSmith  wrote:

> Not to burst your bubble, but my apps have seen the Google Nexus One
> and 2.1 for about a month now (found them looking through my Flurry
> stats).
>
> As for the Droid build part, well I guess we we're all expecting it to
> come eventually.  Any one heard of an official release date?
>
> On Dec 28, 12:48 pm, "Maps.Huge.Info (Maps API Guru)"
>  wrote:
> > I saw this as an agent today:
> >
> > Mozilla/5.0 (Linux; U; Android 2.1; en-us; Droid Build/ERD72)
> > AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/
> > 530.17
> >
> > -John Coryat
> >
> > "Radar Now!"
> >
> > "What Zip Code?"
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] ListActivity and headers giving me an odd side effect

2009-12-28 Thread Jason Mallet-Prevost
Yep, that did the trick!  Thanks!

On Mon, Dec 28, 2009 at 3:02 PM, Mark Murphy wrote:

> JasonMP wrote:
> > Hello,
> >
> > I'm getting some odd side effects when I set a header to my
> > ListActivities.  The ListActivity actually allows you to scroll up
> > "behind" the header and click...which sends my app into a fit of
> > errors b/c my Lists are connected to a Cursor and selecting behind the
> > header returns a value of -1.  Ive noticed this doesnt happen to any
> > of my Lists that dont have headers.  Any ideas what would cause this/
> > how to fix it?
>
> If you're referring to addHeaderView(), try using the version that takes
> the boolean 3rd parameter, and pass in false to make it not selectable.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 In Print!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Host is unresolved errors

2009-12-28 Thread Wayne Wenthin
These are what is being reported to me by Flurry.   I have had a few
connection resets but those have calmed down and the Host is unresolved are
on the rise.   I'll probably do what I'm thinking about doing for just me
while I hash this out.  I was just wondering if others have seen this in any
stats they get back.

On Mon, Dec 28, 2009 at 12:08 PM, bnovc  wrote:

> Are you sure their connection is not dropping?
>
> If you're able to reproduce the problem, maybe you should look at /etc/
> resolv.conf and ifconfig when it occurs.
>
> On Dec 28, 12:52 pm, Wayne Wenthin  wrote:
> > Flurry is starting to report more and more of these.   I'm wondering if
> > anyone else has seen a rise in this type of error.   I'm thinking of
> > switching to straight IP address since I'm running on a different port it
> > redirects properly but it is still kind of disconcerting that my domain
> is
> > not resolving properly even after they are logged in and playing.
> >
> > Any thoughts?
> >
> > --
> > Writing code is one of few things
> > that teaches me I don't know everything.
> >
> > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Host is unresolved errors

2009-12-28 Thread bnovc
Are you sure their connection is not dropping?

If you're able to reproduce the problem, maybe you should look at /etc/
resolv.conf and ifconfig when it occurs.

On Dec 28, 12:52 pm, Wayne Wenthin  wrote:
> Flurry is starting to report more and more of these.   I'm wondering if
> anyone else has seen a rise in this type of error.   I'm thinking of
> switching to straight IP address since I'm running on a different port it
> redirects properly but it is still kind of disconcerting that my domain is
> not resolving properly even after they are logged in and playing.
>
> Any thoughts?
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums

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


Re: [android-developers] ListActivity and headers giving me an odd side effect

2009-12-28 Thread Mark Murphy
JasonMP wrote:
> Hello,
> 
> I'm getting some odd side effects when I set a header to my
> ListActivities.  The ListActivity actually allows you to scroll up
> "behind" the header and click...which sends my app into a fit of
> errors b/c my Lists are connected to a Cursor and selecting behind the
> header returns a value of -1.  Ive noticed this doesnt happen to any
> of my Lists that dont have headers.  Any ideas what would cause this/
> how to fix it?

If you're referring to addHeaderView(), try using the version that takes
the boolean 3rd parameter, and pass in false to make it not selectable.

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

_Android Programming Tutorials_ Version 1.0 In Print!

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


[android-developers] ListActivity and headers giving me an odd side effect

2009-12-28 Thread JasonMP
Hello,

I'm getting some odd side effects when I set a header to my
ListActivities.  The ListActivity actually allows you to scroll up
"behind" the header and click...which sends my app into a fit of
errors b/c my Lists are connected to a Cursor and selecting behind the
header returns a value of -1.  Ive noticed this doesnt happen to any
of my Lists that dont have headers.  Any ideas what would cause this/
how to fix it?

Thanks, Jason.

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-28 Thread chris harper
Mark, Mr theSmith?

Thank you for your input. You pointed me in the right direction.

I wrote that guy that did that article but he is out of office until Jan
4th. I would like to compare notes with him and get my code working on my
HTC HERO to run my .swf file.

If I get mine working I'll post back and let you guys know as I believe
Flash will start to become a bigger issue in 2010 with more development for
android going on.

-Chris

On Mon, Dec 28, 2009 at 12:34 PM, Mark Murphy wrote:

> chris harper wrote:
> > Flash is licensed per device. So even though you have different devices
> > all running Android, only the ones that are licensed for Flash can
> > implement it. Is that correct?
>
> Yup!
>
> It is conceivable that Adobe could make a downloadable Flash client for
> Android, but I'm skeptical they can pull that off. I think it will
> require too many low-level hooks to perform properly.
>
> However, I will be happy to be proven wrong on that point, someday.
>
> > I didn't mention that I do have an HTC Hero (as well as my android
> > development phone). It is running Firmware version 1.5.
> > I also tried doing the WebView as stated in the article testing on this
> > device and also got the same result as my android development phone when
> > trying to view a .swf (a screen full of random characters).
>
> H...it's possible there was a minor firmware upgrade with the Hero
> that changed the functionality.
>
> > From what you told me it sounds like I need to go down the road of
> > continuing to test my WebView stub on my HTC Hero and maybe looking into
> > why my flashlite plugin doesn't seem to be working with my WebView stub
> > code?
> >
> > Does that sound about right to you Mark?
>
> Yes.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 1.3 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

Re: [android-developers] Re: No Adobe Flash support for Eclair!?!

2009-12-28 Thread chris harper
Thank you.

I also have the HTC Hero (along with my development phone) I bought it for
the reason to view Flash.

But I can not get my webview stub code to view flash content as specified in
that article I referenced (specifically a .swf file I am trying to open on
my sdcard).

All I get is a page with random characters displayed.

I think I might be missing a flashlite plugin or something?

On Mon, Dec 28, 2009 at 12:21 PM, theSmith  wrote:

> As Mark said, unless you have a Hero, which has flash built it, this
> will not work.
>
>
>
> On Dec 28, 1:38 pm, chris harper  wrote:
> > Thank you Mark for the clarification it is greatly appreciated.
> > With so many different sources on the internet it is somewhat difficult
> to
> > know what is actually available and what isn't.
> >
> > One more question if you happen to know this. All I am simply trying to
> do
> > is create a WebView (using android.webkit.Webview) and view a .swf file
> with
> > it.
> >
> > According to this article it is had been done and is possible:
> http://www.flashmobileblog.com/2009/08/12/flash-development-with-andr...
> >
> > But again like I stated before, after downloading the latest source code,
> > building it, flashing it to my development phone and flash still not
> working
> > I am having my doubts (and greatly wondering how this guy said it is
> > working).
> >
> > Do you know if this is even somewhat possible (maybe a FlashLite plugin I
> am
> > missing or something?).
> >
> > Or am just out of luck on this one.
> >
> > Thank you
> > -Chris
> >
> > On Mon, Dec 28, 2009 at 11:16 AM, Mark Murphy  >wrote:
> >
> > > chris harper wrote:
> > > > I kept reading about how one of the biggest news about eclair coming
> > > > out in 2010 is that  support for Flash 10 (or ANY Flash for that
> > > > matter) will be built into it.
> >
> > > 1. Eclair came out in 2009.
> >
> > > 2. AFAIK, nowhere credible was it written that Eclair would have
> support
> > > for Flash 10 built into it.
> >
> > > > This does not appear to be the case for the fact that I download all
> > > > the latest source code for Eclair, built and installed Eclair onto my
> > > > development phone over the Christmas break and to my surprise/
> > > > disappointment there is absolutely no support for Flash when I try to
> > > > view with the browser. I tried plugin's and searching for missing
> .apk
> > > > installs for Flash but I found nothing.
> >
> > > Flash is not open source.
> >
> > > Right now, the most that can reasonably be expected is for Flash to be
> > > available from Adobe for Android OEMs to license and put on their
> > > devices. HTC has already done this with the Hero, albeit for more of a
> > > Flash Lite profile than a full Flash 10 implementation. This is not
> > > significantly different than codecs for non-open-source media file
> > > formats (e.g., WMA, WMV) being available for OEMs to license from
> > > PacketVideo.
> >
> > > --
> > > Mark Murphy (a Commons Guy)
> > >http://commonsware.com|http://twitter.com/commonsguy
> >
> > > Android Consulting/App Development:http://commonsware.com/consulting
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-28 Thread Mark Murphy
chris harper wrote:
> Flash is licensed per device. So even though you have different devices
> all running Android, only the ones that are licensed for Flash can
> implement it. Is that correct?

Yup!

It is conceivable that Adobe could make a downloadable Flash client for
Android, but I'm skeptical they can pull that off. I think it will
require too many low-level hooks to perform properly.

However, I will be happy to be proven wrong on that point, someday.

> I didn't mention that I do have an HTC Hero (as well as my android
> development phone). It is running Firmware version 1.5.  
> I also tried doing the WebView as stated in the article testing on this
> device and also got the same result as my android development phone when
> trying to view a .swf (a screen full of random characters).

H...it's possible there was a minor firmware upgrade with the Hero
that changed the functionality.

> From what you told me it sounds like I need to go down the road of
> continuing to test my WebView stub on my HTC Hero and maybe looking into
> why my flashlite plugin doesn't seem to be working with my WebView stub
> code?
> 
> Does that sound about right to you Mark?

Yes.

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.3 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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-28 Thread chris harper
Ok. It is becoming clear now.

Flash is licensed per device. So even though you have different devices all
running Android, only the ones that are licensed for Flash can implement it.
Is that correct?

I didn't mention that I do have an HTC Hero (as well as my android
development phone). It is running Firmware version 1.5.
I also tried doing the WebView as stated in the article testing on this
device and also got the same result as my android development phone when
trying to view a .swf (a screen full of random characters).

>From what you told me it sounds like I need to go down the road of
continuing to test my WebView stub on my HTC Hero and maybe looking into why
my flashlite plugin doesn't seem to be working with my WebView stub code?

Does that sound about right to you Mark?

Thank you again, this really does help me alot.

-Chris



On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy wrote:

> chris harper wrote:
> > According to this article it is had been done and is possible:
> >
> http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/
>
> The very first sentence of that post:
>
> "As we already know by now the HTC Hero supports Flash in the browser,
> and by double tapping on Flash content it will be played in full screen
> mode."
>
> You will note that this says "HTC Hero". The HTC Hero is a device, for
> which HTC licensed a Flash (Lite) implementation.
>
> > But again like I stated before, after downloading the latest source
> > code, building it, flashing it to my development phone and flash still
> > not working I am having my doubts (and greatly wondering how this guy
> > said it is working).
>
> That is because he is referring to the HTC Hero.
>
> > Do you know if this is even somewhat possible (maybe a FlashLite plugin
> > I am missing or something?).
>
> This presumably will work on an HTC Hero -- I haven't tried it. It will
> not work on devices that did not license Flash (Lite) from Adobe. It
> most definitely will not work from the Android open source tree, because
> Flash is not open source.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | 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
>

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

2009-12-28 Thread theSmith
Not to burst your bubble, but my apps have seen the Google Nexus One
and 2.1 for about a month now (found them looking through my Flurry
stats).

As for the Droid build part, well I guess we we're all expecting it to
come eventually.  Any one heard of an official release date?

On Dec 28, 12:48 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> I saw this as an agent today:
>
> Mozilla/5.0 (Linux; U; Android 2.1; en-us; Droid Build/ERD72)
> AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/
> 530.17
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"

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

2009-12-28 Thread theSmith
As Mark said, unless you have a Hero, which has flash built it, this
will not work.



On Dec 28, 1:38 pm, chris harper  wrote:
> Thank you Mark for the clarification it is greatly appreciated.
> With so many different sources on the internet it is somewhat difficult to
> know what is actually available and what isn't.
>
> One more question if you happen to know this. All I am simply trying to do
> is create a WebView (using android.webkit.Webview) and view a .swf file with
> it.
>
> According to this article it is had been done and is 
> possible:http://www.flashmobileblog.com/2009/08/12/flash-development-with-andr...
>
> But again like I stated before, after downloading the latest source code,
> building it, flashing it to my development phone and flash still not working
> I am having my doubts (and greatly wondering how this guy said it is
> working).
>
> Do you know if this is even somewhat possible (maybe a FlashLite plugin I am
> missing or something?).
>
> Or am just out of luck on this one.
>
> Thank you
> -Chris
>
> On Mon, Dec 28, 2009 at 11:16 AM, Mark Murphy wrote:
>
> > chris harper wrote:
> > > I kept reading about how one of the biggest news about eclair coming
> > > out in 2010 is that  support for Flash 10 (or ANY Flash for that
> > > matter) will be built into it.
>
> > 1. Eclair came out in 2009.
>
> > 2. AFAIK, nowhere credible was it written that Eclair would have support
> > for Flash 10 built into it.
>
> > > This does not appear to be the case for the fact that I download all
> > > the latest source code for Eclair, built and installed Eclair onto my
> > > development phone over the Christmas break and to my surprise/
> > > disappointment there is absolutely no support for Flash when I try to
> > > view with the browser. I tried plugin's and searching for missing .apk
> > > installs for Flash but I found nothing.
>
> > Flash is not open source.
>
> > Right now, the most that can reasonably be expected is for Flash to be
> > available from Adobe for Android OEMs to license and put on their
> > devices. HTC has already done this with the Hero, albeit for more of a
> > Flash Lite profile than a full Flash 10 implementation. This is not
> > significantly different than codecs for non-open-source media file
> > formats (e.g., WMA, WMV) being available for OEMs to license from
> > PacketVideo.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Consulting/App Development:http://commonsware.com/consulting
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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: Blank textures on Droid (OpenGL)

2009-12-28 Thread rollbak
I have a droid, i can help you debug what is going on.

regards,

Lucas

On Dec 28, 6:31 am, Vladimir  wrote:
> Hi guys,
>
> I ran into a rather strange problem with my OpenGL game. While most
> textures look good, five or six are not drawn on Droid, and I don't
> see anything special about these images/models.
> For example, my HUD is made of 4 elements. The upper part is drawn
> correctly, while the lower part appears as white rectangles. The code
> used for loading and drawing these models and textures is exactly the
> same. Textures are 32-bit TGAs in both cases, POT dimensions, in -
> nodpi, inScaled==false, using GLSurfaceView to rule out configuration
> issues. No problems on G1 and Hero (and of course on emulator). And I
> don't have the Droid, so I can't just try whatever comes to my mind.
> Asked users to send me logs - no errors, all models and images appear
> to load normally.
>
> Did anyone experience anything like that?
> If I come up with a test app, can anyone with a Droid take a look?
>
> Thanks,
> Vladimir

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

2009-12-28 Thread Mark Murphy
chris harper wrote:
> According to this article it is had been done and is possible:
> http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/

The very first sentence of that post:

"As we already know by now the HTC Hero supports Flash in the browser,
and by double tapping on Flash content it will be played in full screen
mode."

You will note that this says "HTC Hero". The HTC Hero is a device, for
which HTC licensed a Flash (Lite) implementation.

> But again like I stated before, after downloading the latest source
> code, building it, flashing it to my development phone and flash still
> not working I am having my doubts (and greatly wondering how this guy
> said it is working).

That is because he is referring to the HTC Hero.

> Do you know if this is even somewhat possible (maybe a FlashLite plugin
> I am missing or something?).

This presumably will work on an HTC Hero -- I haven't tried it. It will
not work on devices that did not license Flash (Lite) from Adobe. It
most definitely will not work from the Android open source tree, because
Flash is not open source.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | 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: OpenGL ES 2.0 on Eclair

2009-12-28 Thread rollbak
So, that means that with NDK i can? Can you explain this further
please?

Thanks,

Lucas

On Dec 28, 3:09 pm, Romain Guy  wrote:
> Java apps cannot directly access OpenGL ES 2.0 APIs at the moment.
>
> On Thu, Dec 24, 2009 at 7:32 PM, Lawrencelee  wrote:
> > Eclair has supported OpenGL ES 2.0. But I can not find related JNI
> > wrapper for OpenGL ES API. How a Java application use OpenGL ES 2.0
> > functions?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


[android-developers] Re: How can I put a TextView on a Layout without using an xml-file? What is wrong in my code?

2009-12-28 Thread Vladimir
It depends on what you want to achieve. For common tasks, setGravity
and setPadding should do the job.
Also I don't think it's a good idea to rely on AbsoluteLayout unless
it is really necessary. You could try a more flexible LinearLayout and
use orientation & gravity to position children. In this particular
sample it won't make any difference, but more complicated layouts are
easier to maintain if you avoid hard-coded coordinates.

> And how can I set the coordinates without setting the width and height
> like with tv.layout(10,10,100,100); ?

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


[android-developers] Host is unresolved errors

2009-12-28 Thread Wayne Wenthin
Flurry is starting to report more and more of these.   I'm wondering if
anyone else has seen a rise in this type of error.   I'm thinking of
switching to straight IP address since I'm running on a different port it
redirects properly but it is still kind of disconcerting that my domain is
not resolving properly even after they are logged in and playing.

Any thoughts?

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

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

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

[android-developers] Re: Unable to test applications on physical device

2009-12-28 Thread Vladimir
I had exactly the same problem until I realized I forgot to enable USB
debugging on the device.

On Dec 26, 12:49 pm, Uru  wrote:
>  Hi there,
> I hope I am posting in the right place, sorry if I am not. Just
> started developing apps and am having a small problem. I can test the
> apps on the emulator but I cannot test them on my physical android
> device. When I am asked to select a running device I get a device
> listed as:
> Serial Number/name: 
> AVD name: N/A
> Target: unknown
> etc,
>
> It seems that my device is being picked up but not able to be used.
> When I try to run the app I get an "Must set android.target.avd"
> error.
>
> Is there something I am missing?
>
> I am using netbeans 6.7.1 on Ubuntu 9.10, everything up to date. I
> have a G2-Touch from T-mobile, if someone tells me where to find it, I
> will post any other needed information.

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


[android-developers] Re: Avoiding garbage collection for smooth 2d animations

2009-12-28 Thread Timothy F
You can tell very easily in LogCat whether the GCs belong to your task
or another task.  If they belong to another task, then at least you
can take consolation that Android 1.6 (I think?) gives less CPU to
background tasks.  If they belong to your own task, then you should
run the DDMS tool (not the DDMS perspective) to see what objects are
being allocated and from what sites.  Then, presuming the object
allocations are inherent to the Android draw loop, you may want to
consider using OpenGL ES: we have been able to code a number of
applications that don't create any new objects within the main render
loop.

On Dec 28, 12:36 pm, Dan Sherman  wrote:
> No matter what you'll see GC being called, there's no way around it (that
> I'm aware of).
>
> There are background threads that are doing all sorts of things, which very
> well might be getting GC'd.  Theres also a lot of things you can't
> reasonably avoid, like allocations from Iterators and such...
>
> On Mon, Dec 28, 2009 at 12:32 PM, Mark Wyszomierski wrote:
>
>
>
> > Hi,
>
> > I'm drawing a rect to a surfaceview. Nothing special, just a test like
> > this, in the surfaceview-extended class:
>
> >  private int mPosX = 0;
> >  private Paint mPaint = new Paint();
>
> > �...@override
> >   public void onDraw(Canvas canvas) {
> >       canvas.drawRect(mPosX-20, 50, mPosX+20, 70, mPaint);
>
> >       mPosX += mSignX;
> >       if (mPosX > 320) {
> >           mSignX = -1;
> >       }
> >       else if (mPosX < 0) {
> >           mSignX = 1;
> >       }
> >   }
>
> > the rect just bounces around the screen. I'm watching DDMS, I still
> > see the garbage collector being called, even with this simple draw
> > loop. There is no other application code being executed.
>
> > I'm wondering if it's realistic to expect the gc to not be called at
> > all if we take care to not allocate any objects during our draw loops.
> > I'm trying to extend this example to do some smooth animations, but
> > every once in awhile the gc is called and you can see the drawing
> > stutter. Although none of my application code is allocating any new
> > objects, I don't know what the underlying API is doing inside
> > surfaceview etc, and I doubt we can control that.
>
> > Just wondering if this is not possible, I'd prefer to abandon this
> > game idea up-front if we can't guarantee smooth animations,
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-28 Thread chris harper
Thank you Mark for the clarification it is greatly appreciated.
With so many different sources on the internet it is somewhat difficult to
know what is actually available and what isn't.

One more question if you happen to know this. All I am simply trying to do
is create a WebView (using android.webkit.Webview) and view a .swf file with
it.

According to this article it is had been done and is possible:
http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/

But again like I stated before, after downloading the latest source code,
building it, flashing it to my development phone and flash still not working
I am having my doubts (and greatly wondering how this guy said it is
working).

Do you know if this is even somewhat possible (maybe a FlashLite plugin I am
missing or something?).

Or am just out of luck on this one.

Thank you
-Chris



On Mon, Dec 28, 2009 at 11:16 AM, Mark Murphy wrote:

> chris harper wrote:
> > I kept reading about how one of the biggest news about eclair coming
> > out in 2010 is that  support for Flash 10 (or ANY Flash for that
> > matter) will be built into it.
>
> 1. Eclair came out in 2009.
>
> 2. AFAIK, nowhere credible was it written that Eclair would have support
> for Flash 10 built into it.
>
> > This does not appear to be the case for the fact that I download all
> > the latest source code for Eclair, built and installed Eclair onto my
> > development phone over the Christmas break and to my surprise/
> > disappointment there is absolutely no support for Flash when I try to
> > view with the browser. I tried plugin's and searching for missing .apk
> > installs for Flash but I found nothing.
>
> Flash is not open source.
>
> Right now, the most that can reasonably be expected is for Flash to be
> available from Adobe for Android OEMs to license and put on their
> devices. HTC has already done this with the Hero, albeit for more of a
> Flash Lite profile than a full Flash 10 implementation. This is not
> significantly different than codecs for non-open-source media file
> formats (e.g., WMA, WMV) being available for OEMs to license from
> PacketVideo.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Consulting/App Development: http://commonsware.com/consulting
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Texture compression

2009-12-28 Thread Timothy F
I would always encourage use of the common features, so as to maximize
compatibility across devices, so I'd recommend your using
GL_OES_compressed_paletted_texture.

Also, while GL_OES_draw_texture is fast, if you need to render many
sprites, then using this extension you'd need multiple calls to OpenGL
ES to render them all, and that may cost you more than you gain.  We
have a fledgling OpenGL ES wrapper library at http://code.google.com/p/skylight1
that can help you to render multiple sprites in a single call to
OpenGL ES.  We haven't checked in the example code projects, but let
me know if you are interested and we can prioritize it.

On Dec 28, 5:59 am, Steve  wrote:
> I have heard that using palettised textures can actually have a
> negative impact on performance, due to the fact two lookup are needed
> per texel sampled (one to ascertain the lookup index, then another to
> use the look up index to get the full value) - does anyone know how
> much truth there is in this?
>
> I am currently going through a bunch of texture extensions that are
> supported for various handsets, including: Droid, G1, MyTouch, Hero,
> Emulator and trying to find out what their compression/performance/etc
> is like. For now the list I am working on is:
>
> Droid
>
> GL_OES_compressed_paletted_texture
> GL_OES_draw_texture
> GL_OES_compressed_ETC1_RGB8_texture
> GL_IMG_texture_compression_pvrtc
> GL_IMG_texture_format_BGRA
> GL_EXT_texture_format_BGRA
> GL_IMG_texture_stream
>
> G1/MyHero/Touch
>
> GL_ATI_texture_compression_atitc
> GL_OES_compressed_paletted_texture
> GL_OES_draw_texture
> GL_QUALCOMM_direct_texture
>
> Emulator
>
> GL_OES_compressed_paletted_texture
> GL_OES_draw_texture
> GL_ARB_texture_compression
> GL_ANDROID_direct_texture
>
> So the two common ones seem to be GL_OES_compressed_paletted_texture
> and GL_OES_draw_texture. From what I understand, the draw_texture
> extension lets you basically copy a GL texture (or region of a GL
> texture) to the back buffer, at a given Z depth, but it doesn't allow
> for z testing, alpha blending, rotation, scaling, etc. although I
> haven't found any concrete information to this extent. Certainly if it
> doesn't support alpha blending/z testing the only sprite I would be
> able to use it for is the single background image. The documentation I
> have read indicates this is the fastest way of drawing textures,
> certainly on older handsets.
>
> The GL_OES_compressed_ETC1_RGB8_texture format is an Ericsson format,
> I believe it can be created with etcpack. From the name it sounds like
> it can store R8G8B8 compressed, so no alpha channel support - which is
> not very useful for me.
>
> The GL_IMG_texture_compression_pvrtc format is a bit more common, as
> it is used on iPhone and I believe the Beagleboard/Pandora also uses
> it. One thing that isn't so clear, is the GPU technical reference for
> Droid specifies the supported formats as: Compressed textures PVR-TC1,
> PVR-TC2, ETC1 - but I'm not entirely sure what this covers (i.e. does
> ETC1 just mean GL_OES_compressed_ETC1_RGB8 or are there other
> supported ETC1 formats, and similiarly for PVRTC). There is a PVR Tex
> Tool, which encodes to PVRTC 2BPP and PVRTC 4BPP, the 2/4 BPP
> indicates the bits per pixel, but it isn't clear if this is a 'PVR-
> TC1' or 'PVR-TC2' compression being used.
>
> I have read that using ATITC compression is a good idea for the
> majority of handsets (this was from an Android optimisation document
> from a while ago, so I'm not sure if it still holds true). This is
> presumably handled by this extension: GL_ATI_texture_compression_atitc
> but as of yet I am not sure how to create textures of this format, and
> whether or not they can have an alpha channel - although I've been
> hinted that The Compressonator can create these textures, I have a
> feeling the options 'ATC RGB' 'ATC RGBA (Explicit alpha)' and 'ATC
> RGBA (Interpolated alpha)' could be the ones to use - although I'm not
> sure how you read on the Android side. The compressonator also has an
> 'ETC RGB' option, which I am guessing *might* be the ETC mode above.
>
> That is as much as I know for now - thought I'd post my findings this
> far in case it helps anyone, and in case it sparks any further useful
> discussion! I'll also see if I can dig up anything else - it really
> feels like someone out there must have already worked all this stuff
> out though :o)
>
> Steve
>
> On Dec 28, 3:56 am, Lance Nanek  wrote:
>
>
>
> > Hmm, the OpenGL ES 1.0 spec says OES_compressed_paletted_texture is a
> > required extension in both Common and Common-Lite 
> > profiles:https://www.khronos.org/registry/gles/specs/1.0/opengles_spec_1_0.pdf
>
> > Looks like the method/constants are there 
> > too:http://www.khronos.org/opengles/documentation/opengles1_0/html/glComp...
>
> >http://developer.android.com/reference/android/opengl/GLES10.html#glC..
>
> > Haven't tried them myself, though.
>
> > On Dec 27, 7:19 pm, Steve  wrote:
>
> >

[android-developers] Re: Solved: Authenticating android to App Engine

2009-12-28 Thread polyclefsoftware
There's no current way that I know of to get the user's actual gmail
and password, but as this thread notes, you can generate a valid
authToken from the user's gmail account on their phone:

http://groups.google.com/group/android-developers/browse_thread/thread/be16e3903442931b/dc2d3126055dc251?lnk=gst&q=authtoken#dc2d3126055dc251

The user doesn't have to enter their credentials. Of course, this only
works with the new Account Manager API, which is only in 2.0 or
greater.

Here's a working snippet for getting the authToken:

AccountManager mgr = AccountManager.get(thisActivity);
Account[] accts = mgr.getAccountsByType("com.google");
Account acct = accts[0];
AccountManagerFuture accountManagerFuture = 
mgr.getAuthToken
(acct, "ah", null, thisActivity, null, null);
Bundle authTokenBundle = 
accountManagerFuture.getResult();
authToken = authTokenBundle.get
(AccountManager.KEY_AUTHTOKEN).toString();

You can use this code instead of calling Benjamin's GetToken method. A
couple of things...there is more than one getAuthToken method. You
need to use the one that passes in the current activity. This will
launch a system notification that warns the user that your app wants
to use the credentials from their Google account. If they accept, they
are never prompted again. Also, you need to add the GET_ACCOUNTS and
USE_CREDENTIALS permissions to your manifest.

I'm working on a turn-based multiplayer game using Google App Engine
as the server. We've got all this authentication junk worked out,
which was a pain in the butt, but we're having some very slow
performance (not just on the Android client, but on the browser one as
well, so something's not quite right with the way we're reading or
writing data to the DB). Anyway, hope this helps.


On Dec 28, 9:36 am, Dan Sherman  wrote:
> Thanks for the class, looks pretty good.
>
> Question though, as far as I'm aware, theres no way to get that user's gmail
> account from the phone, so the user has to enter the credentials at the
> start of the app, correct?
>
> - Dan
>
>
>
> On Sat, Dec 26, 2009 at 12:01 PM, Benjamin  wrote:
> > I've been working for the past couple of days to allow users to login
> > to an android app with their gmail account and pass the authentication
> > token to my app hosted on app engine - so i can download xml from my
> > web services hosted on app engine as if the user logged into the app
> > directly.
>
> > There is a lot of info on ways to get the google auth code and the
> > auth cookie and then pass the cookie in the header of an http request
> > - but no  info out there on doing all of this from android and going
> > as far as to add the cookie to the remaining http requests. So, now
> > that's it's working, i thought i'd compile it all together and post
> > the solution here in my blog - enjoy.
>
> >http://javagwt.blogspot.com/2009/12/authenticating-android-app-to-goo...
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-28 Thread Mark Murphy
chris harper wrote:
> I kept reading about how one of the biggest news about eclair coming
> out in 2010 is that  support for Flash 10 (or ANY Flash for that
> matter) will be built into it.

1. Eclair came out in 2009.

2. AFAIK, nowhere credible was it written that Eclair would have support
for Flash 10 built into it.

> This does not appear to be the case for the fact that I download all
> the latest source code for Eclair, built and installed Eclair onto my
> development phone over the Christmas break and to my surprise/
> disappointment there is absolutely no support for Flash when I try to
> view with the browser. I tried plugin's and searching for missing .apk
> installs for Flash but I found nothing.

Flash is not open source.

Right now, the most that can reasonably be expected is for Flash to be
available from Adobe for Android OEMs to license and put on their
devices. HTC has already done this with the Hero, albeit for more of a
Flash Lite profile than a full Flash 10 implementation. This is not
significantly different than codecs for non-open-source media file
formats (e.g., WMA, WMV) being available for OEMs to license from
PacketVideo.

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

Android Consulting/App Development: http://commonsware.com/consulting

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

2009-12-28 Thread Romain Guy
Java apps cannot directly access OpenGL ES 2.0 APIs at the moment.

On Thu, Dec 24, 2009 at 7:32 PM, Lawrencelee  wrote:
> Eclair has supported OpenGL ES 2.0. But I can not find related JNI
> wrapper for OpenGL ES API. How a Java application use OpenGL ES 2.0
> functions?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


Re: [android-developers] How can I access folders in res/drawable? Example: res/drawable/gameboard/image1.png and res/drawable/character/image1.png ?

2009-12-28 Thread Romain Guy
Folders in res/drawable are not supported at the moment.

On Fri, Dec 25, 2009 at 7:08 AM, Martin  wrote:
> Hi!
>
> I am programming a game and I have MANY MANY images. Is there a way
> how I can sort them in folders and access them in my program?
> For example:
> res/drawable/gameboard/image*.png
> res/drawable/animals/image*.png
> res/drawable/character/image*.png
>
> Or do I HAVE to put all of them directly in res/drawable/* to be able
> to use them in my program?
>
> Greetings,
> Martin
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] Avoiding String allocation in TextView.setText()

2009-12-28 Thread Olivier Guilyardi
Hi,

on Android 1.5, using the Allocation Tracker I see that every time I call
TextView.setText() with a StringBuilder as first argument, a String gets
allocated from the following call stack (first line is last call):

java.lang.AbstractStringBuilder toString
java.lang.StringBuilder toString
android.text.TextUtils  stringOrSpannedString   
android.widget.TextView setText

I tried specifying the buffer type with setText(strBuilder,
TextView.BufferType.NORMAL) but it doesn't change anything.

Is there a way to avoid this allocation ?

--
  Olivier

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

2009-12-28 Thread Romain Guy
The documentation says "**may** not be called" (emphasis mine.) It
does not say that the method **will** not be called.

On Mon, Dec 28, 2009 at 12:43 AM, James Wang  wrote:
> Hi,
> SDK reference says "If this attribute is set to "true",
> onSaveInstanceState() may not be called and onCreate() will be passed
> null instead of the Bundle — just as it was when the activity started
> for the first time."
> I verified it is not true. No matter what value I set stateNotNeeded,
> onSaveInstanceState() always gets called!
>
> Is this a bug?
>
> James
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


Re: [android-developers] who created these "Binder Thread" ?

2009-12-28 Thread Romain Guy
These threads are created by the system and come from a pool. It's
perfectly normal to see them in the debug window. Note that these
threads are not necessarily running.

On Thu, Dec 24, 2009 at 10:43 PM, androidsdk166  wrote:
> After this thread run dozens of loops. The Binder Threads are created,
> and can be seen in the eclipse debug window. And these Binder Threads
> will never get terminated / released. Where does theme come from? How
> to prevent this from happening? Or how to get it teminated / released?
>
>
>
> public class TServer {
>
>        static final int HTTP_PORT = 7788;
>        private static Context FContext = null;
>
>        static class RequestListenerThread extends Thread {
>
>                private final ServerSocket serversocket;
>                private final HttpParams params;
>
>                public RequestListenerThread(Context AContext) throws 
> IOException {
>                        FContext = AContext;
>
>                        this.serversocket = new ServerSocket(HTTP_PORT);
>                        this.params = new BasicHttpParams();
>                        this.params
>                                        
> .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
>                                        
> .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE,
>                                                        8 * 1024)
>                                        .setBooleanParameter(
>                                                        
> CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
>                                        
> .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true);
>                        // .setParameter(CoreProtocolPNames.ORIGIN_SERVER,
>                        // "HttpComponents/1.1");
>
>                }
>
>                public void terminate() {
>                        try {
>                                serversocket.close();
>                                this.interrupt();
>                        } catch (Throwable e) {
>                                e.printStackTrace();
>                        }
>                }
>
>                public void run() {
>                        while (!Thread.interrupted()) {
>                                try {
>                                        // Set up HTTP connection
>                                        Socket socket = 
> this.serversocket.accept();
>                                        DefaultHttpServerConnection conn = new 
> DefaultHttpServerConnection
> ();
>                                        conn.bind(socket, this.params);
>
>                                        try {
>                                                String aUrl = "";
>                                                String aRequest = "";
>                                                HttpRequest request = 
> conn.receiveRequestHeader();
>                                                if (request instanceof 
> HttpEntityEnclosingRequest) {
>                                                        conn
>                                                                        
> .receiveRequestEntity((HttpEntityEnclosingRequest) request);
>                                                        HttpEntity entity = 
> ((HttpEntityEnclosingRequest) request)
>                                                                        
> .getEntity();
>                                                        if (entity != null) {
>                                                                aRequest = 
> EntityUtils
>                                                                               
>  .toString(entity, "UTF-8");
>                                                                
> entity.consumeContent();
>                                                        }
>                                                }
>                                                aUrl = 
> request.getRequestLine().getUri();
>
>                                                String aResponse = 
> "中文中文中文中文中文中文中文中文中文";
>
>                                                ContentResolver r = 
> FContext.getContentResolver();
>                                                Cursor c = 
> r.query(Contacts.People.CONTENT_URI, null,
>                                                                null, null, 
> null);
>                                                try {
>                                                        while (c.moveToNext()) 
> {
>                                                                aResponse = 
> aResponse.concat(c.getString(c
>                                                                               
>  .getColumnIndex(Contacts.People.NAME)));
>                                                                if 
> (c.getPosition() > 30) {
>                                                                        break;
>                                   

[android-developers] No Adobe Flash support for Eclair!?!

2009-12-28 Thread chris harper
I kept reading about how one of the biggest news about eclair coming
out in 2010 is that  support for Flash 10 (or ANY Flash for that
matter) will be built into it.

This does not appear to be the case for the fact that I download all
the latest source code for Eclair, built and installed Eclair onto my
development phone over the Christmas break and to my surprise/
disappointment there is absolutely no support for Flash when I try to
view with the browser. I tried plugin's and searching for missing .apk
installs for Flash but I found nothing.

Unless I am missing something (i.e. maybe a side tree build for
flash?)  and if I did then I apologize but from what I can tell as of
now the Eclair build does and will not support flash.

If anyone knows ANYTHING on this topic on this please update for us.

Thank you

-Chris

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


[android-developers] Re: Cannot view saved image until reboot

2009-12-28 Thread Mike M
davemac,

Thanks for the answer.  I didn't know you had to scan the file for it
to be recognized by the Gallery.

Worked like a charm.   I really appreciate it

Thanks!




On Dec 27, 7:54 am, davemac  wrote:
> After you have your new image file on the sdcard you need to use a
> MediaScannerConnection to make it known to the Gallery. The method is
> scanFile. It's best for your activity to implement the
> MediaScannerConnectionClient interface, and the two callbacks to
> coordinate the addition of your new image file.
>
> - dave
>
> On Dec 26, 10:50 pm, Mike M  wrote:
>
>
>
> > Hey all,
>
> > I am saving an image taken by the camera to a unique folder on the
> > sdcard.  The image saves fine, but I cannot view it in the Gallery.  I
> > can see it in the file system, but I cannot view the image in the
> > Gallery app until I reboot the phone or mount the sdcard, and then
> > umount.
>
> > Here's the code:
>
> >      public static void saveImageToCard (Bitmap bm, String title,
> > String description, Context context) {
>
> >             //replace and append the title with the correct extension
> >             title = title.replace(" ", "_") + ".jpg";
>
> >             File Directory = new 
> > File(Environment.getExternalStorageDirectory
> > () + "/myFolder");
> >                 File file = new File(Directory.getAbsoluteFile() + "/" + 
> > title);
>
> >                 if (!Directory.exists()) {
> >                         Directory.mkdirs();
> >                 }
>
> >                 try {
> >                         FileOutputStream fos = new FileOutputStream(file);
> >                         bm.compress(Bitmap.CompressFormat.JPEG, 100, fos);
> >                         fos.close();
> >                 } catch (IOException e) {
> >                         e.printStackTrace();
> >                 }
>
> >         }
>
> > As I said, the file is saved fine, I can see it in the FS, and I can
> > view it after the card has been umounted/mounted or rebooted.   Is it
> > an issue that I'm not correctly closing the file??  I don't think
> > that's it, but I'm not sure why I can't view the image.  I believe I
> > tried saving the file using getContentResolver().insert() and didn't
> > have this issue, but I want to save the images to a specific folder
> > that I create.
>
> > Any ideas?
>
> > Thanks in advance,
>
> > Mike

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


[android-developers] Droid 2.1?

2009-12-28 Thread Maps.Huge.Info (Maps API Guru)
I saw this as an agent today:

Mozilla/5.0 (Linux; U; Android 2.1; en-us; Droid Build/ERD72)
AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/
530.17

-John Coryat

"Radar Now!"

"What Zip Code?"

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

2009-12-28 Thread Albert
solved! it appears that the emulator would not send the broadcast only
by not being connected, you also have to disconect it on the emulator.
Maybe in the future releases it will be better sync with the pc...

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

2009-12-28 Thread Dan Sherman
No matter what you'll see GC being called, there's no way around it (that
I'm aware of).

There are background threads that are doing all sorts of things, which very
well might be getting GC'd.  Theres also a lot of things you can't
reasonably avoid, like allocations from Iterators and such...

On Mon, Dec 28, 2009 at 12:32 PM, Mark Wyszomierski wrote:

> Hi,
>
> I'm drawing a rect to a surfaceview. Nothing special, just a test like
> this, in the surfaceview-extended class:
>
>  private int mPosX = 0;
>  private Paint mPaint = new Paint();
>
>  @Override
>   public void onDraw(Canvas canvas) {
>   canvas.drawRect(mPosX-20, 50, mPosX+20, 70, mPaint);
>
>   mPosX += mSignX;
>   if (mPosX > 320) {
>   mSignX = -1;
>   }
>   else if (mPosX < 0) {
>   mSignX = 1;
>   }
>   }
>
> the rect just bounces around the screen. I'm watching DDMS, I still
> see the garbage collector being called, even with this simple draw
> loop. There is no other application code being executed.
>
> I'm wondering if it's realistic to expect the gc to not be called at
> all if we take care to not allocate any objects during our draw loops.
> I'm trying to extend this example to do some smooth animations, but
> every once in awhile the gc is called and you can see the drawing
> stutter. Although none of my application code is allocating any new
> objects, I don't know what the underlying API is doing inside
> surfaceview etc, and I doubt we can control that.
>
> Just wondering if this is not possible, I'd prefer to abandon this
> game idea up-front if we can't guarantee smooth animations,
>
> 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: How to hack the activity stack of your application ?

2009-12-28 Thread André Oriani
There is some difficulties with you proposal.
-Service and UI are running on different process.
-I will have to keep track of activities ( they will have to put
themselves in some data structure) .
- They are killed ( SIGKILL) , they won't have time to save anything
neither to excute onDestroy.  The problem will happen when process are
launched again ( so no memory abou what happened before, just the
stack of activity because framework does the job)

On Dec 28, 2:56 pm, theSmith  wrote:
> If you want to, you can override the onDestroy() method of the service
> and have it call finish() on each of you activities in the stack.
> This should result in the behavior you are looking for I believe,
> because the system would be forced to create a new instance of your
> application, thus starting a new service with it.
>
> -theSmith
>
> On Dec 28, 10:35 am, André Oriani  wrote:
>
> > Hi all,
>
> > Differently from most application, the state of my application is not
> > controlled by its stack of activities but by the state of a background
> > service.
>
> > Here is my problem. Suppose I have a task running  with  a non empty
> > stack of activities. The top activity is paused on background and not
> > visible.  Then for some reason the  process that host both the service
> > and top activity is killed.  When I somehow return to my app
> > application ( by pressing back key, resumimg from recent apps menu),
> > the framework launches  the application again with the activity that
> > was on the top of the activity stack  before process got killed.
>
> > Okay, you would say that it is the expected behavior. But because my
> > service is no longer alive , the top activity is no longer valid ( as
> > the other activities which remain  on stack) . I would like to clear
> > the whole activity stack  and launch another activity to explain the
> > current situation to user.
>
> > I could put the follow code on every activity "if(not valid state)
> > finish() and launch a new activity with clear top flag  enabled " but
> > I don't think it is clever.  Is there a better way to control which
> > activity will be launched after application is killed ?
>
> > Tks,
> > André
>
>

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


[android-developers] Tomcat httppost bufferedreader problem

2009-12-28 Thread Maurice
Hi

My (client)application connects to a Tomcat server through http post
requests.
My problem is that the application sometimes does not get the complete
response.
The last X bytes are missing.
The length of a response is, however, below 1K (did not count or
measure it).

My application retrieves data from the Tomcat server at various
moments in time. I also have a PC version of the application that has
exactly the same code-base for this part. On the PC there is not a
problem.
Also, it does not happen all the time. I cannot pinpoint when it goes
right and when wrong.
It seems like a timing problem.

I tried several things to solve the problem. This ranges from reading
the result of the post two times to letting the thread sleep at
various places in the code.
None of the solutions are a silver bullets, although the problem seems
less frequent.

So maybe I'm doing something wrong.

Did somebody have a similar problem?
Should I post requests, or readout the response in a different way?

My code is as follows:

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;

HttpPost httpost = new HttpPost(aUrl);
HttpResponse response = RL.getHttpClient().execute(httpost);
HttpEntity entity = response.getEntity();

if (entity != null) {
   br = new BufferedReader(new InputStreamReader(entity.getContent
())) ;
} else {
  br = null ;
}

BufferedReader is read out by using the method readLine()

Any help is appreciated.

Regards,

Maurice

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


[android-developers] Avoiding garbage collection for smooth 2d animations

2009-12-28 Thread Mark Wyszomierski
Hi,

I'm drawing a rect to a surfaceview. Nothing special, just a test like
this, in the surfaceview-extended class:

  private int mPosX = 0;
  private Paint mPaint = new Paint();

  @Override
   public void onDraw(Canvas canvas) {
   canvas.drawRect(mPosX-20, 50, mPosX+20, 70, mPaint);

   mPosX += mSignX;
   if (mPosX > 320) {
   mSignX = -1;
   }
   else if (mPosX < 0) {
   mSignX = 1;
   }
   }

the rect just bounces around the screen. I'm watching DDMS, I still
see the garbage collector being called, even with this simple draw
loop. There is no other application code being executed.

I'm wondering if it's realistic to expect the gc to not be called at
all if we take care to not allocate any objects during our draw loops.
I'm trying to extend this example to do some smooth animations, but
every once in awhile the gc is called and you can see the drawing
stutter. Although none of my application code is allocating any new
objects, I don't know what the underlying API is doing inside
surfaceview etc, and I doubt we can control that.

Just wondering if this is not possible, I'd prefer to abandon this
game idea up-front if we can't guarantee smooth animations,

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: How to hack the activity stack of your application ?

2009-12-28 Thread theSmith
If you want to, you can override the onDestroy() method of the service
and have it call finish() on each of you activities in the stack.
This should result in the behavior you are looking for I believe,
because the system would be forced to create a new instance of your
application, thus starting a new service with it.

-theSmith

On Dec 28, 10:35 am, André Oriani  wrote:
> Hi all,
>
> Differently from most application, the state of my application is not
> controlled by its stack of activities but by the state of a background
> service.
>
> Here is my problem. Suppose I have a task running  with  a non empty
> stack of activities. The top activity is paused on background and not
> visible.  Then for some reason the  process that host both the service
> and top activity is killed.  When I somehow return to my app
> application ( by pressing back key, resumimg from recent apps menu),
> the framework launches  the application again with the activity that
> was on the top of the activity stack  before process got killed.
>
> Okay, you would say that it is the expected behavior. But because my
> service is no longer alive , the top activity is no longer valid ( as
> the other activities which remain  on stack) . I would like to clear
> the whole activity stack  and launch another activity to explain the
> current situation to user.
>
> I could put the follow code on every activity "if(not valid state)
> finish() and launch a new activity with clear top flag  enabled " but
> I don't think it is clever.  Is there a better way to control which
> activity will be launched after application is killed ?
>
> Tks,
> André

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


Re: [android-developers] Synchronous activity intent launch ???

2009-12-28 Thread zeugame zeugame
Thanks ,,

didn't know that was possible ;)

Thanks

Croco

On Mon, Dec 28, 2009 at 4:19 PM, Mark Murphy wrote:

> zeugame zeugame wrote:
> > Yes but it not allow dynamlc add remove views ?
> >
> > I've many views i don't want them all created at start.
>
> So, add them later.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2009-12-28 Thread Disconnect
Maps is dependent on google's proprietary libraries - you can write a new
map provider and install that, but there is no magic fix for using google
maps without google.

On Wed, Dec 23, 2009 at 8:36 AM, deepak  wrote:

> Hi..! I have created a maps app and i want it to be installed on an
> android eclair device.. In the emulator if i choose the target as
> Google APIs its working fine but if i target it to donut or eclair its
> showing MISSING SHARED LIBRARY - com.google.maps. Initially it was not
> installing on to the device itself, showing INSTALL FAILED MISSING
> SHARED LIBRARY but i overcame with it by removing the "uses-library"
> line in the manifest file .. Please help me in this.. I have the right
> API key also..
> Thanks in advance..
>
> Deepak
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Droid Keyboard Lights

2009-12-28 Thread Wes
Does anyone know how to control the Droid's keyboard lights?
Honestly, their functioning is arbitrary, at best, near as I can
figure.

I'd really like to be able to turn them on and off independent of the
screen.

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


Re: [android-developers] custom keyboard

2009-12-28 Thread Dai Hiro
Hi,

Did you activate it in Locale & Text Settings ?

Kwaku

On Sun, Dec 27, 2009 at 11:53 PM, schwiz  wrote:
> I am wanting to add a custom keyboard for my app, I was taking a look
> at the softkeyboard example on the included sample code in the SDK.
> When I install it in the emulator it isn't showing up though.  I try
> to access it by longpressing an input box and then clicking select
> input when the context menu pops up.  However, the latin keyboard made
> in the example doesn't show up as one of the options.  Am I missing
> something?  Anyone have advice or know of another example I can look
> at?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Solved: Authenticating android to App Engine

2009-12-28 Thread Dan Sherman
Thanks for the class, looks pretty good.

Question though, as far as I'm aware, theres no way to get that user's gmail
account from the phone, so the user has to enter the credentials at the
start of the app, correct?

- Dan

On Sat, Dec 26, 2009 at 12:01 PM, Benjamin  wrote:

> I've been working for the past couple of days to allow users to login
> to an android app with their gmail account and pass the authentication
> token to my app hosted on app engine - so i can download xml from my
> web services hosted on app engine as if the user logged into the app
> directly.
>
> There is a lot of info on ways to get the google auth code and the
> auth cookie and then pass the cookie in the header of an http request
> - but no  info out there on doing all of this from android and going
> as far as to add the cookie to the remaining http requests. So, now
> that's it's working, i thought i'd compile it all together and post
> the solution here in my blog - enjoy.
>
>
>
> http://javagwt.blogspot.com/2009/12/authenticating-android-app-to-google.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2009-12-28 Thread André Oriani
Hi all,

Differently from most application, the state of my application is not
controlled by its stack of activities but by the state of a background
service.

Here is my problem. Suppose I have a task running  with  a non empty
stack of activities. The top activity is paused on background and not
visible.  Then for some reason the  process that host both the service
and top activity is killed.  When I somehow return to my app
application ( by pressing back key, resumimg from recent apps menu),
the framework launches  the application again with the activity that
was on the top of the activity stack  before process got killed.

Okay, you would say that it is the expected behavior. But because my
service is no longer alive , the top activity is no longer valid ( as
the other activities which remain  on stack) . I would like to clear
the whole activity stack  and launch another activity to explain the
current situation to user.

I could put the follow code on every activity "if(not valid state)
finish() and launch a new activity with clear top flag  enabled " but
I don't think it is clever.  Is there a better way to control which
activity will be launched after application is killed ?


Tks,
André

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


Re: [android-developers] Synchronous activity intent launch ???

2009-12-28 Thread Mark Murphy
zeugame zeugame wrote:
> Yes but it not allow dynamlc add remove views ?
> 
> I've many views i don't want them all created at start.

So, add them later.

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

Warescription: Three Android Books, Plus Updates, $35/Year

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


Re: [android-developers] Synchronous activity intent launch ???

2009-12-28 Thread zeugame zeugame
Yes but it not allow dynamlc add remove views ?

I've many views i don't want them all created at start.

Thanks

Croco

On Mon, Dec 28, 2009 at 4:03 PM, Mark Murphy wrote:

> zeugame zeugame wrote:
> > Thank you Mark for these explaination.
> >
> > So do you know the code to simulate the smooth transition done by the OS
> > between activities. I would like to simulate same between my views
> > controlled manually (slide right , slide left).
>
> You can try ViewFlipper.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Consulting/App Development: http://commonsware.com/consulting
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Connect between two simulators by multicast through the WIFI

2009-12-28 Thread Le Tuan Anh
Hi all,

I am trying to connect two Android simulator by multicast in WIFI
network. Is there anybody have experience about it. (although I have
made some search before, and known that Android simulator provide a
poor support for such protocol, is there any update in new version
2.0 ?).

Thanks 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] Device Or Resource Busy on RFCOMM reconnect

2009-12-28 Thread Brad Hein

I'm developing an application that interfaces with an RFCOMM endpoint.
Through bluetooth, my Droid phone connects to this device, initializes
it, and happily sends and receives data.

A problem I have encountered however is when I walk away from the
device (while it's sending/receiving) and the bluetooth connection
goes stale. I easily detect this in my code by various exceptions
thrown by the inputstream/outputstream/socket. When this happens, I
immediately "disconnect" from the endpoint by doing the following:

try {
  if (instream != null ) instream.close();
  if (outstream != null ) outstream.close();
  if (mobdSock != null ) mobdSock.close(); // this is the socket.
} catch... etc.

So after performing the above steps to officially "disconnect" the
dead connection I thought the connection is clean and ready for a new
connect()...

But what happens is when I come back into range of the device and try
to connect, I am unable to reconnect, no matter how many times I try.
connect() throws this exception: java.io.IOException: Device or
resource busy

The only way I can then reconnect to the device is to disable
bluetooth on my droid, then re-enable it. Then my app is able to re-
connect just fine.

BluetoothDevice -> BluetoothAdapter -> BluetoothSocket -> InputStream/
OutputStream.

I'm currently tearing down the connect from the socket to the right
(see above). Should I be tearing it down all the way down to the
adapter instead? or the device? By setting those to null so GC can
clean them up? This is the best idea I can come up with but it doesn't
feel right.

Thanks
Brad

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

2009-12-28 Thread Dinesh Harjani

Hi;
I had a similar issue when I implemented a listview with checkbox
items using the Efficient Adapter example. I realised that the checked
items were not being stored, so I built a static Boolean in my custom
adapter and listen to the checkbox when it is checked/unchecked and
update the Boolean array. I think you should also do something
similar; store the checked items yourself. To make sure the checked
items are checked when I scroll I check or uncheck the listview item
in the getView() method inside my custom adapter.

It might take a while, but it's certainly not hard to fix when you
think about it.

Hope to be helpful.

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

2009-12-28 Thread Mark Murphy
zeugame zeugame wrote:
> Thank you Mark for these explaination.
> 
> So do you know the code to simulate the smooth transition done by the OS
> between activities. I would like to simulate same between my views
> controlled manually (slide right , slide left).

You can try ViewFlipper.

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

Android Consulting/App Development: http://commonsware.com/consulting

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

2009-12-28 Thread zeugame zeugame
Thank you Mark for these explaination.

So do you know the code to simulate the smooth transition done by the OS
between activities. I would like to simulate same between my views
controlled manually (slide right , slide left).

Best regards.

Croco

On Mon, Dec 28, 2009 at 2:53 PM, Mark Murphy wrote:

> croco wrote:
> > I've 2 problems to solve to avoid manual activities management on
> > Android.
> >
> > 1) is it possible to start an activity launch by intent
> > synchronously ?
>
> No, sorry.
>
> > 2) how knowing which activity of my app is showed to the user without
> > keeping it manually in a variable in my app.
>
> In an ideal application design, you should not care which is visible to
> the user, particularly since the answer could easily be "none".
>
> That being said, I think you have to keep it manually if you do care.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android App Developer Training: http://commonsware.com/training
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Synchronous activity intent launch ???

2009-12-28 Thread Mark Murphy
croco wrote:
> I've 2 problems to solve to avoid manual activities management on
> Android.
> 
> 1) is it possible to start an activity launch by intent
> synchronously ?

No, sorry.

> 2) how knowing which activity of my app is showed to the user without
> keeping it manually in a variable in my app.

In an ideal application design, you should not care which is visible to
the user, particularly since the answer could easily be "none".

That being said, I think you have to keep it manually if you do care.

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

Android App Developer Training: http://commonsware.com/training

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


[android-developers] Re: Multiple Binds to Single Service?

2009-12-28 Thread Brion Emde
Nothing prevents it; that is how it is intended to work.

On Dec 25, 2:44 pm, DCheeseman  wrote:
> Is there anything preventing more than one activity from binding to
> the same running service?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 put a TextView on a Layout without using an xml-file? What is wrong in my code?

2009-12-28 Thread Brion Emde
You need to add the TextView to the layout.

Here's the revised program:

package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.AbsoluteLayout;
import android.widget.TextView;

public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
AbsoluteLayout layout = new AbsoluteLayout(this);
TextView tv = new TextView(layout.getContext());
tv.layout(10,10,100,100);
tv.setText("Hello World! :-)");
layout.addView(tv);
setContentView(layout);}
}

On Dec 25, 7:59 am, Martin  wrote:
> Hi!
>
> Why doesn't write this program "Hello World! :-)" on my screen?
> I know how I would do it with an xml-file, but I want to do it like
> in the following program.
> And how can I set the coordinates without setting the width and height
> like with tv.layout(10,10,100,100); ?
>
> Greetings, Martin
>
> ---
>
> package com.example.helloandroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.AbsoluteLayout;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>    /** Called when the activity is first created. */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        AbsoluteLayout layout = new AbsoluteLayout(this);
>        TextView tv = new TextView(layout.getContext());
>        tv.layout(10,10,100,100);
>
>        tv.setText("Hello World! :-)");
>        setContentView(layout);
>    }
>
>
>
> }

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


Re: [android-developers] Strange platform error in Droid(2.0.1), Hero(1.5)

2009-12-28 Thread Abdul Mateen
Well,
I  am not using that any non-UI Thread, I am using AsyncTask that should not
cause any problem. I do not know where this error is comming... working fine
on emulator with 2.0.1 but this is primarily occuring on Droid.
On Sun, Dec 27, 2009 at 1:43 PM, Frank Weiss  wrote:

> I've run into similar stack traces. Prime cause in my case was my code was
> manipulating the UI from a non-UI thread.
>
> On Dec 27, 2009 9:29 AM, "Abdul Mateen"  wrote:
>
> Hi,
> I have been running into strange problems. here is the stacktrace it seems
> , there is nowhere the error is in my application, I donot know why this
> exception/error is comming..
>
> java.lang.NullPointerException at
> android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355) at
> android.widget.ArrayAdapter.getView(ArrayAdapter.java:323) at
> android.widget.AbsListView.obtainView(AbsListView.java:1274) at
> android.widget.ListView.makeAndAddView(ListView.java:1668) at
> android.widget.ListView.fillDown(ListView.java:637) at
> android.widget.ListView.fillFromTop(ListView.java:694) at
> android.widget.ListView.layoutChildren(ListView.java:1521) at
> android.widget.AbsListView.onLayout(AbsListView.java:1113) at
> android.view.View.layout(View.java:6831) at
> android.widget.FrameLayout.onLayout(FrameLayout.java:333) at
> android.view.View.layout(View.java:6831) at
> android.widget.FrameLayout.onLayout(FrameLayout.java:333) at
> android.view.View.layout(View.java:6831) at
> android.view.ViewRoot.performTraversals(ViewRoot.java:996) at
> android.view.ViewRoot.handleMessage(ViewRoot.java:1633) at
> android.os.Handler.dispatchMessage(Handler.java:99) at
> android.os.Looper.loop(Looper.java:123) at
> android.app.ActivityThread.main(ActivityThread.java:4338) at
> java.lang.reflect.Method.invokeNative(Native Method) at
> java.lang.reflect.Method.invoke(Method.java:521) at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at
> dalvik.system.NativeStart.main(Native Method)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Synchronous activity intent launch ???

2009-12-28 Thread croco
Hi all,

Happy christmas to all.

I've 2 problems to solve to avoid manual activities management on
Android.

1) is it possible to start an activity launch by intent
synchronously ?
 i want be sure the sub  Activity is launched before the next code
instruction of the calling activity is played.

I've found startActivityForResult but it is not i'm looking for. I
don't want know any result of sub child but i want be sure the
onCreate method of the child activity is called before continuing. If
not i must move the code to the sub activity what i don't want to do.


2) how knowing which activity of my app is showed to the user without
keeping it manually in a variable in my app.


Without controlling these issues i have to control the views
manually  ... :( :( but i really prefer let the system doing it for
me ;)


Thanks for your help.

Croco

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