[android-developers] How to use GridView ?

2008-11-06 Thread Prashant

hi all,


i want to design Grid View in which i can add different type of views
like WebView, ImageView .
is it possible? and if yes how to do that?


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



[android-developers] Re: how to kill activity in android

2008-11-06 Thread hackbod

You can do it programmatically in your app with I believe
Process.killSelf().  You can do it from the shell by using ps to get
the pid of your process and then using the kill command on that,
however this will only work in the emulator where you can get a root
shell.

On Nov 6, 6:02 pm, forrestxu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have question. For test purpose, I want to kill an activity of an
> android application when it is paused or stopped to simulate the
> android system kill an activity when it is in low resource.
>
> How to it?
>
> Regards,
>
> Forrest
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Connect via USB resets prefs

2008-11-06 Thread Eric B

I wrote an app, GReader Notifier (http://www.ebessette.com/d/
greadernotifier), that I've published to the Market.  However, every
time someone connects their G1 to their computer via USB, the
preferences get reset, which basically stops the application from
working as users expect.

One user reported restarting the phone brought the preferences back.

Does this make sense to anyone, because it's got me stumped?

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



[android-developers] Re: Follow this procedure to get the Map as earlier

2008-11-06 Thread [EMAIL PROTECTED]

GUS:

You need update your sdk to at least 1.0rc1.

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



[android-developers] Re: Proper way of handling orientation change + async thread

2008-11-06 Thread Kyle

Does anyone have anymore examples of handling this? I've been trying
everything including zl25drexel's workaround and I've had no luck. I
tried dismissing the dialog in my onDestory() method and then used
onRestoreState() to redisplay the dialog but it still never gets
dismissed. Any help would be appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] pass data between activities

2008-11-06 Thread andrex

Hi guys it's  me again. I would like some help whit a little problem.,
I can't recovery the value of the activity that i call. Look the
follow code.

Manifest

 





Main class prueba how extends of mapActivity

this is the way what I call the actvity

Intent i = new Intent(prueba.this, search.class);
startActivityForResult(i, GET_CODE);

This is the metod which is waiting for the value

 protected void onActivityResult(int requestCode, int resultCode,
String data, Bundle extras){
  switch (resultCode) {
case GET_CODE:
// This is the standard resultCode that is sent back if
the
// activity crashed or didn't doesn't supply an explicit
result.
 if (resultCode == RESULT_CANCELED){

 }
 else {

 }

default:
  break;
}

Search class how extend of Activity

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Bundle stats = new Bundle();
 stats.putString(ACTIVITY_SERVICE, mText.getText().toString());
 Intent mIntent = new Intent();
 mIntent.putExtras(stats);
 setResult(RESULT_OK, mIntent);
 finish();
}


When you use setResult it suppose that the values are sent to the
class how call the activity.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android on device GPS locate not working - code included

2008-11-06 Thread Amir

OK Android enthusiasts...here's where the GPS story has led us.  We
figured out after hard-coding a location via finding latitude and
longitude of my house that the application via the G1 does in-fact
communicate flawlessly with our website.

The issue though is turning on GPS capabilities on the device via
private void updateLocation(Location loc).

Basically, we did notice that when using the "maps" application on the
G1, a 'GPS' icon is presented on the top right side of the phone.  We
aren't seeing this through our application and we believe it's because
the function, private void updateLocation(Location loc) never gets
executed...

Any thoughts?  Does anyone know what needs to be done to initiate this
function?

Cheers
Amir

On Nov 5, 9:48 am, Amir <[EMAIL PROTECTED]> wrote:
> Hah...no worries and good check on the permissions query, I'm trying
> something new today as well as hard-coding a location to see if my app
> can sniff it out.  I'll let everyone know about the outcome!
>
> Amir
>
> On Nov 4, 5:42 pm, C-LIS Keiji Ariyama <[EMAIL PROTECTED]> wrote:
>
> >Amir, I'm sorry...
>
> > > permissions are acquired:
> > > Network communication (full)
> > > Your location (fine (GPS), coarse (network-based) location)
>
> > Keiji,
>
> >Amirwrote:
> > > Hi Guillaume,
>
> > > Thanks for your reply and yes the standard map application manager
> > > does display my location on the G1, but my application doesn't allow
> > > display to my website just yet.  Any thoughts you may have that might
> > > help?
>
> > > What I see on the device is the GPS icon is turned on when my
> > > application is running, but no data is transmitted to my Google map
> > > that's on my website where I can track where I am.
>
> > > Cheers
> > >Amir
>
> > > On Nov 4, 12:17 pm, "Guillaume Perrot" <[EMAIL PROTECTED]>
> > > wrote:
>
> > >> Did you check if the standard map application manages to display your
> > >> location ?
>
> > >> 2008/11/4Amir<[EMAIL PROTECTED]>
>
> > >>> Thanks, I'm still having issues, but now I do see the GPS 'icon' as
> > >>> turned on when the application is running.  The issue though is that I
> > >>> don't get anything on the map through our online site...no longitude
> > >>> and latitude, or anything else.
>
> > >>> Here's the revised code I'm using:
>
> > >>> package org.gw.service;
>
> > >>> import android.content.Context;
> > >>> import android.location.Location;
> > >>> import android.location.LocationManager;
>
> > >>> public class LocationService extends AService {
> > >>>  LocationManager lm = null;
> > >>>  Location loc = null;
> > >>>  public int excute() {
> > >>> getDataMap().put(Command, LOCATION);
>
> > >>> if (isOk()) {
> > >>>   lm = (LocationManager)
> > >>> getContext().getSystemService(Context.LOCATION_SERVICE);
> > >>>   loc = lm.getLastKnownLocation("gps");
> > >>>  if(loc == null)
> > >>>loc = lm.getLastKnownLocation("network");
> > >>>  double sLatitude = loc.getLatitude();
> > >>>double sLongitude = loc.getLongitude();
> > >>> String location = sLatitude+","+sLongitude;
> > >>>  //location = "40.738412973944534,-73.98468017578125";
> > >>> getDataMap().put(Des, "OK");
> > >>> getDataMap().put(Value, location);
> > >>>  } else {
> > >>> getDataMap().put(Des, "error password!!");
> > >>> }
> > >>>  new ServiceClient(this).excute();
>
> > >>> return 0;
> > >>> }
> > >>> }
>
> > >>> On Nov 2, 8:46 am, Akbur <[EMAIL PROTECTED]> wrote:
>
> > Amir,
>
> >  I've developed a similar app just for kicks (so the wife can keep
> >  track of me) ;)
>
> >  I did the following:
>
> >  LocationManager lm = (LocationManager)
> >  context.getSystemService(Context.LOCATION_SERVICE);
>
> >  Location loc = lm.getLastKnownLocation("gps");
> >  if (loc == null)
> >  {
> >  locType = "Network";
> >  loc = 
> >  lm.getLastKnownLocation("network");
> >  }
>
> >  In this case if the GPS service does not have a fix or is switched
> >  off, the network, though not as accurate as GPS should be active and
> >  give you an approximate location.
>
> >  All the best,
> >  Akbur
>
> >  On Nov 2, 11:45 am, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
>
> > > It can take a while to the G1 to init the gps and return a fix.
> > > And you must see the sky for the GPS to work.
> > > Your code and permissions seem correct, try using the network provider
> > > to test (which is faster and work in buildings unlike the GPS).
> > > Make sure GPS location provider is enabled on the phone settings.
> > > You can check your location with the standard map application.
>
> > > On Nov 2, 5:42 am, C-LIS Keiji Ariyama <[EMAIL PROTECTED]> wrote:
>
> > >> HiAm

[android-developers] Garbage Collection monitoring

2008-11-06 Thread [EMAIL PROTECTED]

while we're developing an application,

some time the program flow would be lag,

and we found that the lag is happening while GC is running.

and sometime we figure out that GC is running frequently

is there any tool to monitoring or profiling where the garbage coming
from.

what package, what class or even what method


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



[android-developers] Re: how to kill activity in android

2008-11-06 Thread brs



On Nov 6, 9:02 pm, forrestxu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have question. For test purpose, I want to kill an activity of an
> android application when it is paused or stopped to simulate the
> android system kill an activity when it is in low resource.
>
> How to it?
>

I don't think there generally is a way to kill an activity from the
outside. Have you tried to see what happens if the activity calls
finish()? Another way to simulate the system responding to low memory
is to actually cause the real condition: write a memory-hog activity
which does nothing but allocate memory until the system runs out of
it...


Bernhard

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



[android-developers] Re: Where is the android.jar source

2008-11-06 Thread NY

thx~~

On 11月7日, 上午11时24分, "Evan JIANG" <[EMAIL PROTECTED]> wrote:
> frameworks/base/core/java/android
>
> Regards,
> Evan JIANG
>
>
>
> On Fri, Nov 7, 2008 at 11:22 AM, NY <[EMAIL PROTECTED]> wrote:
>
> > I visit git.source.android.com
> > want to find the source of android.jar
> > such as the package android.app, android.widget
> > but I can not find them
> > where are they?
> > thx- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TextView.SavedState example?

2008-11-06 Thread Craig

Yes, a static class, not a static variable - in my workaround (I
wouldn't really call it a solution) my state object and its parent did
not share state, but they both have the information to set the other's
state.

On Nov 6, 9:54 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> hackbod wrote:
> > A static variable is almost certainly not going to do what you want --
> > one of the big reasons for all of this is to be able to restore state
> > if the process is killed, and if you are putting stuff in a static
> > variable then that will all go away with the process when it is
> > killed.
>
> Actually, he said an "inner static Parcelable class", not a static
> variable. He's using it as the response from the Activity
> onSaveInstanceState(), holding his View's state inside it, if I
> understand his solution correctly.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where is the android.jar source

2008-11-06 Thread Evan JIANG
frameworks/base/core/java/android

Regards,
Evan JIANG

On Fri, Nov 7, 2008 at 11:22 AM, NY <[EMAIL PROTECTED]> wrote:

>
> I visit git.source.android.com
> want to find the source of android.jar
> such as the package android.app, android.widget
> but I can not find them
> where are they?
> thx
> >
>

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



[android-developers] Where is the android.jar source

2008-11-06 Thread NY

I visit git.source.android.com
want to find the source of android.jar
such as the package android.app, android.widget
but I can not find them
where are they?
thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How can I set selection highlight in a ListActivity

2008-11-06 Thread NY

Such as I click the the first select item
but I want to highlight the second and the third
Can I do 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Button Resource Invalid?

2008-11-06 Thread joshbeck

Ok, I am trying to get a button to pop up. When I add :

 b.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
int z = 5;
}

Logcat tells me the resource is invalid.
Code:

 b.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
int z = 5;
}
}

XML: <-- I have a strong hunch I'm doing something wrong here.
(Everything is right up to
the button entry)


http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">





 


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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Recorder Audio

2008-11-06 Thread Dave

Audio recording support is a bit rough in 1.0. The AMR-NB file format
is described here:

http://www.ietf.org/rfc/rfc3267.txt

It's just a simple header appended to the raw AMR stream.

On Nov 4, 1:55 am, mesak82 <[EMAIL PROTECTED]> wrote:
> I'm using Sound Recorder application and after recording I cannot see
> that audio in the playback list in Music application, but it's on the
> SD card.
>
> Sound Recorder also stores recorded audio in raw format? Is it
> expected not to see the recorded file in playback lists?
>
> Rgrds,
> Misa
>
> > if u are just receiving the data from recorder and storing it in raw
> > format it wont play; requires other magic headers to be placed
> > for .amrfile format;
>
> On Oct 28, 10:49 pm, gs_cmans <[EMAIL PROTECTED]> wrote:
>
> > >>> But the music media in Android can't play this format?
>
> > try save it as .3GPP and play it.
>
> > if u are just receiving the data from recorder and storing it in raw
> > format it wont play; requires other magic headers to be placed
> > for .amrfile format; refer IF2 documentation
>
> > -g
>
> > On Sep 22, 9:50 am, ZIN <[EMAIL PROTECTED]> wrote:
>
> > > I saw in the properties MediaRecorder.AudioEncoder.AMR_NB, so the only
> > > format audio recorder type is .AMR
> > > But the music media in Android can't play this format?
> > > What can i solve this problem?- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AACPlus - Decoding a Stream? - Anyone Shoutcast?

2008-11-06 Thread Dave

The codecs are there. The issue is that ShoutCast doesn't use HTTP1.1
protocol for streaming. You could probably hack up a proxy to make it
work though.

Also, there is no support for extracting metadata tags from a live
stream (for artist, title, etc).

On Nov 4, 4:45 pm, Jona <[EMAIL PROTECTED]> wrote:
> OpenCORE includes:
> • PV’s multimedia platform, including interfaces for
> third-party and hardware media codecs, input and
> output devices and content policies
> • Media playback, streaming, downloading and
> progressive playback—including 3GPP, MPEG-4,
> AAC and MP3 containers
> • Media streaming, downloading and progressive
> playback—including 3GPP, HTTP and RTSP/RTP
> • Video and image encoders and decoders:
> MPEG-4, H.263 and AVC (H.264), JPEG
> • Speech codecs: AMR-NB and AMR-WB
> • Audio codecs: MP3, AAC, AAC+
> • Media recording: 3GPP, MPEG-4 and JPEG
> • Video telephony based on 324-M standard
> • PV test framework to ensure robustness and stability;
> profiling tools for memory and CPU usage
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TextView.SavedState example?

2008-11-06 Thread Mark Murphy

hackbod wrote:
> A static variable is almost certainly not going to do what you want --
> one of the big reasons for all of this is to be able to restore state
> if the process is killed, and if you are putting stuff in a static
> variable then that will all go away with the process when it is
> killed.

Actually, he said an "inner static Parcelable class", not a static 
variable. He's using it as the response from the Activity 
onSaveInstanceState(), holding his View's state inside it, if I 
understand his solution correctly.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: android market publish button does not work

2008-11-06 Thread samlu

I had the same problem on IE.
Please use Google's web browser or Firefox. It should be ok.

Sam

On Nov 7, 10:03 am, sori <[EMAIL PROTECTED]> wrote:
> I finally got my application ready for distribution.
> I filled up all fields in the market upload page, then pressed
> "Publish" button.
> There is no reaction.  No confirmation or no error message at all.
>
> Is this expected behavior or the server temporarily down?
> Please let me know if I miss anything here.
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to evoke pv logger

2008-11-06 Thread Dave

To turn on PV logging, change extlibs/pv/oscl/pvlogger/src/pvlogger.h:

/* Release mode-- No logging */
#define PVLOGGER_INST_LEVEL 0  Change this value to 5

and extlibs/pv/android/thread_init.cpp:

#if 0- Change this value to 1
PVLoggerAppender *appender = new
AndroidLogAppender();
...
...
#endif

I haven't tried this in awhile, not sure if it still works.

On Nov 5, 12:07 am, already <[EMAIL PROTECTED]> wrote:
> hello, I want to see the pv logs while debug.
> I see in pv part, the logger is always printed as:
> PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
> (0,"PVAuthorEngine::SetLogAppender"));
> but can not find how to enable pv log, and where it is printed,
> Is there any body knowing about this?
>
> Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using an autocomplete filled with information from a database query

2008-11-06 Thread Juan David Trujillo C.

Hi all!!

I want to create an autocomplete that gets its information from a
database query.  I have a database method that returns the Cursor
(with name, value and date fields) I need, but I dont know how to
actually fill it, so it works as expected as the Contacts API demo:
http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/AutoComplete4.html

I want the autocomplete to show the name field from the database
query.

I read the following thread, but still haven't been able to figure it
out.

http://groups.google.com/group/android-developers/browse_thread/thread/7ed8593be568d86e/3485e65aadfc7c77?lnk=gst&q=autocomplete#3485e65aadfc7c77

I have to use the methods:
runQueryOnBackgroundThread, convertToString, among others and extend
extends SimpleCursorAdapter, but I still don't know how to actually
use it.

Appreciate any help provided!!!

Best regards,

Juan


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



[android-developers] Re: Help: thread stuck with error "still suspended after undo (s=1 d=1)"

2008-11-06 Thread denismo

Thanks for the reply.

I don't have the broken APK, I fixed it yesterday. If I remember
correctly, it had something to do with Cursor.getLong being invoked
after the Cursor has been closed. Or may be with
ContentResolver.delete in the middle of traversal by Cursor. I
couldn't realize - I just rewrote the function in a different manner
and it worked fine.

Denis

On Nov 7, 11:22 am, fadden <[EMAIL PROTECTED]> wrote:
> On Nov 6, 4:24 am, denismo <[EMAIL PROTECTED]> wrote:
>
> > LogCat continuously reports this error:
> > 11-06 12:20:57.999: DEBUG/dalvikvm(834): threadid=3: still suspended
> > after undo (s=1 d=1)
>
> There's a weird interaction between the VM and your debugger.  The
> thread suspended itself and then waited to be woken.  However, when it
> was woken the thread was still marked as being suspended (s=1) by the
> debugger (d=1).
>
> If you have an APK that reaches this state repeatably I'd be
> interested in taking a look at it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to get the position of a specific element in a spinner based on the element's text

2008-11-06 Thread Juan David Trujillo C.

Hi guys!

Does anyone know how to get the position of a specific element in a
spinner based on the element's text:
Example: Given the following Spinner:
position   element
0Blue
1Red
2Yellow
3Black
4Brown

How do I get the position the element Red occupies? The method should
return 1 in this case.
I've been exploring the following method, without any luck:
public int getPositionForView(View view)
Get the position within the adapter's data set for the view, where
view is a an adapter item or a descendant of an adapter item.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TextView.SavedState example?

2008-11-06 Thread hackbod

A static variable is almost certainly not going to do what you want --
one of the big reasons for all of this is to be able to restore state
if the process is killed, and if you are putting stuff in a static
variable then that will all go away with the process when it is
killed.

Unfortunately it does look like there is an issue in TextView with
this, which I will need to think about how to fix.  There are a lot of
optimizations going on to avoid creating, saving, and restoring state
objects unless they are needed...  unfortunately this causes trouble
for people deriving from TextView.  Technically what you are supposed
to do is take the state object returned by the super class, write it
in your own state object, and hand it back to the super class when
restoring state.  The optimization to return null when there is no
state to save is breaking that.

One simple thing you could do is call TextView.setFreezesText() when
you are initializing your subclass.  This tells the text view it
should store its entire text in the state, which will force it to
always save its state.

On Nov 6, 5:07 pm, Craig <[EMAIL PROTECTED]> wrote:
> I have a workaround, but if anyone figures this out I'd love to see
> it.
>
> I have an inner static Parcelable class in my View to hold the view
> state. From my Activity's onSaveInstanceState, I create that
> Parcelable using a ctor that takes that View, and on my Activity's
> onRestoreInstanceState I call a method on my View that takes the
> Parcelable as an argument.
>
> This seems to work, and it's not terribly messy, but it doesn't seem
> quite right, either. Again, someone please post an example if you've
> figured this out already.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android market publish button does not work

2008-11-06 Thread sori

I finally got my application ready for distribution.
I filled up all fields in the market upload page, then pressed
"Publish" button.
There is no reaction.  No confirmation or no error message at all.

Is this expected behavior or the server temporarily down?
Please let me know if I miss anything here.
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to kill activity in android

2008-11-06 Thread forrestxu

Hi,

I have question. For test purpose, I want to kill an activity of an
android application when it is paused or stopped to simulate the
android system kill an activity when it is in low resource.

How to it?

Regards,

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



[android-developers] Re: Facebook notification app while we wait for a facebook app

2008-11-06 Thread Dan B.

The structure of Facebook makes that very difficult, applications have
to request a private key from the Facebook server rather than using a
normal login in order ro protect the account logins from hacking.
Check out the Market app "Statisinator" to see what I mean.

On Nov 6, 7:00 pm, DigiJeff <[EMAIL PROTECTED]> wrote:
> Developers can someone please develop a simple facebook app that
> notifies us facebook users about new messages, wall posts etc?
>
> It really sucks going from a Blackberry Curve and losing my facebook
> app which notifies me about new facebook stuff.
>
> Facebook needs to stop being such snobs and create a facebook app for
> android already, but in the meantime can someone develop this?
>
> Also have it update status and upload pictures would be awesome while
> waiting.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Thread Question

2008-11-06 Thread joshbeck

First, thanks.
I tried blocking the main thread, and quickly determined it wasn't
a good idea.  Didn't solve anything, but hey at least I know now.

Here's what I'm working on:
I have an application.
It downloads a bunch of data and then loads that data into variables
which
are used to present the user with an initial display.

If I load the variables and show the display the screen just goes
black for like
20-30 seconds.

If I background the thread, the variables aren't loaded prior to the
display being drawn.

Ideally, I'd like to use the progressbar  to show a loading screen,
but the loading bar
doesn't show up unless the primary view is ready.

I'm think the solution is to have the program start an initial
activity that is small and prompts
the user for a button press. That button press then activates a thread/
progress bar which
in turn uses an intent to open the "primary" view.

Make sense?

If I have two separate activity files working in the same project, can
I create public variables that are shared?

Thanks,
Josh Beck



On Nov 6, 1:44 pm, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> You should not use the following in your case but there is a simple
> way to wait for a thread to complete, it's the Thread.join() function.
> This should be called only in a background thread which need to
> synchronize with another background thread for some reason.
> You should (i'd say must) never call blocking functions in the main
> thread.
>
> On Nov 6, 8:53 am, hackbod <[EMAIL PROTECTED]> wrote:
>
> >http://code.google.com/android/intro/appmodel.html
>
> > The last section is on threads, though it's strongly recommended you
> > read the whole thing.
>
> > On Nov 5, 9:58 pm, joshbeck <[EMAIL PROTECTED]> wrote:
>
> > > I'm fairly new at this and just to the point where threading makes
> > > sense.
> > > So, my my main process is also considered a thread?
>
> > > True --- False
>
> > > I write a simple HelloWorld.java program.
> > > This program has 1 thread, the main flow of execution.
>
> > > ?
>
> > > Thanks,
> > > Josh
>
> > > On Nov 5, 7:26 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > > If the thread takes a while to complete, your main application thread
> > > > probably shouldn't wait for it to complete...  otherwise, what's the
> > > > point of putting that work in the thread, if you're just going to
> > > > block on it at some point.
>
> > > > Instead, consider using a Handler to post a message back to the main
> > > > thread when the background thread has finished its work.
>
> > > > On Nov 5, 3:54 pm, joshbeck <[EMAIL PROTECTED]> wrote:
>
> > > > > I have a function that utilizes a thread.
>
> > > > > A variable the is needed for the program is populated after the thread
> > > > > call is made.
>
> > > > > The thread takes a while to complete.
>
> > > > > How can I make the program wait for a thread to complete before moving
> > > > > on?
>
> > > > > Thanks,
> > > > > Josh Beck
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TextView.SavedState example?

2008-11-06 Thread Craig

I have a workaround, but if anyone figures this out I'd love to see
it.

I have an inner static Parcelable class in my View to hold the view
state. From my Activity's onSaveInstanceState, I create that
Parcelable using a ctor that takes that View, and on my Activity's
onRestoreInstanceState I call a method on my View that takes the
Parcelable as an argument.

This seems to work, and it's not terribly messy, but it doesn't seem
quite right, either. Again, someone please post an example if you've
figured this out already.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Facebook notification app while we wait for a facebook app

2008-11-06 Thread DigiJeff

Developers can someone please develop a simple facebook app that
notifies us facebook users about new messages, wall posts etc?

It really sucks going from a Blackberry Curve and losing my facebook
app which notifies me about new facebook stuff.

Facebook needs to stop being such snobs and create a facebook app for
android already, but in the meantime can someone develop this?

Also have it update status and upload pictures would be awesome while
waiting.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Problem with viewing map in tabhost

2008-11-06 Thread Friso Kluit
Hi,

I created an application that uses the TabHost to show 3 tabs, the tabs showing 
an AnalogClock (widget) and ListView are working, but the tab that should show 
the MapView returns an 'java.lang.VerifyError'  when it is selected.  The Api 
key provided is correct, it is based on the debug.keystore and works in other 
applications.

Can anyone give a hint on what I am doing wrong?

Cheers,
Friso

My code is as follows:
  public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);

final TabHost tabs=(TabHost)findViewById(R.id.tabhost);

tabs.setup();

TabHost.TabSpec mapSpec=tabs.newTabSpec("tag1");
mapSpec.setContent(new TabHost.TabContentFactory() {
  public View createTabContent(String tag) {
return(new MapView(Pidget.this, "ABCDEF"));
  }
});
mapSpec.setIndicator("Map");
tabs.addTab(mapSpec);


TabHost.TabSpec infoSpec=tabs.newTabSpec("tag1");
infoSpec.setContent(new TabHost.TabContentFactory() {
  public View createTabContent(String tag) {
return(new AnalogClock(Pidget.this));
  }
});
infoSpec.setIndicator("Info");
tabs.addTab(infoSpec);

TabHost.TabSpec helpSpec=tabs.newTabSpec("tag1");
helpSpec.setContent(new TabHost.TabContentFactory() {
  public View createTabContent(String tag) {
return(new ListView(Pidget.this));
  }
});
helpSpec.setIndicator("Help");
tabs.addTab(helpSpec);
  }
}




Friso Kluit | Academic Staff
School of Information & Communications Technology
Republic Polytechnic
t: 3100 1797 | f: 6415 1310

P Do you really need to print this e-mail?




Republic Polytechnic, 9 Woodlands Avenue 9, Singapore 738964 (Near Woodlands 
MRT/Interchange).
www.rp.sg . Fax: +65 6415-1310 .

Republic Polytechnic, the first Institute of Higher Learning to fully adopt the 
Problem-Based Learning approach in Singapore, continues to strive towards best 
practices and maintain excellence in service standards with the following 
certifications: Singapore Innovation Class (SIC), Singapore Quality Class 
(SQC), People Developer Standards and QEHS (ISO 9001, 14001 and OHSAS 18001)

CONFIDENTIALITY CAUTION: This message is intended only for the use of the 
individual or entity to whom it is addressed and contains information that is 
privileged and confidential. If you, the reader of this message, are not the 
intended recipient, you should not disseminate, distribute or copy this 
communication. If you have received this communication in error, please notify 
us immediately by return email and delete the original message. Thank you.




Friso Kluit | Academic Staff
School of Information & Communications Technology
Republic Polytechnic
t: 3100 1797 | f: 6415 1310

P Do you really need to print this e-mail?




Republic Polytechnic, 9 Woodlands Avenue 9, Singapore 738964 (Near Woodlands 
MRT/Interchange).
www.rp.sg . Fax: +65 6415-1310 .

Republic Polytechnic, the first Institute of Higher Learning to fully adopt the 
Problem-Based Learning approach in Singapore, continues to strive towards best 
practices and maintain excellence in service standards with the following 
certifications: Singapore Innovation Class (SIC), Singapore Quality Class 
(SQC), People Developer Standards and QEHS (ISO 9001, 14001 and OHSAS 18001)

CONFIDENTIALITY CAUTION: This message is intended only for the use of the 
individual or entity to whom it is addressed and contains information that is 
privileged and confidential. If you, the reader of this message, are not the 
intended recipient, you should not disseminate, distribute or copy this 
communication. If you have received this communication in error, please notify 
us immediately by return email and delete the original message. Thank you.

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



[android-developers] Re: TextView.SavedState example?

2008-11-06 Thread Craig

> Can you just skip chaining upward to the superclass?

Unfortunately, no:

11-07 00:30:58.868: ERROR/AndroidRuntime(207): Caused by:
java.lang.IllegalStateException: Derived class did not call
super.onRestoreInstanceState()
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.View.dispatchRestoreInstanceState(View.java:5016)
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1077)
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1077)
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.View.restoreHierarchyState(View.java:4993)



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



[android-developers] Re: Favorites list

2008-11-06 Thread Khaled Sliman
Oh I see, but is there a way to remove or add data to that list using the
SDK, I think I got the adding data to list part, but removing it looks like
a whole different story.

On Thu, Nov 6, 2008 at 5:44 PM, Romain Guy <[EMAIL PROTECTED]> wrote:

>
> Because you don't have enough favorites. It will get better and more
> refined over time.
>
> On Thu, Nov 6, 2008 at 1:53 PM, Khaled Sliman <[EMAIL PROTECTED]>
> wrote:
> > Yeah but if you call some one even once, the go in the favorites list, or
> I
> > am I missing something
> >
> > On Wed, Nov 5, 2008 at 10:28 PM, Romain Guy <[EMAIL PROTECTED]>
> wrote:
> >>
> >> The favorites list does not contain the name of all people you
> >> call/that call you. It contains the name of the people you call *the
> >> most*.
> >>
> >> On Wed, Nov 5, 2008 at 1:12 PM, [EMAIL PROTECTED]
> >> <[EMAIL PROTECTED]> wrote:
> >> >
> >> > Hi all
> >> >
> >> > I was wondering if anyone can point me in the right direction, I have
> >> > come across a very annyoing feature in the default dialer, it seem to
> >> > want to add anyone you call from your contacts list to the favorites
> >> > list, even if you call this person once, worse yet if the person calls
> >> > you and there name is in the phone book, they get added to your
> >> > favorites. Is there a way to programitcly access the Favorites list in
> >> > the dialer program and clear and or remove the names from that list.
> >> >
> >> >
> >> > any help would be appreciated.. Thanks
> >> >
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Romain Guy
> >> www.curious-creature.org
> >> >>
> >
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>
> >
>

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



[android-developers] Re: TextView.SavedState example?

2008-11-06 Thread Craig

> Can you just skip chaining upward to the superclass?

Unfortunately, no:

11-07 00:30:58.868: ERROR/AndroidRuntime(207): Caused by:
java.lang.IllegalStateException: Derived class did not call
super.onRestoreInstanceState()
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.View.dispatchRestoreInstanceState(View.java:5016)
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1077)
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1077)
11-07 00:30:58.868: ERROR/AndroidRuntime(207): at
android.view.View.restoreHierarchyState(View.java:4993)



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



[android-developers] Re: Need help using hat to track down memory usage

2008-11-06 Thread fadden

On Nov 5, 11:12 am, Disco Stu 010 <[EMAIL PROTECTED]> wrote:
> java.io.IOException: Version string not recognized at byte 17
>         at hat.parser.HprofReader.readVersionHeader(HprofReader.java:325)
>         at hat.parser.HprofReader.read(HprofReader.java:169)
>         at hat.parser.Reader.readFile(Reader.java:90)
>         at hat.Main.main(Main.java:149)

The output isn't compatible.  Unfortunately we were not able to
include the modified "hat" tool in the 1.0 source release.

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



[android-developers] Re: Help: thread stuck with error "still suspended after undo (s=1 d=1)"

2008-11-06 Thread fadden

On Nov 6, 4:24 am, denismo <[EMAIL PROTECTED]> wrote:
> LogCat continuously reports this error:
> 11-06 12:20:57.999: DEBUG/dalvikvm(834): threadid=3: still suspended
> after undo (s=1 d=1)

There's a weird interaction between the VM and your debugger.  The
thread suspended itself and then waited to be woken.  However, when it
was woken the thread was still marked as being suspended (s=1) by the
debugger (d=1).

If you have an APK that reaches this state repeatably I'd be
interested in taking a look at it.

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



[android-developers] Re: Browser extensions i Java? YES, NO, Some?

2008-11-06 Thread Peli

I'd be happy if I was given at least a chance to take a glimpse at the
xml document, and if it is not a feed, I'd be happy to return it back
to the browser to let it display the raw xml file.

But I see that this does not sound so straightforward using only
intents, so probably this is a wish for later...

Peli

On Nov 6, 8:05 pm, Michael <[EMAIL PROTECTED]> wrote:
> I would think that you WANT the browser to show those.  Lots of sites
> use that mimetype because the browser will display it.
>
> It'd be better for you to find another solution to send these links at
> your application.  I mean, a desktop browser works the same way as
> Android's does here.  And installing your own handler for this
> mimetype would certainly break other things - not a good solution.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Use Bundle to Pass Bitmap

2008-11-06 Thread joshbeck

Is it possible to pass a bitmap between activities using a bundle?

Thanks,
Josh Beck

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



[android-developers] Re: Intercept Call

2008-11-06 Thread CJ

i don't think that is going to happen.

On Nov 6, 8:57 am, "BrunoZP.com" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I intercept a user call, change it number and dial again ?
> Any example code ??
>
> For example: The user dial 32546048 and press send, my application get
> this number, cancel the dialing, change this number to
> 3*2*5*4*6*0*4*8* and then dial !
>
> This needs to happen automatically, without the need of confirmations
> and other things..
>
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sdk activity life cycle picture inaccurate?

2008-11-06 Thread hackbod

You can use "adb logcat -b events" to see the event log for what the
activity manager is doing to try to understand what is going on.  Also
"adb shell dumpsys activity" will show you the current state of the
activity stack (at the top of the output).

My guess is that you are getting a second instance of the activity
being launched, with a different Intent.

On Nov 6, 8:51 am, CJ <[EMAIL PROTECTED]> wrote:
> according to the picture, for an regular activity, if onstop is called
> and ondestory is not called, there are only two ways to go: oncreate
> or onrestart. which means, if oncreate is called, the PROCESS is
> killed.
>
> here is my application: the activity starts a thread that runs in th
> background. then, i press the home key on the phone and click on my
> application icon again. according to the debugger, th oncreate is
> called which means the process has been killed. but, the debugger also
> shows that the thread has never been killed which also means the
> process has never been killed.
>
> does it suggest that the red box saying process is killed does not
> necessarily happen every time?
>
> can anybody explain?
>
> 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: adb shell permissions on real G1 device

2008-11-06 Thread hackbod

Unfortunately there is no way to get to app-private files from the
shell in 1.0.  You can create those files as word readable though.

On Nov 6, 11:18 am, "Bradley Kite" <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> Yes there is a reason. I'm working on an application that requires
> wifi access and cannot be used within the emulator.
>
> There must be a way around this?
>
> Regards
> --
> Brad.
>
> On 06/11/2008, Michael <[EMAIL PROTECTED]> wrote:
>
>
>
> >  That's pretty intentional.  Is there some reason you can't use the
> >  emulator for 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Extend a EditText to create an editable view performing operation onKeyDown

2008-11-06 Thread hackbod

You need to implement the constructor used for inflating from XML --
look at the View constructors for the appropriate one.

Also generally this kind of thing is better done by attaching
listeners (of which TextView offers a whole host) rather than
subclassing.

On Nov 6, 11:38 am, polo777 <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I am trying desperately to extend the EditText view to override
> onKeyDown. My goal is to create an EditText that will update UI
> elements each time the user will type one character within.
>
> The code is as simple as that:
>
> public class SearchView extends EditText
> {
>         public SearchView(Context context)
>         {
>                 super(context);
>         }
>
>     [EMAIL PROTECTED]
>      public boolean onKeyDown(int keyCode, KeyEvent event)
>      {
>          // the code (right now nothing)
>          return true;
>      }
>
> }
>
> The main package is "com.android.polo.myApp"
> It is located in the package "com.android.polo.myApp.view"
>
> Here is the "View.xml" using this new view:
>
>     http://schemas.android.com/apk/res/
> android"
>         android:orientation="horizontal"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content">
>
>                          android:id="@+id/searchTextView"
>                 android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"/>
>
>     
>
> I got this error:
>
> 11-06 19:00:21.555: ERROR/AndroidRuntime(1207):
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo.. android.view.InflateException: Binary XML file
> line #28: Error inflating class com.android.polo.myApp.view.SearchView
> 
> 11-06 19:00:21.555: ERROR/AndroidRuntime(1207): Caused by:
> android.view.InflateException: Binary XML file line #28: Error
> inflating class com.android.polo.MyApp.view.SearchView
> ..
> 11-06 19:00:21.555: ERROR/AndroidRuntime(1207): Caused by:
> java.lang.NoSuchMethodException: SearchView
>
> Thanks a lot in advance
> Polo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to set up as a straight vertical display

2008-11-06 Thread hackbod

Fwiw, if this is a constant value, it is better to set it in your
manifest with android:screenOrientation.

On Nov 6, 12:20 am, songs <[EMAIL PROTECTED]> wrote:
> You probably want to put the following in your activity's onCreate:
>
>    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
>
> Cheers,
> Steve
>
> On Nov 5, 11:28 pm, "dailyLife"<[EMAIL PROTECTED]> wrote:
>
> > Hi,EveryOne.
> >   Today, I finally had to buy the G1, I have to write the software 
> > installed on the G1 above to see results, every time I open the keyboard, 
> > software, images are also displayed along with change.
>
> > Who can tell me how to set up as a straight vertical display shows that 
> > even open the keyboard show the same way.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Favorites list

2008-11-06 Thread Romain Guy

Because you don't have enough favorites. It will get better and more
refined over time.

On Thu, Nov 6, 2008 at 1:53 PM, Khaled Sliman <[EMAIL PROTECTED]> wrote:
> Yeah but if you call some one even once, the go in the favorites list, or I
> am I missing something
>
> On Wed, Nov 5, 2008 at 10:28 PM, Romain Guy <[EMAIL PROTECTED]> wrote:
>>
>> The favorites list does not contain the name of all people you
>> call/that call you. It contains the name of the people you call *the
>> most*.
>>
>> On Wed, Nov 5, 2008 at 1:12 PM, [EMAIL PROTECTED]
>> <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi all
>> >
>> > I was wondering if anyone can point me in the right direction, I have
>> > come across a very annyoing feature in the default dialer, it seem to
>> > want to add anyone you call from your contacts list to the favorites
>> > list, even if you call this person once, worse yet if the person calls
>> > you and there name is in the phone book, they get added to your
>> > favorites. Is there a way to programitcly access the Favorites list in
>> > the dialer program and clear and or remove the names from that list.
>> >
>> >
>> > any help would be appreciated.. Thanks
>> >
>> > >
>> >
>>
>>
>>
>> --
>> Romain Guy
>> www.curious-creature.org
>> >>
>



-- 
Romain Guy
www.curious-creature.org

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



[android-developers] G-cube?

2008-11-06 Thread hyc

Any other autocross/road-racing fans here? Does anyone remember the G-
Tech or G-Cube accelerometers used to measure car performance?

Would be really nice to have a program like this

http://www1.pacific.edu/~j-lee10/Data%20Analysis.htm

that can log the accelerometer data and plot a map of your driving.
Correlate with GPS and superimpose on an image of the race track. It
doesn't need to do the DSP in realtime, just needs to be able to log
the sensor values to the SD card for later crunching...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Request for developers HTC G1 (T-Mobile) review

2008-11-06 Thread Eric

It seems unlikely that any information on skipping the firmware
signature check will ever be released by HTC or Google, since that
would defeat the purpose of the signature check.

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



[android-developers] Re: Favorites list

2008-11-06 Thread Khaled Sliman
Yeah but if you call some one even once, the go in the favorites list, or I
am I missing something

On Wed, Nov 5, 2008 at 10:28 PM, Romain Guy <[EMAIL PROTECTED]> wrote:

>
> The favorites list does not contain the name of all people you
> call/that call you. It contains the name of the people you call *the
> most*.
>
> On Wed, Nov 5, 2008 at 1:12 PM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi all
> >
> > I was wondering if anyone can point me in the right direction, I have
> > come across a very annyoing feature in the default dialer, it seem to
> > want to add anyone you call from your contacts list to the favorites
> > list, even if you call this person once, worse yet if the person calls
> > you and there name is in the phone book, they get added to your
> > favorites. Is there a way to programitcly access the Favorites list in
> > the dialer program and clear and or remove the names from that list.
> >
> >
> > any help would be appreciated.. Thanks
> >
> > >
> >
>
>
>
> --
> Romain Guy
> www.curious-creature.org
>
> >
>

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



[android-developers] Re: "hooking" to the PHONE button

2008-11-06 Thread Declan Shanaghy
Now you're just arguing semantics.
I never said he could steal it, that would be quite a stupid thing for the
OS to allow.

Registering for that Intent allows him to do what he wants in the context of
when he is allowed to do it.
Therefore it answers his question (or at least gets him as close as he is
ever going to get)



On Wed, Nov 5, 2008 at 11:09 AM, hackbod <[EMAIL PROTECTED]> wrote:

>
> It's not the same, you can't steal it from everyone.  This only
> happens when the currently focused app doesn't do anything special
> with the phone key.  The home key, in contrast, can not be handled by
> the foreground app -- it always starts the home activity.
>
> On Nov 5, 10:09 am, "Declan Shanaghy" <[EMAIL PROTECTED]> wrote:
> > Well that would imply that the default handling is setup they way i
> > suggested it should be!  ;-P
> >
> > @simonsh
> > There's your answer!
> >
> > On Tue, Nov 4, 2008 at 6:09 PM, hackbod <[EMAIL PROTECTED]> wrote:
> >
> > > Oh the -default- handling of the green key is this:
> >
> > >private void startCallActivity() {
> > >Intent intent = new Intent(Intent.ACTION_CALL_BUTTON);
> > >intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> > >getContext().startActivity(intent);
> > >}
> >
> > > So you can write an activity that implements that action.  You can -
> > > not- however generally intercept the green key: if the app handles it
> > > yourself (such as pressing the green key while highlighting a phone
> > > number to place a call) you won't run.
> >
> > > On Nov 4, 4:23 pm, "Declan Shanaghy" <[EMAIL PROTECTED]> wrote:
> > > > It doesn't seem that way.
> > > > No matter what application I am in if I press the green phone button
> the
> > > > recent call log comes up.
> >
> > > > What about when the user is on the home screen?
> >
> > > > On Tue, Nov 4, 2008 at 12:22 AM, hackbod <[EMAIL PROTECTED]> wrote:
> >
> > > > > The green phone key is for use by the foreground application.
> >
> > > > > On Nov 3, 7:34 pm, "Declan Shanaghy" <[EMAIL PROTECTED]> wrote:
> > > > > > It shouldnt be "stolen" but it should be overridable.
> > > > > > Much like the app picker behaves when multiple apps are
> registered
> > > for an
> > > > > > Intent.
> >
> > > > > > I dont know how the internals of how the off hook button works
> but
> > > > > couldnt
> > > > > > it broadcast an Intent to go "off hook" which then can be handled
> > > like
> > > > > any
> > > > > > other intent. To avoid the annoying situation of having to choose
> an
> > > app
> > > > > > every time a changeable default could be setup.
> > > > > > (Like how RingDroid replaces the default ringtone picker)
> >
> > > > > > On Mon, Nov 3, 2008 at 3:15 PM, hackbod <[EMAIL PROTECTED]>
> wrote:
> >
> > > > > > > Correct, you can't steal it from other apps.  When your apps is
> in
> > > the
> > > > > > > foreground, however, you will see the key as a normal key event
> > > that
> > > > > > > you can process however you want.
> >
> > > > > > > On Nov 3, 1:11 pm, "Shawn" <[EMAIL PROTECTED]> wrote:
> > > > > > > > I don't think you would be allowed to remap the phone button
> that
> > > > > would
> > > > > > > force people to use your app even if they didn't want to and my
> be
> > > > > > > considered malacious. That's just an opinion though
> >
> > > > > > > > -Original Message-
> > > > > > > > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> >
> > > > > > > > Date: Mon, 3 Nov 2008 13:09:53
> > > > > > > > To: Android Developers
> > > > > > > > Subject: [android-developers] "hooking" to the PHONE button
> >
> > > > > > > > Hi,
> >
> > > > > > > > How can I make my own application run whenever the user
> presses
> > > the
> > > > > > > > green PHONE button ?
> >
> > > > > > > > TIA
> >
>

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



[android-developers] problem obtaining android source from windows/cygwin

2008-11-06 Thread dreamerBoy

bash-3.2$ /cygdrive/c/myRepo/repo init -u git://android.git.kernel.org/platform
/manifest.git
Traceback (most recent call last):
  File "/cygdrive/c/myRepo/repo", line 587, in 
main(sys.argv[1:])
  File "/cygdrive/c/myRepo/repo", line 554, in main
_Init(args)
  File "/cygdrive/c/myRepo/repo", line 173, in _Init
_CheckGitVersion()
  File "/cygdrive/c/myRepo/repo", line 202, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 593, in
__init__
errread, errwrite)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 1079, in
_execute_
child
raise child_exception
OSError: [Errno 2] No such file or directory

I wouldn't describe myself as a Python guru.  Has anyone been able to
overcome and fix this problem?

Thanks much.

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



[android-developers] Re: How to use WSDL web service in Android

2008-11-06 Thread opengl es

Hi,

I use KSOAP2 (you'll find more about KSOAP2 in forums/groups etc..)
It works great once you know how to deal with XSD and namespaces and
KvmSerializable

here is what i do:

   private static final String SOAP_ACTION = "MyMethod";
   private static final String METHOD_NAME = "MyMethod";
   private static final String NAMESPACE = "http://x.y.z/foo1/foo2";;
   private static final String NAMESPACE_SDO = "http://x.y.z/foo1/
foo2Sdo";

   /*
* note that within the emulated system, 127.0.0.1 refers to the
emulated
* device's own loopback interface. if you want to connect to your
host
* machine's "localhost", use the 10.0.2.2 alias instead. maybe
this
* explains your problems ?
*/
   private static final String URL = "http://10.0.2.2:/abc/
services/MyService";


   public void mymethodKSOAP(MyObject myObject) {

   SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

   request.addProperty("MyObject", myObject);

   SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
   envelope.dotNet = false;
   envelope.addMapping(NAMESPACE_SDO, "MyObject", (new
MyObject()).getClass());
   envelope.addMapping(NAMESPACE_SDO, "MyObjectId", (new
MyObjectId()).getClass());
   envelope.addMapping(NAMESPACE_SDO, "TheObjectResponse", (new
TheObjectResponse())
   .getClass());
   //etc
   // implements all your client java object (and responses
object) with 'implements KvmSerializable'
   // inside your client java object define the specific object
namespace sdo like
   // private static final String NAMESPACE = "http://x.y.z/foo1/
foo2Sdo";


   envelope.setOutputSoapObject(request);

   AndroidHttpTransport androidHttpTransport = new
AndroidHttpTransport(URL);

   try {
   androidHttpTransport.call(SOAP_ACTION, envelope);
   resultsRequestSOAP = envelope.getResponse();

   } catch (Exception e) {
   e.printStackTrace();
   }
   }

// and you're done

Note:
for KvmSerializable implementation
if you use simple type do

public void getPropertyInfo(int i, Hashtable hashtable, PropertyInfo
propertyinfo) {
   propertyinfo.namespace = NAMESPACE;
   switch (i) {
   case 0:
   propertyinfo.type = (new MyObjectId()).getClass();
   propertyinfo.name = "myObjectId";
   break;
   case 1:
   propertyinfo.type = PropertyInfo.STRING_CLASS;
   propertyinfo.name = "aStringField";
   break;
   case 2:
   propertyinfo.type = PropertyInfo.INTEGER_CLASS;
   propertyinfo.name = "aNumberField";
   break;
 // etc
}


Hope this will help you

Regards,
Franck


On Nov 6, 4:05 pm, "Avinash Patil" <[EMAIL PROTECTED]> wrote:
> I have simple WSDL web service file and added into project.
> Now I am trying to use WSDL web service through android class code,
> but not able to use it.
> Can anybody suggest how to import WSDL file in ANdroid, so that it can
> create auto classes for
> WSDL file and same can be used ion  android main class, where we can
> send and receive any request/response.
>
> Please suggest any simple WSDL use.
> Thanks a lot!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Thread Question

2008-11-06 Thread Guillaume Perrot

You should not use the following in your case but there is a simple
way to wait for a thread to complete, it's the Thread.join() function.
This should be called only in a background thread which need to
synchronize with another background thread for some reason.
You should (i'd say must) never call blocking functions in the main
thread.

On Nov 6, 8:53 am, hackbod <[EMAIL PROTECTED]> wrote:
> http://code.google.com/android/intro/appmodel.html
>
> The last section is on threads, though it's strongly recommended you
> read the whole thing.
>
> On Nov 5, 9:58 pm, joshbeck <[EMAIL PROTECTED]> wrote:
>
> > I'm fairly new at this and just to the point where threading makes
> > sense.
> > So, my my main process is also considered a thread?
>
> > True --- False
>
> > I write a simple HelloWorld.java program.
> > This program has 1 thread, the main flow of execution.
>
> > ?
>
> > Thanks,
> > Josh
>
> > On Nov 5, 7:26 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > If the thread takes a while to complete, your main application thread
> > > probably shouldn't wait for it to complete...  otherwise, what's the
> > > point of putting that work in the thread, if you're just going to
> > > block on it at some point.
>
> > > Instead, consider using a Handler to post a message back to the main
> > > thread when the background thread has finished its work.
>
> > > On Nov 5, 3:54 pm, joshbeck <[EMAIL PROTECTED]> wrote:
>
> > > > I have a function that utilizes a thread.
>
> > > > A variable the is needed for the program is populated after the thread
> > > > call is made.
>
> > > > The thread takes a while to complete.
>
> > > > How can I make the program wait for a thread to complete before moving
> > > > on?
>
> > > > Thanks,
> > > > Josh Beck
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to install software in the G1

2008-11-06 Thread HaleRazor

Yes, thanks Fish, I mistakenly said to run install when I should have
said adb -install...

On Nov 6, 10:57 am, "Fish Kungfu" <[EMAIL PROTECTED]> wrote:
> To install a compiled .apk file, you can just use the "adb" command.  It's
> explained here in the "Running an Android Application" about midways down:
>
> http://code.google.com/android/intro/develop-and-debug.html
>
> Cheers~~Fish~~
>
> On Thu, Nov 6, 2008 at 9:49 AM, HaleRazor <[EMAIL PROTECTED]> wrote:
>
> > First, you have to sign the .apk:
> >http://code.google.com/android/devel/sign-publish.html
>
> > After that is done, you will use the command line install that
> > comes with the SDK.  I think /? is the switch to get the command line
> > params.  I'm at work now and don't have the SDK installed here, so I'm
> > not 100% sure about that.
>
> > On Nov 6, 7:25 am, "dailyLife"<[EMAIL PROTECTED]> wrote:
> > > My os is Windows ,IEDeclipse
> > > How to install software in the  G1.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Extend a EditText to create an editable view performing operation onKeyDown

2008-11-06 Thread polo777

Hi Everyone,

I am trying desperately to extend the EditText view to override
onKeyDown. My goal is to create an EditText that will update UI
elements each time the user will type one character within.

The code is as simple as that:

public class SearchView extends EditText
{
public SearchView(Context context)
{
super(context);
}

 @Override
 public boolean onKeyDown(int keyCode, KeyEvent event)
 {
 // the code (right now nothing)
 return true;
 }
}

The main package is "com.android.polo.myApp"
It is located in the package "com.android.polo.myApp.view"

Here is the "View.xml" using this new view:

http://schemas.android.com/apk/res/
android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">





I got this error:

11-06 19:00:21.555: ERROR/AndroidRuntime(1207):
java.lang.RuntimeException: Unable to start activity
ComponentInfo.. android.view.InflateException: Binary XML file
line #28: Error inflating class com.android.polo.myApp.view.SearchView

11-06 19:00:21.555: ERROR/AndroidRuntime(1207): Caused by:
android.view.InflateException: Binary XML file line #28: Error
inflating class com.android.polo.MyApp.view.SearchView
..
11-06 19:00:21.555: ERROR/AndroidRuntime(1207): Caused by:
java.lang.NoSuchMethodException: SearchView

Thanks a lot in advance
Polo

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



[android-developers] Re: Question about View, Canvas, and Drawable.. --Basics

2008-11-06 Thread Mike Reed

Views - yes

Canvas - you can create your own to draw into a bitmap, but views are  
handed a Canvas on their onDraw() method. For a given drawing pass,  
all of the views (usually) are handed the same Canvas (which points to  
the screen). However, on a subsetquent call to onDraw(), the actual  
Canvas object may be different (even if it also points to the screen).

Drawable - this is an abstraction for something that knows how to draw  
itself inside its bounds. There are lots of subclasses (you can create  
your own), including one that wrapps a Bitmap

Bitmap - this is a basic drawing primitive that can be drawn into a  
Canvas, and/or can be the target of a Canvas. It has basic dimensions  
and a reference to memory for pixels (either the screen or to  
offscreen memory)


On Nov 4, 2008, at 8:42 AM, joshbeck wrote:


Hello all,

Is this correct?

View: The android screen is divided up into views. Views are basic
layout objects.

Canvas: You need to have at least one canvas if you want to do any
drawing. Each
view potentially has its own canvas.

Drawable: ---)This is where my 10:30 bedtime turns into a 2:30 am nap
in the chair before work.)
-What is the difference between a Bitmap and a Drawable?
Can Drawables only be used with ImageView Views?


Thanks for any help.
Josh Beck



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



[android-developers] Re: Orientation change -> start Action/Service?

2008-11-06 Thread songs

Hi,

Sorry, when I say flip, I mean flip the screen out and expose the
keyboard.  I thought about having a service/alarm that polls every
second, but that seems like a big waste of battery and cpu cycles.
Ideally, I'd like to register for an event that gets sent when the
user pops the screen in and out hiding and showing the keyboard
(again, assume we're starting from nothing running).  I'm going to
play around with the BroadcastReceiver and see if I can get that to do
what I want, but the documentation makes it seem like that's really
geared towards Activities and I really want it to just kick off a
small, UI-less background process.

Thanks,
Steve

On Nov 6, 11:12 am, Michael <[EMAIL PROTECTED]> wrote:
> Oh.  Well of course.  Make your application be a background service
> that watches the sensor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Check for new version of applications

2008-11-06 Thread Guillaume Perrot

Because we use a XMPP based application, we chosed Pubsub as a way to
notify new versions to the user. The main advantage is that it uses a
push model. The user is aware of a new version when he launches
the app or in real time if he's online while a new version has just
been released. No timer or service at all in the application code.

On Nov 5, 11:57 pm, friedger <[EMAIL PROTECTED]> wrote:
> Currently, relying on an external resource is the way to do updates,
> this is how it is described in the documentation.
>
> If someone is checking against Market, please let us know.
>
> Friedger
>
> On Nov 4, 8:49 pm, "Dan B." <[EMAIL PROTECTED]> wrote:
>
> > isn't there some way to check the version against the Market instead
> > of having to host version information somewhere else? I know the app
> > Locale somehow knows when an update is available, it seems reasonable
> > to query the Market rather than relying on outside sources :\
>
> > On Nov 1, 1:50 pm,friedger<[EMAIL PROTECTED]> wrote:
>
> > > I'd say the package name is the global identifier.
>
> > > Maybe you can just provide a VeeCheck url based on the package name
> > > (as alternative to the app id). So I could check that url. If you
> > > don't host an app for the package name or if it is not unique you
> > > could return a HTTP 400.
>
> > >Friedger
>
> > > On 1 Nov., 17:37, Al Sutton <[EMAIL PROTECTED]> wrote:
>
> > > >Friedger,
>
> > > > How are you identifying the apps?, I'd happily add an extra field or two
> > > > to the AndAppStore.com data that you can search for if it would be 
> > > > useful.
>
> > > > Al.
>
> > > >friedgerwrote:
> > > > > The idea is that the Updater will also be able check all applications
> > > > > it knows about by a single button clicked or scheduled task. So, once
> > > > > the intent from one application is processed by the Update it is
> > > > > possible to include this application to the periodic update.
>
> > > > > A more general solution that includes all installed applications is
> > > > > currently not possible as I can't determine the location of the
> > > > >versioninfo file.
>
> > > > > The apk mentioned above is provided for developers to test. In the
> > > > > releaseversionthe interval between two checks will be at least 24
> > > > > hours, so you can start the service as often as you like but the check
> > > > > is only performed once every 24 hours. Furthermore, only the log cat
> > > > > shows whether the installedversionis up-to-date or not. In both
> > > > > cases the notification is show (this is to simplify the tests).
>
> > > > > Would you like to have a different Notification text? Any ideas for
> > > > > icons?
>
> > > > >Friedger
>
> > > > > On 1 Nov., 13:18, Al Sutton <[EMAIL PROTECTED]> wrote:
>
> > > > >> HiFriedger,
>
> > > > >> I've updated AndAppStore.com to provide a versionCode in the 
> > > > >> update.xml
> > > > >> as you requested.
>
> > > > >> At the moment anyone with applications listed will find that they can
> > > > >> specify the versionCode in the details about a releasedversion(not 
> > > > >> the
> > > > >> application details page, the release details page).
>
> > > > >> I am working on code to pull the information from the manifest 
> > > > >> included
> > > > >> in the apk, but this is a little way off yet.
>
> > > > >> Thanks for making this available.
>
> > > > >> Al.
>
> > > > >>friedgerwrote:
>
> > > > >>> Hi,
>
> > > > >>> we are preparing the OI Updater that checks a given info file for 
> > > > >>> new
> > > > >>> updates as described in the Android documentation.
>
> > > > >>> You can find the current build (rev 1284) at
> > > > >>>http://openintents.googlecode.com/files/UpdateChecker.apk
>
> > > > >>> In order to initiate the update check you just have to add the
> > > > >>> following code:
>
> > > > >>>            Intent service = new Intent();
> > > > >>>            service.setAction(ACTION_CHECK_VERSION);
> > > > >>>            String uri= "http://uri-to-update-file.txt";
>
> > > > >>>            service.setData(Uri.parse(link));
> > > > >>>            service.putExtra("package_name", 
> > > > >>> context.getPackageName());
> > > > >>>            service.putExtra("app_name",
> > > > >>> context.getString(org.openintents.notepad.R.string.app_name));
>
> > > > >>>            int currentVersion = -1;
> > > > >>>                    PackageInfo pi = 
> > > > >>> context.getPackageManager().getPackageInfo(
> > > > >>>                                    context.getPackageName(), 0);
> > > > >>>                    currentVersion = pi.versionCode;
> > > > >>>            service.putExtra("current_version", currentVersion);
> > > > >>>            context.startService(service );
>
> > > > >>> You can also put current_version_name if you check against the
> > > > >>> veecheck url at AndAppStore.
>
> > > > >>> It is still alpha, but we would appreciate early feedback.
> > > > >>> How do you like it? Would you include it in your code? More/other
> > > > >>> features?...
>
>

[android-developers] Re: Check for new version of applications

2008-11-06 Thread Guillaume Perrot

Because we use a XMPP base application, we chosed pubsub as a way to
notify new versions to the user. The main advantage is that it uses a
push model. We use the last published item feature and pubsub
notifications, so the user is aware of a new version when he launches
the app or in real time if he's online while a new version has just
been released. No timer or service at all in the application code.

On Nov 5, 11:57 pm, friedger <[EMAIL PROTECTED]> wrote:
> Currently, relying on an external resource is the way to do updates,
> this is how it is described in the documentation.
>
> If someone is checking against Market, please let us know.
>
> Friedger
>
> On Nov 4, 8:49 pm, "Dan B." <[EMAIL PROTECTED]> wrote:
>
> > isn't there some way to check the version against the Market instead
> > of having to host version information somewhere else? I know the app
> > Locale somehow knows when an update is available, it seems reasonable
> > to query the Market rather than relying on outside sources :\
>
> > On Nov 1, 1:50 pm,friedger<[EMAIL PROTECTED]> wrote:
>
> > > I'd say the package name is the global identifier.
>
> > > Maybe you can just provide a VeeCheck url based on the package name
> > > (as alternative to the app id). So I could check that url. If you
> > > don't host an app for the package name or if it is not unique you
> > > could return a HTTP 400.
>
> > >Friedger
>
> > > On 1 Nov., 17:37, Al Sutton <[EMAIL PROTECTED]> wrote:
>
> > > >Friedger,
>
> > > > How are you identifying the apps?, I'd happily add an extra field or two
> > > > to the AndAppStore.com data that you can search for if it would be 
> > > > useful.
>
> > > > Al.
>
> > > >friedgerwrote:
> > > > > The idea is that the Updater will also be able check all applications
> > > > > it knows about by a single button clicked or scheduled task. So, once
> > > > > the intent from one application is processed by the Update it is
> > > > > possible to include this application to the periodic update.
>
> > > > > A more general solution that includes all installed applications is
> > > > > currently not possible as I can't determine the location of the
> > > > >versioninfo file.
>
> > > > > The apk mentioned above is provided for developers to test. In the
> > > > > releaseversionthe interval between two checks will be at least 24
> > > > > hours, so you can start the service as often as you like but the check
> > > > > is only performed once every 24 hours. Furthermore, only the log cat
> > > > > shows whether the installedversionis up-to-date or not. In both
> > > > > cases the notification is show (this is to simplify the tests).
>
> > > > > Would you like to have a different Notification text? Any ideas for
> > > > > icons?
>
> > > > >Friedger
>
> > > > > On 1 Nov., 13:18, Al Sutton <[EMAIL PROTECTED]> wrote:
>
> > > > >> HiFriedger,
>
> > > > >> I've updated AndAppStore.com to provide a versionCode in the 
> > > > >> update.xml
> > > > >> as you requested.
>
> > > > >> At the moment anyone with applications listed will find that they can
> > > > >> specify the versionCode in the details about a releasedversion(not 
> > > > >> the
> > > > >> application details page, the release details page).
>
> > > > >> I am working on code to pull the information from the manifest 
> > > > >> included
> > > > >> in the apk, but this is a little way off yet.
>
> > > > >> Thanks for making this available.
>
> > > > >> Al.
>
> > > > >>friedgerwrote:
>
> > > > >>> Hi,
>
> > > > >>> we are preparing the OI Updater that checks a given info file for 
> > > > >>> new
> > > > >>> updates as described in the Android documentation.
>
> > > > >>> You can find the current build (rev 1284) at
> > > > >>>http://openintents.googlecode.com/files/UpdateChecker.apk
>
> > > > >>> In order to initiate the update check you just have to add the
> > > > >>> following code:
>
> > > > >>>            Intent service = new Intent();
> > > > >>>            service.setAction(ACTION_CHECK_VERSION);
> > > > >>>            String uri= "http://uri-to-update-file.txt";
>
> > > > >>>            service.setData(Uri.parse(link));
> > > > >>>            service.putExtra("package_name", 
> > > > >>> context.getPackageName());
> > > > >>>            service.putExtra("app_name",
> > > > >>> context.getString(org.openintents.notepad.R.string.app_name));
>
> > > > >>>            int currentVersion = -1;
> > > > >>>                    PackageInfo pi = 
> > > > >>> context.getPackageManager().getPackageInfo(
> > > > >>>                                    context.getPackageName(), 0);
> > > > >>>                    currentVersion = pi.versionCode;
> > > > >>>            service.putExtra("current_version", currentVersion);
> > > > >>>            context.startService(service );
>
> > > > >>> You can also put current_version_name if you check against the
> > > > >>> veecheck url at AndAppStore.
>
> > > > >>> It is still alpha, but we would appreciate early feedback.
> > > > >>> How do you like it? Would y

[android-developers] Re: fontspacint about drawText

2008-11-06 Thread Mike Reed

drawText only draws a single line, so vertical spacing is always done  
by the application/view (getFontSpacing returns suggested values for  
that).

Horizontal spacing happens in several ways:

- Paint.setTextScaleX() lets you apply a multiplier to all of the  
widths in the text (making it narrower or wider)
- Canvas.drawText() and drawTextOnPath() uses the font's spacing  
(modulo setTextScaleX)
- Canvas.drawPosText() lets you specify the x,y position of every  
character.

On Nov 4, 2008, at 8:00 AM, Narwal wrote:


Hello all
i know there is a method getFontSpacing().
but which method i should use,if i want to control the fontspacing
accurately,when i use drawText.




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



[android-developers] Re: adb shell permissions on real G1 device

2008-11-06 Thread Bradley Kite

Hi there,

Yes there is a reason. I'm working on an application that requires
wifi access and cannot be used within the emulator.

There must be a way around this?

Regards
--
Brad.

On 06/11/2008, Michael <[EMAIL PROTECTED]> wrote:
>
>
>  That's pretty intentional.  Is there some reason you can't use the
>  emulator for 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Orientation change -> start Action/Service?

2008-11-06 Thread Michael


Oh.  Well of course.  Make your application be a background service
that watches the sensor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Orientation change -> start Action/Service?

2008-11-06 Thread zl25drexel

are you looking ways to keep orientation? (sorry i just skim thru this
thread). if so, take a look
http://groups.google.com/group/android-developers/browse_thread/thread/471e2aa7ac113683/81f85746d018f4f3

On Nov 6, 1:10 pm, songs <[EMAIL PROTECTED]> wrote:
> Those links were interesting, but again had to do with dealing with
> orientation in a running activity.
>
> The suggestions for detecting and setting the orientation were also
> for a running activity.
>
> What I'm looking for is for something that'll trigger the start of an
> activity based on an orientation change.  I need to be able to handle
> this, user turns phone on, user flips the screen out, the flip is
> detected and Service A is automatically started without the user
> having to click anything, user flips the screen back, the flips is
> detected and Service A is automatically run again.
>
> On Nov 6, 7:58 am, Michael <[EMAIL PROTECTED]> wrote:
>
> > Or, just somewhere in your onCreate() for your activity, you can find
> > out the current orientation (see
> > getResources().getConfiguration().orientation ), and pick your Layout
> > from there.
>
> > You should also set android:screenOrientation="sensor" in your
> > AndroidManifest.xml, if you want to be notified of sensor-based
> > orientation changes, see onConfigurationChanged() in Activity for how
> > to handle this event.
>
> > - michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser extensions i Java? YES, NO, Some?

2008-11-06 Thread Michael


I would think that you WANT the browser to show those.  Lots of sites
use that mimetype because the browser will display it.

It'd be better for you to find another solution to send these links at
your application.  I mean, a desktop browser works the same way as
Android's does here.  And installing your own handler for this
mimetype would certainly break other things - not a good solution.

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



[android-developers] Re: Improved support for camera on Android emulator.

2008-11-06 Thread [EMAIL PROTECTED]

The source for the Qualcomm camera has been released:
http://review.source.android.com/1776 . The camera itself , and the
functionality in the native interface are excellent, the problem is
that very little of the available functionality is implemented in the
Android 1.0 sdk. We are very interested in having this fixed, so we'll
keep pushing for better camera sdk support.

On Nov 5, 9:45 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
>   It seems everyone is having simular problems with the limited camera
> support as well as the lack of emulator support for camera input. I'm
> more on the application development side, but since this is such a
> serious problem I'll see if I can talk to the hardware people here.
> I'll see if we can get any feedbackm from the Google team as well.
> I'll post back here as I find out more information. Many have come to
> the same conclusion about the currrent state of camera support, in
> that it isn't sufficient for serious application development yet,
> which is currently my problem also. I'll do everything I can to got
> more information on the camera issues, without this issue resolved it
> will be difficult for Android to be a competitive platform.
>
> On Nov 5, 1:07 am, blindfold <[EMAIL PROTECTED]> wrote:
>
>
>
> > BTW Mark, since you are with Qualcomm, you should be able to find out
> > more about the QualcommCameraHardware messages that we see in G1 crash
> > logs? It is only most recently that I learnt that camera preview on
> > the T-Mobile G1 uses some YUV 411 encoding instead of the emulators
> > single supported format which is a YUV 422 variant. These kinds of
> > "surprises" are killing for our camera based apps, and as a result
> > also killing for our developer reputation with end users (they blame
> > us for broken apps). My own camera app runs fine on the emulator but
> > breaks and shows scrambled previews on the G1, at least in part due to
> > this new find about the undocumented use of an 411 encoding that I
> > still need to account for by writing a dedicated preview decoder. Who
> > is sitting on this kind of vital developer information? Is it Google,
> > T-Mobile or Qualcomm?
>
> > More about reporting about the ongoing struggle with the G1
> > QualcommCameraHardware at
>
> >http://code.google.com/p/android/issues/detail?id=1129andathttp://groups.google.com/group/android-developers/browse_thread/threa...
>
> > Any help is appreciated!
>
> > Peter
>
> > On Nov 5, 2:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
>
> > > I was wondering if anyone has any information on when we could expect
> > > improved camera support for the Android emulator, ie being able to
> > > capture pictures and video input on the emulator. I know this is a
> > > critical issue for many of us. Thanks in advance.
>
> > >         Mark- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: adb shell permissions on real G1 device

2008-11-06 Thread Michael


That's pretty intentional.  Is there some reason you can't use the
emulator for 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to set up as a straight vertical display

2008-11-06 Thread Kipling Inscore
It can also be done in AndroidManifest.xml
there are a lot of existing discussions on this list answering this question.

On Thu, Nov 6, 2008 at 5:15 AM, dailyLife <[EMAIL PROTECTED]> wrote:
> Thanks a lot.
>
>
> [EMAIL PROTECTED]
> 2008年11月6日
>
> - Original Message -
> From: songs
> To: Android Developers
> Sent: 2008-11-06, 16:20:45
> Subject: [android-developers] Re: How to set up as a straight vertical
> display
> You probably want to put the following in your activity's onCreate:
>
>setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
>
> Cheers,
> Steve
>
> On Nov 5, 11:28爌m, "dailyLife"<[EMAIL PROTECTED]> wrote:
>> Hi,EveryOne.
>> ?Today, I finally had to buy the G1, I have to write the software
>> installed on the G1 above to see results, every time I open the keyboard,
>> software, images are also displayed along with change.
>>
>> Who can tell me how to set up as a straight vertical display shows that
>> even open the keyboard show the same way.
>> >
>

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



[android-developers] Re: How to have 2 activities open in one Eclipse workspace?

2008-11-06 Thread DulcetTone

I fixed this.  My fix was to trim the contents of the JAR file that
Activity1's code (which Activity2 shared, in part) so that it excluded
the res folder and AndroidManifest.xml.

This was done during the export/jar process for Activity1's project.
I resunc Activity2's project after created the smaller Jar, and it
worked.

tone


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



[android-developers] Re: A network status info question

2008-11-06 Thread redmapleleaf

Here is the stack trace:

Thread [<3> main] (Suspended)
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
line: 2138
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
line: 2156
ActivityThread.access$1800(ActivityThread, ActivityThread
$ActivityRecord) line: 112
ActivityThread$H.handleMessage(Message) line: 1580
ActivityThread$H(Handler).dispatchMessage(Message) line: 88
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3742
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 515
ZygoteInit$MethodAndArgsCaller.run() line: 739
ZygoteInit.main(String[]) line: 497
NativeStart.main(String[]) line: not available [native method]

and here are the log messages:

11-06 12:59:19.899: WARN/ActivityManager(52): Launch timeout has
expired, giving up wake lock!
11-06 12:59:20.200: WARN/ActivityManager(52): Activity idle timeout
for HistoryRecord{4355d4f8 {com.google.android.polyglotz/
com.google.android.polyglotz.Polyglotz}}
11-06 13:11:57.649: WARN/PackageManager(52): Attempt to re-install
com.google.android.polyglotz without first uninstalling.
11-06 13:12:02.478: ERROR/dalvikvm(721): pthread_setspecific failed,
err=22
11-06 13:12:04.909: WARN/ActivityThread(740): Application
com.google.android.polyglotz is waiting for the debugger on port
8100...
11-06 13:12:14.490: WARN/ActivityManager(52): Launch timeout has
expired, giving up wake lock!
11-06 13:12:14.875: WARN/ActivityManager(52): Activity idle timeout
for HistoryRecord{43574a38 {com.google.android.polyglotz/
com.google.android.polyglotz.Polyglotz}}



On Nov 6, 10:09 am, szeldon <[EMAIL PROTECTED]> wrote:
> What kind of crash was it? Was it an exception? If so, what exception
> was it and what info it had?
> On Nov 6, 4:04 pm,redmapleleaf<[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > would someone kind enough to let me know what I am doing wrong with
> > the following code. I would like to get the network status using the
> > ConnectionManager, but everytime I made call to it crashed:
>
> >   ConnectivityManager cm =
> > ConnectivityManager)mActivity.getSystemService(mActivity.CONNECTIVITY_SERVICE);
>
> >   NetworkInfo netinfo = cm.getActiveNetworkInfo();  IT 
> > CRASHED
> > HERE
>
> >   if(netinfo.getState() != NetworkInfo.State.CONNECTED){
> >   // display network not available alert
> >   return null;
>
> >   }
>
> > Thank you very much for your help,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Orientation change -> start Action/Service?

2008-11-06 Thread songs

Those links were interesting, but again had to do with dealing with
orientation in a running activity.

The suggestions for detecting and setting the orientation were also
for a running activity.

What I'm looking for is for something that'll trigger the start of an
activity based on an orientation change.  I need to be able to handle
this, user turns phone on, user flips the screen out, the flip is
detected and Service A is automatically started without the user
having to click anything, user flips the screen back, the flips is
detected and Service A is automatically run again.

On Nov 6, 7:58 am, Michael <[EMAIL PROTECTED]> wrote:
> Or, just somewhere in your onCreate() for your activity, you can find
> out the current orientation (see
> getResources().getConfiguration().orientation ), and pick your Layout
> from there.
>
> You should also set android:screenOrientation="sensor" in your
> AndroidManifest.xml, if you want to be notified of sensor-based
> orientation changes, see onConfigurationChanged() in Activity for how
> to handle this event.
>
> - michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problems with file permissions on actual G1 platform

2008-11-06 Thread Bradley Kite

Hi

It seems quite sensible to have root access disabled by default when
the devices ship, but is there really no way that it can be enabled
again for the purposes of debugging etc?

As owner of the device I feel I should be entitled to such a thing.

Does any body know how?

Any help will be much appreciated.

Regards
--
Brad.

On 25/10/2008, Justin (Google Employee) <[EMAIL PROTECTED]> wrote:
>
>  > Specifically, when I try to adb install , I
>  > receive the following error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
>
>
> The error message is saying there is something wrong with your
>  manifest file. Perhaps you are not building against the 1.0r1 SDK? Can
>  you provide pointers to both the APK and the source?
>
>
>  > Also, when I try to adb push fbvncserver /data, to move the VNC server
>  > to the phone, I'm told I don't have sufficient permissions.  Then,
>  > when I tried to use the shell to chmod the /data folder, I'm told I
>  > don't have permission to run chmod.  When I try to use su to run chmod
>  > as root, or to logout and login as root or 0, I'm told that I haven't
>  > permission to run any of those commands.
>
>
> The G1 has root disabled and 'su' is not available. Since there is no
>  way to perform operations as root, you can't manipulate the /data
>  directory. root is disabled on the G1 for security reasons.
>
>  Cheers,
>  Justin
>  Android Team @ Google
>
>
>  On Oct 24, 1:07 pm, azz710 <[EMAIL PROTECTED]> wrote:
>  > Folks,
>  >
>  > I just received my T-Mobile G1 am very pleased, to say the least, and
>  > I expect to develop a couple of applications, probably for my own use.
>  >
>  > Meanwhile, I'm trying to install a couple of non-Android Market,
>  > partially developed applications, starting with VNC.  Specifically,
>  > I'm trying to install a VNC viewer and VNC server, both of which
>  > projects, though incomplete, are apparently functional, though I have
>  > know way of knowing as I can't install either on my phone.
>  >
>  > Specifically, when I try to adb install , I
>  > receive the following error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
>  >
>  > Also, when I try to adb push fbvncserver /data, to move the VNC server
>  > to the phone, I'm told I don't have sufficient permissions.  Then,
>  > when I tried to use the shell to chmod the /data folder, I'm told I
>  > don't have permission to run chmod.  When I try to use su to run chmod
>  > as root, or to logout and login as root or 0, I'm told that I haven't
>  > permission to run any of those commands.
>  >
>  > Does anyone have any idea how I can do any of this on a real phone, or
>  > is development limited to using the emulator?
>  >
>  > Thanks,
>  > Jeff Broido - Writing code since 1966
>  >
>

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



[android-developers] How to have 2 activities open in one Eclipse workspace?

2008-11-06 Thread DulcetTone

I have 3 projects:

Jarfile/   contains a bunch of Java classes that are put into a jar
Activity1/ contains an activity (and an AndroidManifest.xml)
Activity2/ contains a second activity  (and an AndroidManifest.xml)

When I try to build and debug Activity2, I get this error:

[2008-11-06 12:39:11 - Activity2] Error generating final archive:
duplicate entry: AndroidManifest.xml

Presumably, this is due to Activity1's xml file, but that is in
Activity1's directory tree, not Activity2's.

How am I to make this work?

tone


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



[android-developers] Re: Problem with onActivityResult

2008-11-06 Thread Alvin Yates

Actually it's because of this line, which took me two days to figure
out when I was doing it:

In class A:
...
btOk.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
bus = new Intent(AndTeste.this,
Buscador.class);
==> startActivityForResult(bus,
RESULT_OK);
}
...

RESULT_OK is a constant value of -1.  Calling startActivityForResult
with numbers <0 (Possibly including, but it's documented) is
equivalent to using startActivity() only.

Make a new constant, like "public static int BUSCADOR_CALL = 3" and
you'll be okay.


On Nov 5, 9:05 am, Christine <[EMAIL PROTECTED]> wrote:
> The proper way to do this is to provide an int value for requestCode
> in startActivity. Then in OnActivityResult you have a
> switch(requestCode) and within each case you have a switch for
> resultCode. You seem to be confusing requestCode and resultCode.
>
> Your requestCode should probably be something like BUS_ACTIVITY that
> you give an int value,
> then you have
>       bus = new Intent(AndTeste.this, Buscador.class);
>       startActivityForResult(bus,BUS_ACTIVITY);
> .
> Intent data) {
>                 // See which child activity is calling us back.
>      switch(requestCode){
>           case BUS_ACTIVITY:
>                 switch (resultCode) {
>                    case RESULT_OK:
>                         setTitle("Result Ok");
>                    default:
>                         break;
>                 }
>             break;
>         }
>
> or something along those lines. I think there's plenty of examples in
> the api demos.
>
> On Nov 5, 11:39 am, Prestes <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > I have a problem with onActivityResult. My class Activity can not
> > return a result for this method.
>
> > My class A
> > [syntax="java"]
> > public class ClassTestA {
> >         private Button btOk;
> >         private Intent bus;
>
> >         /** Called when the activity is first created. */
> >         @Override
> >         public void onCreate(Bundle savedInstanceState) {
> >                 super.onCreate(savedInstanceState);
> >                 setContentView(R.layout.main);
>
> >                 btOk = (Button) findViewById(R.id.btTeste);
> >                 bus = new Intent(AndTeste.this, Buscador.class);
>
> >                 btOk.setOnClickListener(new OnClickListener() {
>
> >                         public void onClick(View v) {
> >                                 bus = new Intent(AndTeste.this, 
> > Buscador.class);
> >                                 startActivityForResult(bus, RESULT_OK);
> >                         }
>
> >                 });
> >         }
>
> >         // Listen for results.
> >         protected void onActivityResult(int requestCode, int resultCode,
> > Intent data) {
> >                 // See which child activity is calling us back.
> >                 switch (resultCode) {
> >                    case RESULT_OK:
> >                         setTitle("Result Ok");
> >                    default:
> >                         break;
> >                 }
> >         }}
>
> > [/syntax]
>
> > Class B
> > [syntax="java"]
> > public class ClassB {
> >         private Button btBus;
> >         private EditText end;
> >         private Geocoder buscador;
> >         private ListView list;
>
> >         /** Called when the activity is first created. */
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.buscador);
>
> >         btBus = (Button) findViewById(R.id.btBuscar);
> >         end = (EditText) findViewById(R.id.tiEnd);
> >         buscador = new Geocoder(this);
> >         list = (ListView) findViewById(R.id.listEnd);
>
> >         btBus.setOnClickListener(mCorkyListener);
> >     }
>
> >     private OnClickListener mCorkyListener = new OnClickListener() {
> >         public void onClick(View v) {
> >             setResult(RESULT_OK);
> >             finish();
> >         }
> >     };}
>
> > [/syntax]
>
> > Manifest.xml
> > [syntax="xml"]
> > 
> > http://schemas.android.com/apk/res/android";
> >       package="com.maps"
> >       android:versionCode="1"
> >       android:versionName="1.0.0">
>
> >      > android:label="testeando tudo">
> >         
> >             
> >                 
> >                  > android:name="android.intent.category.LAUNCHER" />
> >             
> >         
>
> >         
> >             
> >                 
> >                  > android:name="android.intent.category.DEFAULT" />
> >             
> >         
> >     
> > 
> > [/syntax]
> > My class B to return to class A, but o method onActivityResult is not
> > called.
> > Someone can help me ?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post

[android-developers] Re: Browser extensions i Java? YES, NO, Some?

2008-11-06 Thread Jean-Baptiste Queru

I'm not sure about the exact browser-side mechanisms at that specific
level (I really only know the download side of things, but not how
things get there). If nobody else comments, you might be able to get
an answer in the source code.

JBQ

On Thu, Nov 6, 2008 at 8:59 AM, Peli <[EMAIL PROTECTED]> wrote:
>
> Is there a possibility to catch a generic "application/xml"? It seems
> this is displayed in the browser in raw format, and it does not try
> the ACTION_VIEW.
>
> Our application would like to handle rss feeds, which should have the
> mime type "application/rss+xml", and which we can catch through an
> intent receiver. Unfortunately, most websites simply use the mime type
> "application/xml" for rss feeds, which will not be forwarded to our
> application, but will be displayed in the browser.
>
> Is there a way to catch "application/xml" MIME types by third party
> developers?
>
> Peli
>
> On Nov 6, 2:46 pm, Jean-Baptiste Queru <[EMAIL PROTECTED]> wrote:
>> The browser will invoke the download manager when navigating to a MIME
>> type that is not natively supported (or when using the appropriate
>> content-disposition, of when choosing "save link"). The download
>> manager will download any file whose MIME type is supported for
>> ACTION_VIEW by any installed application. That partially takes care of
>> your 3rd question (though you can't make it happen inline in the
>> browser).
>>
>> The other 3 cases aren't currently supported, and quite some work will
>> be required in the framework until those can be supported reasonably
>> securely.
>>
>> JBQ
>>
>> On Thu, Nov 6, 2008 at 12:38 AM, Anders Rundgren
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>> > For those who do not feel that traversing tons of C++ code to get "the
>> > real truth" is their cup of tea, I wonder if somebody from the Android
>> > core team could elaborate a bit on what is possible to do in Java with
>> > respect to browser extensions?
>>
>> > In particular:
>> > - Support for the HTML "Object" type
>> > - Adding a MIME type decoder and getting the browser environment as
>> > well
>> > - NS Plugin API
>> > - Adding JavaScript objects
>>
>> > Anyhing else that could be useful in this context.
>>
>> > Anders
> >
>

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



[android-developers] Re: Notifications from file system

2008-11-06 Thread CJ

anybody has an example?


On Sep 17, 5:02 pm, hackbod <[EMAIL PROTECTED]> wrote:
> TheFileObserverclass allows you to monitor filesystem changes:
>
> http://code.google.com/android/reference/android/os/FileObserver.html
>
> It does need to be better documented, but it works. :)
>
> On Sep 17, 2:56 am, indra <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > Is there any way out by which we can get the change/modify
> > notifications on file system.
> > I want to get notifications from SD CARD, like we do on the databases
> > applying ContentObservers.
> > Pls help.
>
> > Thanks and Regards,
> > Indra- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Article - Getting Started in Android Game Development

2008-11-06 Thread Robert Green

Thanks to everyone here for all their help getting Light Racer
written!  I decided to try to give back a bit of knowledge so I wrote
this article on Android Game Development -
http://www.rbgrn.net/blog/2008/11/getting-started-in-android-game-development.html

For all the new and aspiring game developers - enjoy and feel free to
ask as many questions as you need to.

Thanks again to everyone who helped out!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] adb shell permissions on real G1 device

2008-11-06 Thread Bradley Kite

Hi there,

I am trying to debug some things on a real G1 device, but the shell
doesnt have the permissions to do what I'm trying.

http://code.google.com/android/reference/adb.html#sqlite documents how
to examine a database, however this is one of the things I cannot do
on a real device.

$ id
id
uid=2000(shell) gid=2000(shell)
groups=1003(graphics),1004(input),1007(log),1011(adb),3003(inet)

$ sqlite3 /data/data//application.db
sqlite3
sqlite3: permission denied

Is there something in particular that I need to do in order to get
system level privileges via the adb shell?

Many thanks in advance
--
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser extensions i Java? YES, NO, Some?

2008-11-06 Thread Peli

Is there a possibility to catch a generic "application/xml"? It seems
this is displayed in the browser in raw format, and it does not try
the ACTION_VIEW.

Our application would like to handle rss feeds, which should have the
mime type "application/rss+xml", and which we can catch through an
intent receiver. Unfortunately, most websites simply use the mime type
"application/xml" for rss feeds, which will not be forwarded to our
application, but will be displayed in the browser.

Is there a way to catch "application/xml" MIME types by third party
developers?

Peli

On Nov 6, 2:46 pm, Jean-Baptiste Queru <[EMAIL PROTECTED]> wrote:
> The browser will invoke the download manager when navigating to a MIME
> type that is not natively supported (or when using the appropriate
> content-disposition, of when choosing "save link"). The download
> manager will download any file whose MIME type is supported for
> ACTION_VIEW by any installed application. That partially takes care of
> your 3rd question (though you can't make it happen inline in the
> browser).
>
> The other 3 cases aren't currently supported, and quite some work will
> be required in the framework until those can be supported reasonably
> securely.
>
> JBQ
>
> On Thu, Nov 6, 2008 at 12:38 AM, Anders Rundgren
>
> <[EMAIL PROTECTED]> wrote:
>
> > For those who do not feel that traversing tons of C++ code to get "the
> > real truth" is their cup of tea, I wonder if somebody from the Android
> > core team could elaborate a bit on what is possible to do in Java with
> > respect to browser extensions?
>
> > In particular:
> > - Support for the HTML "Object" type
> > - Adding a MIME type decoder and getting the browser environment as
> > well
> > - NS Plugin API
> > - Adding JavaScript objects
>
> > Anyhing else that could be useful in this context.
>
> > Anders
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to install software in the G1

2008-11-06 Thread Fish Kungfu
To install a compiled .apk file, you can just use the "adb" command.  It's
explained here in the "Running an Android Application" about midways down:

http://code.google.com/android/intro/develop-and-debug.html

Cheers~~Fish~~



On Thu, Nov 6, 2008 at 9:49 AM, HaleRazor <[EMAIL PROTECTED]> wrote:

>
> First, you have to sign the .apk:
> http://code.google.com/android/devel/sign-publish.html
>
> After that is done, you will use the command line install that
> comes with the SDK.  I think /? is the switch to get the command line
> params.  I'm at work now and don't have the SDK installed here, so I'm
> not 100% sure about that.
>
>
> On Nov 6, 7:25 am, "dailyLife"<[EMAIL PROTECTED]> wrote:
> > My os is Windows ,IEDeclipse
> > How to install software in the  G1.
>
> >
>

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



[android-developers] sdk activity life cycle picture inaccurate?

2008-11-06 Thread CJ

according to the picture, for an regular activity, if onstop is called
and ondestory is not called, there are only two ways to go: oncreate
or onrestart. which means, if oncreate is called, the PROCESS is
killed.

here is my application: the activity starts a thread that runs in th
background. then, i press the home key on the phone and click on my
application icon again. according to the debugger, th oncreate is
called which means the process has been killed. but, the debugger also
shows that the thread has never been killed which also means the
process has never been killed.

does it suggest that the red box saying process is killed does not
necessarily happen every time?

can anybody explain?

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to detect when there is GPRS?

2008-11-06 Thread Jean-Baptiste Queru

You can listen to ConnectivityManager.CONNECTIVITY_ACTION broadcasts,
or inspect the result of ConnectivityManager.getActiveNetworkInfo().
For the latter, get a ConnectivityManager object with
(ConnectivityManager)
Context.getSystemService(Context.CONNECTIVITY_SERVICE)

JBQ

On Thu, Nov 6, 2008 at 8:24 AM, Breno <[EMAIL PROTECTED]> wrote:
>
> Hey fellows,
>
> i read in somewhere that is possible to do something (for
> example, start a service) when phone power up or do something when
> there is GPRS, or EDGE, or anything like that. I'm doing some tests
> here, and till now i'm just able to wake up my app when
> BOOT_COMPLETED. My question is how can i detect when there is (and
> when there is not) GPRS, so i can do what needs to be done with this
> info.
>
> Thanks a lot
>
> Breno
> >
>

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



[android-developers] Re: Table layout?

2008-11-06 Thread roland

Hi, you can do it. Here is an example:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AbsoluteLayout al = new AbsoluteLayout(this);
LinearLayout topLayout = new LinearLayout(this);
topLayout.setOrientation(LinearLayout.VERTICAL);

EditText et1 = new EditText(this);
EditText et2 = new EditText(this);
Button bt1 = new Button(this);
bt1.setText("Butotn1");
Button bt2 = new Button(this);
bt2.setText("Button2");

LinearLayout ll1 = new LinearLayout(this);
ll1.setOrientation(LinearLayout.HORIZONTAL);

ll1.addView(bt1, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
ll1.addView(et1, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));

LinearLayout ll2 = new LinearLayout(this);
ll2.setOrientation(LinearLayout.HORIZONTAL);

ll2.addView(bt2, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
ll2.addView(et2, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));

topLayout.addView(ll1, new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
topLayout.addView(ll2, new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));

LinearLayout bottomLayout = new LinearLayout(this);
bottomLayout.setOrientation(LinearLayout.HORIZONTAL);
Button bt3 = new Button(this);
bt3.setText("Button3");
Button bt4 = new Button(this);
bt4.setText("Button4");
bottomLayout.addView(bt3, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
bottomLayout.addView(bt4, new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));

al.addView(topLayout, new AbsoluteLayout.LayoutParams(320,
250, 0, 0));
al.addView(bottomLayout, new AbsoluteLayout.LayoutParams(320,
50, 0, 390));
setContentView(al);
}


On 6 nov, 03:28, "Khaled Sliman" <[EMAIL PROTECTED]> wrote:
> I am a noobie too, but I foun droiddraw very usefull for ui , just google
> droiddraw
>
> On Nov 5, 2008 9:03 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I want to make a simple application, this app will have a row of
> buttons in the bottom and two text fields up top with two buttons. I
> cannot seem to do this, granted I'm not an expert with UI's but it
> seems like I cannot do what I want. I was thinking of having two
> linear layouts in my app, a bottom for the buttons, and a top for the
> fields. How would I go about doing 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SSH to the G1 ?

2008-11-06 Thread Cezar Augustus Signori

need root access on the G1?

http://modmygphone.com/forums/showthread.php?t=4351

Cheers,
Cezar

On Nov 6, 1:47 am, sjschultze <[EMAIL PROTECTED]> wrote:
> This is what you 
> want:http://android.git.kernel.org/?p=platform/development.git;a=tree;f=ap...
>
> On Nov 1, 2:45 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > SnolahC_FR wrote:
> > > How do you manage to use a console on THE PHONE ?
>
> > AFAIK, you don't. Just because it has Linux under the covers does not
> > mean it has a full console with a bash shell and all that jazz.
>
> > For connecting to other Linux/etc. boxes running SSH, ConnectBot has
> > worked fairly well for me in light use so far.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
>
> > Android Training on the Ranch! -- Mar 16-20, 
> > 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to detect when there is GPRS?

2008-11-06 Thread Breno

Hey fellows,

 i read in somewhere that is possible to do something (for
example, start a service) when phone power up or do something when
there is GPRS, or EDGE, or anything like that. I'm doing some tests
here, and till now i'm just able to wake up my app when
BOOT_COMPLETED. My question is how can i detect when there is (and
when there is not) GPRS, so i can do what needs to be done with this
info.

Thanks a lot

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



[android-developers] Re: INSTANT MESSAGING

2008-11-06 Thread Justin (Google Employee)

Thanks for taking the time to give feedback on Android, however,
topics such as yours would be better directed to
http://groups.google.com/group/android-discuss , the Android
discussion group. This group is focused on Android application
developers, not platform applications like the built-in IM client.

Cheers,
Justin
Android Team @ Google

On Nov 5, 9:33 pm, theghost8800 <[EMAIL PROTECTED]> wrote:
> The phone has everything I need except a good aim app.
>
> I bought the phone to replace a sidekick lx
>
> The aim needs
>
> "font size smaller" - to be able to view contacts easier(the android
> lets you see 3 onscreen so you need to scroll)
> "away message editing" - ability to change status and give a summary
> why(android just says "away")
> "Icon picture" - (I can't see anyone's icon or post my own)
> "buddy edit" - missing feature..
>
> The list can go on forever. G1 users just want aim up to par with
> the danger OS
>
> currently its worse than a motorola razor im app
>
> Also, onscreen keyboard
>
> one of the only things the i phone wins the contest in
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Gesture for Navigation?

2008-11-06 Thread joshv

Actually I've found the following works well:

@Override
public boolean dispatchTouchEvent(MotionEvent ev){
gd.onTouchEvent(ev);
return super.dispatchTouchEvent(ev);
}

calling super.dispatchTouchEvent allows all of the other views to
receive their events.

For some reason, in my layouts, onTouch is never called for the
Activity, so this is the only way I've found to detect gestures on the
Activity.

On Nov 3, 4:07 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
> yi, doing that will disable all normal touch event dispatching for
> that view and any of its children.  It's really rare that you should
> override a dispatch method, especially doing so and never calling
> through to the super class.
>
> The correct thing is almost always to override onTouchEvent().
>
> Rohit
>
> On Oct 31, 1:05 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > In addition you need to do the following in your view:
>
> > @Override
> > public boolean dispatchTouchEvent(MotionEvent ev){
> >         return mGestureDetector.onTouchEvent(ev);
>
> > }
>
> > Thanks
> > Rohit
>
> > On Oct 31, 2:01 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > > I got fling/swipe to work. In one of my other posts someone told me to
> > > do the following to make the onFling and Scroll methods to be called:
>
> > > 1) Set View.setLongClickable to true for the view you are using
> > > 2) Set GestureHandler.setIsLongpressEnabled to true
> > > 3) Return true in your onDown method
>
> > > Thanks for all the help
> > > Rohit
>
> > > On Oct 30, 5:12 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
>
> > > > A fling is just an ACTION_DOWN, one or more ACTION_MOVE and an
> > > > ACTION_UP. It has nothing to do with running in the emulator or not.
> > > > (For what it's worth, a large part of the touch UI and APIs have been
> > > > developed in the emulator.)
>
> > > > On Thu, Oct 30, 2008 at 4:18 PM, Rohit Mordani <[EMAIL PROTECTED]> 
> > > > wrote:
>
> > > > > I THINK the problem is that in the emulator, pressing the left mouse
> > > > > button is more like a tap and that sets the MotionEvent.Action to be
> > > > > ACTION_DOWN. As a result the onDown() method of the OnGestureListener
> > > > > is called instead of onFling(). There might be a way to emulate the
> > > > > fling in the emulator but I am not sure of it. If anyone finds out
> > > > > then please let me know. That would then call onFling() correctly I
> > > > > think
>
> > > > > Rohit
>
> > > > > On Sep 22, 6:40 am, kingtut <[EMAIL PROTECTED]> wrote:
> > > > >> Any luck in getting the onFling or onScroll event to fire? I am 
> > > > >> facing
> > > > >> the same problem.
>
> > > > >> On Sep 12, 5:14 pm, Mark Hansen <[EMAIL PROTECTED]> wrote:
>
> > > > >> > Ok, I'll keep trying it.. for some reason the events aren't firing
> > > > >> > such as Fling etc.
>
> > > > >> > On Sep 12, 10:12 am, Kavi <[EMAIL PROTECTED]> wrote:
>
> > > > >> > > ListView is a kind of View, so you should be able to attach the
> > > > >> > > GestureDetector to your ListView as well.
>
> > > > --
> > > > Romain Guywww.curious-creature.org

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



[android-developers] Intercept Call

2008-11-06 Thread BrunoZP.com

Hi,

How can I intercept a user call, change it number and dial again ?
Any example code ??

For example: The user dial 32546048 and press send, my application get
this number, cancel the dialing, change this number to
3*2*5*4*6*0*4*8* and then dial !

This needs to happen automatically, without the need of confirmations
and other things..

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Bluetooth Availability? Timeframe?

2008-11-06 Thread ALD

Great question, we have a client requesting an app be ported to
Android but it requires BT.  No answers seem forthcoming to any of the
other similar questions posted about BT timing in the groups either.

A.


On Nov 4, 10:25 pm, USAePay <[EMAIL PROTECTED]> wrote:
> I am sure this issue has probably been talked about before but I could
> not find a lot of information by searching this group as to when the
> SDK will supportBluetoothfor applications.
>
> I have read that thebluetoothwas locked down for security but that
> it may be released in the next SDK release but I can not find a
> timeframe for that release.
>
> A lot of people have complained thatBluetoothis a very important
> piece to the success of the phone and I can not agree more. For those
> that argue that iPhone has the same thing have to realize that
> comparing the market value of the iPhone to a phone like the G1 is
> absurd. If anything the G1 NEEDS to haveBluetoothavailablejust so
> it CAN compete against the iPhone.
>
> I hope to hear some good news about theBluetooth, it will be a shame
> ifbluetoothwill continue to go unsupported in the SDK. 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to use WSDL web service in Android

2008-11-06 Thread aviart1

I have simple WSDL web service file and added into project.
Now I am trying to use WSDL web service through android class code,
but not able to use it.
Can anybody suggest how to import WSDL file in ANdroid, so that it can
create auto classes for
WSDL file and same can be used ion  android main class, where we can
send and receive any request/response.

Please suggest any simple WSDL use.
Thanks a lot!!

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



[android-developers] Re: How to run AT Commands on Emulator

2008-11-06 Thread AlexZhang

SDK1.0 does not seem work with the option of -radio, but old SDK
works!

On Nov 3, 11:06 pm, "David Turner" <[EMAIL PROTECTED]> wrote:
> try "emulator -help-radio"
>
> On Mon, Nov 3, 2008 at 9:52 AM, Abraham
> <[EMAIL PROTECTED]>wrote:
>
>
>
> > HI All,
>
> > I would like to fine out if Android emulator provided along with
> > SDK1.0 allows the users to send AT commands to perform some action.
>
> > If some has tried this, could someone pls let me know how this can be
> > achieved.
>
> > Thanks
> > --Abraham

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



[android-developers] How to use WSDL web service in Android

2008-11-06 Thread Avinash Patil
I have simple WSDL web service file and added into project.
Now I am trying to use WSDL web service through android class code,
but not able to use it.
Can anybody suggest how to import WSDL file in ANdroid, so that it can
create auto classes for
WSDL file and same can be used ion  android main class, where we can
send and receive any request/response.

Please suggest any simple WSDL use.
Thanks a lot!!

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



[android-developers] Re: SSH to the G1 ?

2008-11-06 Thread sjschultze

This is what you want:
http://android.git.kernel.org/?p=platform/development.git;a=tree;f=apps/Term

On Nov 1, 2:45 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> SnolahC_FR wrote:
> > How do you manage to use a console on THE PHONE ?
>
> AFAIK, you don't. Just because it has Linux under the covers does not
> mean it has a full console with a bash shell and all that jazz.
>
> For connecting to other Linux/etc. boxes running SSH, ConnectBot has
> worked fairly well for me in light use so far.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: How to install software in the G1

2008-11-06 Thread HaleRazor

First, you have to sign the .apk: 
http://code.google.com/android/devel/sign-publish.html

After that is done, you will use the command line install that
comes with the SDK.  I think /? is the switch to get the command line
params.  I'm at work now and don't have the SDK installed here, so I'm
not 100% sure about that.


On Nov 6, 7:25 am, "dailyLife"<[EMAIL PROTECTED]> wrote:
> My os is Windows ,IEDeclipse
> How to install software in the  G1.

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



[android-developers] INSTANT MESSAGING

2008-11-06 Thread theghost8800

The phone has everything I need except a good aim app.

I bought the phone to replace a sidekick lx

The aim needs

"font size smaller" - to be able to view contacts easier(the android
lets you see 3 onscreen so you need to scroll)
"away message editing" - ability to change status and give a summary
why(android just says "away")
"Icon picture" - (I can't see anyone's icon or post my own)
"buddy edit" - missing feature..

The list can go on forever. G1 users just want aim up to par with
the danger OS

currently its worse than a motorola razor im app

Also, onscreen keyboard

one of the only things the i phone wins the contest in

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



[android-developers] Creating tile view

2008-11-06 Thread Prashant

hi all,

i m planning to create a view in which i want one tile view , within
which i will need another four tile views, these innner tile view will
contain images or controls,

is it possible?

thanks in advance,
Prashant

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



[android-developers] An ANT Group of Taks for Emulator

2008-11-06 Thread Fred Grott(shareme)

Hello I am one of the often times jr contributors to Antenna ANT Tasks
for MIDP developers, ie j2me midp.

I am new here and may be working on new Android projects.


I am thinking of doing  a set of open source ANT Tasks for the Android
emulator.

How many developers would be interested in seeing such a contribution
and use it?

I will probably use Google Code to host

Also, to Google, is there any License preference..ie so that it can be
indlude in the Andorid SDK tools at soem point..


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



[android-developers] Re: Orientation change -> start Action/Service?

2008-11-06 Thread Michael

Or, just somewhere in your onCreate() for your activity, you can find
out the current orientation (see
getResources().getConfiguration().orientation ), and pick your Layout
from there.

You should also set android:screenOrientation="sensor" in your
AndroidManifest.xml, if you want to be notified of sensor-based
orientation changes, see onConfigurationChanged() in Activity for how
to handle this event.

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



[android-developers] Compressed Camera Images

2008-11-06 Thread Alvin Yates

I'm taking pictures with the Camera using takePicture(null, null,
myCallback), but taking pictures on the G1 gives me full 3.1M images
every single time.  I set the appropriate camera parameters in my
onSurfaceChanged() method that is in the Activity, which I know is
calling it as expected, but it seems to have no effect.

Is there a way to have the camera produce natively small images?  Do
they have to be a specific size?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] unable to see # in webview

2008-11-06 Thread vel

   final WebView wv = (WebView) findViewById(R.id.msgs);
   wv.loadData( "#", "text/html",
"utf-8");

nothing is displayed in the webview and once we try to load a #
character other characters following it are also not displayed

Pls any one can guide me why this weired behavior

Regards
Vel

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



[android-developers] Re: Can't return View derived class for BaseExpandableListAdapter? (used to work)

2008-11-06 Thread Mark Wyszomierski

Jason, thanks, that was exactly it, looks great now.

On Nov 6, 12:07 am, "Jason Parekh" <[EMAIL PROTECTED]> wrote:
> Hi Mark,
>
> The problem is when you do:
>
> >         mcv.setLayoutParams(new
> > LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
> > LayoutParams.WRAP_CONTENT));
>
> A view's layout parameters should be the type its parent expects to see
> (because those parameters are really used for the layout (parent) to store
> metadata for that child).  So, in this case, this mcv view wlil eventually
> go into a ListView, but you're saying to use LinearLayout.LayoutParams.
> Instead, try using ListView.LayoutParams.
>
> jason
>
> On Wed, Nov 5, 2008 at 1:09 PM, Mark Wyszomierski <[EMAIL PROTECTED]> wrote:
>
> > Hi Jason,
>
> > Could you show me the code of the View you're returning, to see if
> > that'll work for me instead?
>
> > Thanks
>
> > On Nov 4, 2:14 am, Mark Wyszomierski <[EMAIL PROTECTED]> wrote:
> > > Hi Jason,
>
> > > Thanks for the help, I'll post the stack trace below. Maybe I'm
> > > creating the view incorrectly. I tried something like:
>
> > >     public class MyChildView extends LinearLayout
> > >     {
> > >         public MyChildView(Context context)
> > >         {
> > >             super(context);
> > >         }
> > >     }
>
> > >     // Inside my BaseExpandableListAdapter extended class:
> > >     public View getChildView(int groupPosition,
> > >                                          int childPosition,
> > >                                          boolean isLastChild,
> > >                                          View convertView,
> > >                                          ViewGroup parent)
> > >     {
> > >         MyChildView mcv = new
> > > MyChildView(MyAdapter.this.getContext());
> > >         mcv.setLayoutParams(new
> > > LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
> > > LayoutParams.WRAP_CONTENT));
> > >         mcv.setOrientation(LinearLayout.HORIZONTAL);
> > >         mcv.addView(new ImageView(...));
> > >         mcv.addView(new TextView(...));
> > >         return mcv;  // <-- exception after return.
> > >     }
>
> > > Returning a TextView like in the API sample works ok. Here's the stack
> > > trace:
>
> > > 11-04 02:01:23.602: ERROR/AndroidRuntime(190): Uncaught handler:
> > > thread main exiting due to uncaught exception
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):
> > > java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.ListView.setupChild(ListView.java:1646)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.ListView.makeAndAddView(ListView.java:1619)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.ListView.fillDown(ListView.java:601)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.ListView.fillSpecific(ListView.java:1189)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.ListView.layoutChildren(ListView.java:1454)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.AbsListView.onLayout(AbsListView.java:937)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.view.View.layout(View.java:5637)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.FrameLayout.onLayout(FrameLayout.java:294)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.view.View.layout(View.java:5637)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.LinearLayout.layoutVertical(LinearLayout.java:999)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.LinearLayout.onLayout(LinearLayout.java:920)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.view.View.layout(View.java:5637)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.FrameLayout.onLayout(FrameLayout.java:294)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.view.View.layout(View.java:5637)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.LinearLayout.layoutVertical(LinearLayout.java:999)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.LinearLayout.onLayout(LinearLayout.java:920)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.view.View.layout(View.java:5637)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.widget.FrameLayout.onLayout(FrameLayout.java:294)
> > > 11-04 02:01:23.851: ERROR/AndroidRuntime(190):     at
> > > android.view.View.layout(View.java:5637)
> > > 11-0

[android-developers] Re: A network status info question

2008-11-06 Thread szeldon

What kind of crash was it? Was it an exception? If so, what exception
was it and what info it had?
On Nov 6, 4:04 pm, redmapleleaf <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> would someone kind enough to let me know what I am doing wrong with
> the following code. I would like to get the network status using the
> ConnectionManager, but everytime I made call to it crashed:
>
>                   ConnectivityManager cm =
> ConnectivityManager)mActivity.getSystemService(mActivity.CONNECTIVITY_SERVICE);
>
>                   NetworkInfo netinfo = cm.getActiveNetworkInfo();  IT 
> CRASHED
> HERE
>
>                   if(netinfo.getState() != NetworkInfo.State.CONNECTED){
>                           // display network not available alert
>                           return null;
>
>                   }
>
> Thank you very much for your help,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] A network status info question

2008-11-06 Thread redmapleleaf

Hi all,

would someone kind enough to let me know what I am doing wrong with
the following code. I would like to get the network status using the
ConnectionManager, but everytime I made call to it crashed:

  ConnectivityManager cm =
ConnectivityManager)mActivity.getSystemService(mActivity.CONNECTIVITY_SERVICE);

  NetworkInfo netinfo = cm.getActiveNetworkInfo();  IT 
CRASHED
HERE

  if(netinfo.getState() != NetworkInfo.State.CONNECTED){
  // display network not available alert
  return null;

  }

Thank you very much for your help,

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



  1   2   >