[android-developers] Re: [android-internals] Location Providers

2008-10-19 Thread Dianne Hackborn
They are implemented in the platform code, which hasn't yet been released.
I believe subclassing by apps is only for development on the emulator to
generate fake location information.

On Sat, Oct 18, 2008 at 1:49 PM, Bradley Kite <[EMAIL PROTECTED]>wrote:

>
> Hi all,
>
> The LocationProvider class (android.location.LocationProvider) is
> documented as being an abstract super-class, However I could not find
> any concrete classes (eg GPSLocationProvider, CellLocationProvider,
> WifiLocationProvider etc.).
>
> Does any body (either from within google, or otherwise) know which
> location providers are actually implemented?
>
> How would one go about implementing other LocationProviders?
>
> 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] If you have G1, can you check this for me?

2008-10-19 Thread denismo

Hi,

I just need to quickly check simple behavior: when connection doesn't
have GPRS enabled yet (typically, after switching off/on), and you go
online (open browser and browse google.com), does it show a popup
dialog asking user if he wants to allow a program to access internet?

For comparison, typical mobile phone (like Nokia) would ask user
before initiating so called "data connection" through GPRS. I'm trying
to find out whether the same will be with Android phones.

Thanks.

Denis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: If you have G1, can you check this for me?

2008-10-19 Thread Huebi

The iPhone doesn't ask as always-on internet access is one of the key
features. This is the same for Android so I would not expect any kind
of popup. You probably can allow it to roam or not but that's it. The
emulator control allows you to play with all these settings (data
connection available / not available / roaming etc). Just rely on what
happens in the emulator, that should do it.

On Oct 19, 11:21 am, denismo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just need to quickly check simple behavior: when connection doesn't
> have GPRS enabled yet (typically, after switching off/on), and you go
> online (open browser and browse google.com), does it show a popup
> dialog asking user if he wants to allow a program to access internet?
>
> For comparison, typical mobile phone (like Nokia) would ask user
> before initiating so called "data connection" through GPRS. I'm trying
> to find out whether the same will be with Android phones.
>
> Thanks.
>
> Denis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 import org.apache.commons.httpclient ?

2008-10-19 Thread jphdsn

Anyone has imported the package org.apache.commons.httpclient?

Is there a special mnipulation? If someone could give me a response it
will be fine.

thank's
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Implementing collision detection (Game)

2008-10-19 Thread mscwd01

I am fairly new to android, although I have been using Java for a
while.

I am creating a 2d maze based game which consists of a bunch of walls
and a rotating player piece (which rotates 360 degrees), while trying
to get from the entrance to the exit of the maze - without touching
the walls.

My question is, what is the best way to represent the walls of the
maze and the playing piece (which rotates, hence doesn't always occupy
the same location on screen) so that I can effectively check for
collisions between the two entities?

The level itself will be quite small so the maze will be a png
background image which moves when the player moves up, down, left or
right (the playing piece will remain at the center of the screen). I
was thinking of drawing a polygon object over the walls of the png
image and try to detect collisions between the rectangle playing piece
and the polygon shape - is this possible?

There may be a better way, if there is please let me know!

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



[android-developers] Re: Default the Spinner Selection

2008-10-19 Thread humanoid

I have the same problem. I want to pre-set the selection based on an
_id that is not the same as the position. I display a set of codes in
the spinner i.e.

_id   display

4 blue
5 green

i want when I have an _id of 4 to set the position to 0. I populate
the spinner dynamically from a DB so it is not trivial to find the
correspondence between the _id and corresponding position.

I have to say that the Android API is EXTREMELY painful with regards
to simple things like this!


On Oct 3, 5:30 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> You could use Spinner's setSelection(int position) method.
>
> 2008/10/3 Lonzo1968 <[EMAIL PROTECTED]>
>
>
>
> > I feel almost embarrassed to ask this.. But how do you default the
> > selection in a Spinner Widget? I have a Spinner that uses an
> > ArrayAdapter to fill the Selections. I get the value of the
> > Spinner from a database, and now I want to set the Spinner to that
> > selection when the user creates the Activity..
>
> > This seems like it should be simple, but I just don't see a method to
> > do this??
>
> > Thanks,
>
> > LA
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Issue in LinearLayout,Button

2008-10-19 Thread JavaAndroid

Hi All,
I tried quite a few applications present in web.. I was making a
custom view using Button and LinearLayout
public class SingleWeatherInfoView extends LinearLayout {

public SingleWeatherInfoView(Context context) {
super(context);
}

@SuppressWarnings("unchecked")
public SingleWeatherInfoView(Context context, AttributeSet attrs,
Map inflateParams) {
super(context, attrs,inflateParams);
}

}
Im getting error at this line super(context, attrs,inflateParams); it
says this constructor is undefined. I feel this Class might have
written for previous version of Emulator, Now its not recognizing this
constructor. Is there any way to make it work in m5 version.

Thanks in Advance

Thanks
JavaAndroid

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Populating a Spinner from SQLite

2008-10-19 Thread humanoid

Thanks GUS!

I actually figured it out myself. Now my next problem is how to set
the spinner to show the "position" based on the _id when I go back to
a page. 

On Oct 18, 4:38 pm, GUS <[EMAIL PROTECTED]> wrote:
> Well, I have an application that does that, but its for version m5.
> The code was something like this:
>
>                 // SPINNER
>                 s1 = (Spinner) findViewById(R.id.spinner1);
>                 ArrayAdapter adapter =
> ArrayAdapter.createFromResource(
>                                 this, R.array.tipo, 
> android.R.layout.simple_spinner_item);
>                 adapter
>                                 
> .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
>                 s1.setAdapter(adapter);
> //              s1.setSelection(1);
>
>                 s1.setOnItemSelectedListener(new 
> Spinner.OnItemSelectedListener() {
>
>                         public void onItemSelected(AdapterView parent, View v,
>                                         int position, long id) {
>                                 tipo = position;
>                         }
>
>                         public void onNothingSelected(AdapterView arg0) {
>                                 // TODO Auto-generated method stub
>
>                         }
>                 });
>                 // END SPINNER
>
> I'm gonna migrate the application an tell you later if something has
> changed.
>
> cordially, Gus.http://www.androidforum.com.br
>
> On 18 out, 12:06, humanoid <[EMAIL PROTECTED]> wrote:
>
> > All:
>
> > Has anybody figured out how to populate a Spinner from SQLite table,
> > displaying a description in the dropdown but getting an _id upon the
> > user clicking on a value.
>
> > I am trying to "recreate" the HTML select with which I am sure you are
> > all familiar.
>
> > Any feedback appreciated.
>
> > P.S. I know how to populate and display a single column values.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Background music in application

2008-10-19 Thread bins

hi...
thanks for u r replay...

Actually i am playing 2mb file ,,,which is have looping also.I am
calling Media player Inside a thread,Actually i need play background
music for my application,and it should not effect my application speed
also...

thanks bins
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 get help on /system/bin ash commands?

2008-10-19 Thread [EMAIL PROTECTED]

I have tried

# man
# help
# ?
# ls -help

and searched far and wide.

I am also wondering if "find" and "grep" are supported on the device?

Thanks again
Satya
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Populating a Spinner from SQLite

2008-10-19 Thread GUS

As far as I remember you can use the method setSelection(int
position).

On 19 out, 10:11, humanoid <[EMAIL PROTECTED]> wrote:
> Thanks GUS!
>
> I actually figured it out myself. Now my next problem is how to set
> the spinner to show the "position" based on the _id when I go back to
> a page. 
>
> On Oct 18, 4:38 pm, GUS <[EMAIL PROTECTED]> wrote:
>
> > Well, I have an application that does that, but its for version m5.
> > The code was something like this:
>
> >                 // SPINNER
> >                 s1 = (Spinner) findViewById(R.id.spinner1);
> >                 ArrayAdapter adapter =
> > ArrayAdapter.createFromResource(
> >                                 this, R.array.tipo, 
> > android.R.layout.simple_spinner_item);
> >                 adapter
> >                                 
> > .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
> >                 s1.setAdapter(adapter);
> > //              s1.setSelection(1);
>
> >                 s1.setOnItemSelectedListener(new 
> > Spinner.OnItemSelectedListener() {
>
> >                         public void onItemSelected(AdapterView parent, View 
> > v,
> >                                         int position, long id) {
> >                                 tipo = position;
> >                         }
>
> >                         public void onNothingSelected(AdapterView arg0) {
> >                                 // TODO Auto-generated method stub
>
> >                         }
> >                 });
> >                 // END SPINNER
>
> > I'm gonna migrate the application an tell you later if something has
> > changed.
>
> > cordially, Gus.http://www.androidforum.com.br
>
> > On 18 out, 12:06, humanoid <[EMAIL PROTECTED]> wrote:
>
> > > All:
>
> > > Has anybody figured out how to populate a Spinner from SQLite table,
> > > displaying a description in the dropdown but getting an _id upon the
> > > user clicking on a value.
>
> > > I am trying to "recreate" the HTML select with which I am sure you are
> > > all familiar.
>
> > > Any feedback appreciated.
>
> > > P.S. I know how to populate and display a single column values.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Is there a way to mount the emulator or the device as a hard drive on your local machine?

2008-10-19 Thread [EMAIL PROTECTED]

This would let me examine the files etc with the tools that are on the
local os.

is that possible?

If not the entire device, what about a specific directory root?

Thanks
Satya
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] "Wiring" emulator services to PC's

2008-10-19 Thread humanoid

All:

Is it possible to use a laptop's bluetooth (wireless connection, WiFi,
etc.) to "wire" them to the android emulator so that they can be used/
tested from within code as if the application was running on the
"real" thing.

Regards ...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 distinguish between dialing and active call states?

2008-10-19 Thread legerb

Anyone with some Telephony layer knowledge?

On Oct 5, 1:34 pm, legerb <[EMAIL PROTECTED]> wrote:
> I would like to catch the moment when an outgoing dialing call becomes
> active, that is accepted at the other side.
> according to the documentation the CALL_STATE_OFFHOOK :
> "Device call state: Off-hook. At least one call exists that is
> dialing, active, or on hold, and no calls are ringing or waiting."
> Makes no separation between the dialing and the active call states.
> Is there any other way to distinguish between those states?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 can the app icon be changed at runtime

2008-10-19 Thread parth

Hello Friend !
In mainfeast file there is one @drawable/icon it chang with any other
icon which stored in res/dra file

Thanks
Pravin Gajera


On Oct 18, 8:10 pm, omni <[EMAIL PROTECTED]> wrote:
> I'd like to be able to change the application icon at runtime; either
> by providing a completely new image, or by applying badgest to the
> existing icon.
>
> Can't seem to find a way to do it that actually works, and group
> search only reveals posts about changing views in  an activity.
>
> 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] Re: How can the app icon be changed at runtime

2008-10-19 Thread hackbod

Sorry, application icons can't be changed dynamically in 1.0.

On Oct 18, 8:10 am, omni <[EMAIL PROTECTED]> wrote:
> I'd like to be able to change the application icon at runtime; either
> by providing a completely new image, or by applying badgest to the
> existing icon.
>
> Can't seem to find a way to do it that actually works, and group
> search only reveals posts about changing views in  an activity.
>
> 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] Re: ContentHandler.startElement(..) and ContentHandler.endElement(..) won't be called in 1.0 rc1

2008-10-19 Thread thrusty


I am having a similar problem.  It looks like the startElement and
endElement methods of our ContentHandler are never called.

I'm guessing this is related to the Xml Pull Parser changes introduced
in 1.0rc1


On Sep 29, 7:08 am, Chris Cicc <[EMAIL PROTECTED]> wrote:
> Hello,
> I am also having a problem with the SAXParser that I believe is
> similar to your problem. I had a parser for a basic XML document that
> contained only nodes and text. This was working find for weeks with
> 0.9. But after the change to 1.0 RC1 it no longer works properly.
>
> Now, when it hits a node that contains the text, for instance "test &
> text", it will separate it into three records, "test", "&", "text".
> With 0.9 this would return "test & text" as you would assume. Using
> other special characters, such as % and *, work as expected. Anyone
> else see behavior like this?
>
> Any suggestions?
>
> Thanks,
> Chris
>
> On Sep 24, 11:09 am, Stefan Handschuh <[EMAIL PROTECTED]> wrote:
>
> > Following scenario:
>
> >SAXParsersaxParser= saxParserFactory.newSAXParser();
>
> >XMLReaderxmlReader=saxParser.getXMLReader();
>
> >xmlReader.setContentHandler(handler);
> >xmlReader.parse(someImputStream);
>
> > where handler implements ContentHandler.
>
> >xmlReader.parse(..) calls handler.characters(..) but neither
> > handler.startElement(..) nor handler.endElement(..).
>
> > This worked well in 0.9.
>
> > Can this regression be reproduced by anybody?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: ContentHandler.startElement(..) and ContentHandler.endElement(..) won't be called in 1.0 rc1

2008-10-19 Thread thrusty


I went ahead and filed a bug (#975) on this-- it looks like the
upgrade from 0.9 to 1.0rc1 broke SAX xml parsing.

http://code.google.com/p/android/issues/detail?id=975





On Oct 19, 11:02 am, thrusty <[EMAIL PROTECTED]> wrote:
> I am having a similar problem.  It looks like the startElement and
> endElement methods of our ContentHandler are never called.
>
> I'm guessing this is related to the Xml Pull Parser changes introduced
> in 1.0rc1
>
> On Sep 29, 7:08 am, Chris Cicc <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> > I am also having a problem with the SAXParser that I believe is
> > similar to your problem. I had a parser for a basic XML document that
> > contained only nodes and text. This was working find for weeks with
> > 0.9. But after the change to 1.0 RC1 it no longer works properly.
>
> > Now, when it hits a node that contains the text, for instance "test &
> > text", it will separate it into three records, "test", "&", "text".
> > With 0.9 this would return "test & text" as you would assume. Using
> > other special characters, such as % and *, work as expected. Anyone
> > else see behavior like this?
>
> > Any suggestions?
>
> > Thanks,
> > Chris
>
> > On Sep 24, 11:09 am, Stefan Handschuh <[EMAIL PROTECTED]> wrote:
>
> > > Following scenario:
>
> > >SAXParsersaxParser= saxParserFactory.newSAXParser();
>
> > >XMLReaderxmlReader=saxParser.getXMLReader();
>
> > >xmlReader.setContentHandler(handler);
> > >xmlReader.parse(someImputStream);
>
> > > where handler implements ContentHandler.
>
> > >xmlReader.parse(..) calls handler.characters(..) but neither
> > > handler.startElement(..) nor handler.endElement(..).
>
> > > This worked well in 0.9.
>
> > > Can this regression be reproduced by anybody?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: MapView and Zoom Control in 0.9 SDK

2008-10-19 Thread Matthias

that's still way too much code just to enable map zoom IMHO... a
map.showZoomControls(true) should be all that's needed, but thanks for
sharing, appreciated :-)

On Oct 17, 5:06 pm, "shailesh prakash" <[EMAIL PROTECTED]> wrote:
> Guys let me end the discussion with this,
>
>                 //---
>                 final ZoomControls zoomControls = (ZoomControls)
> findViewById(R.id.ZoomControls);
>
>                 zoomControls.setOnZoomInClickListener(new 
> ZoomControls.OnClickListener() {
>                                         public void onClick(View v) {
>                                                         
> zoomControls.setIsZoomInEnabled(tMapCtrl.zoomIn());
>                                                         
> zoomControls.setIsZoomOutEnabled(true);
>                                         }
>                                 });
>
>                 zoomControls.setOnZoomOutClickListener(new 
> ZoomControls.OnClickListener() {
>                                         public void onClick(View v) {
>                                                 
> zoomControls.setIsZoomOutEnabled(tMapCtrl.zoomOut());
>                                                 
> zoomControls.setIsZoomInEnabled(true);
>                                         }
>                                 });
>
> On Fri, Oct 17, 2008 at 8:26 PM, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > Matthias wrote:
> >> Just to get this straight, one has to *subclass* MapView in order to
> >> enable simple things such as zooming?
>
> > No.
>
> > Step #1: Put a spot for the zoom controls in your layout (e.g., a
> > LinearLayout named R.id.zoom)
>
> > Step #2: Tell Android where the zoom controls go:
>
> > ViewGroup zoom=(ViewGroup)findViewById(R.id.zoom);
>
> > zoom.addView(map.getZoomControls());
>
> > Step #3: There is no Step #3.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 import org.apache.commons.httpclient ?

2008-10-19 Thread Jason Proctor

for reasons which i hope were good, the package names were changed to 
live off org.apache.http. the name change has served to confuse 
everything a good deal, especially if like me you use the http client 
in both Android and non-Android environments.

you can find them in android.jar in the SDK distro, and google for a 
class to get its javadoc (usually).

hth


>Anyone has imported the package org.apache.commons.httpclient?
>
>Is there a special mnipulation? If someone could give me a response it
>will be fine.
>
>thank's
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: possible to lock device?

2008-10-19 Thread hackbod

Whoops, I just looked and this permission is not available to
applications.  Sorry, it isn't possible for apps to do this.

On Oct 18, 1:43 pm, Mast3rpyr0 <[EMAIL PROTECTED]> wrote:
> i added device_power but doesnt seem to do anything.
>
> On Oct 18, 8:01 am, e <[EMAIL PROTECTED]> wrote:
>
> > im have error
>
> > 10-18 17:27:58.569: ERROR/AndroidRuntime(204): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):
> > java.lang.SecurityException: Neither user 10017 nor current process
> > has android.permission.DEVICE_POWER.
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.os.Parcel.readException(Parcel.java:1234)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.os.Parcel.readException(Parcel.java:1222)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.os.IPowerManager$Stub$Proxy.goToSleep(IPowerManager.java:175)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.os.PowerManager.goToSleep(PowerManager.java:364)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > aexp.phoneintent.MyPhoneStateListener.onCallStateChanged(MyPhoneStateListener.java:
> > 114)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.telephony.PhoneStateListener
> > $2.handleMessage(PhoneStateListener.java:254)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.os.Handler.dispatchMessage(Handler.java:88)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.os.Looper.loop(Looper.java:123)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > android.app.ActivityThread.main(ActivityThread.java:3742)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > java.lang.reflect.Method.invoke(Method.java:515)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > com.android.internal.os.ZygoteInit
> > $MethodAndArgsCaller.run(ZygoteInit.java:739)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
> > 10-18 17:27:58.581: ERROR/AndroidRuntime(204):     at
> > dalvik.system.NativeStart.main(Native Method)
>
> > im using permission
>
> >  > permission>
> >  > permission>
> > On Oct 18, 11:32 am, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > Take a look in the log and see if there is an error message about not
> > > having a permission; I would assume that there is a permission needed
> > > to do this.
>
> > > On Oct 17, 7:59 pm, Mast3rpyr0 <[EMAIL PROTECTED]> wrote:
>
> > > > hmm that didnt seem to work right, i ran using the debugger and it did
> > > > infact run the method but nothing; heres what i got:
>
> > > > final PowerManager pm = (PowerManager)
> > > > getSystemService(Context.POWER_SERVICE);
> > > > ...
> > > > if(lock.equals("lock"))
> > > >                                                 {
> > > >                                                         
> > > > pm.goToSleep(1);
> > > >                                                 }
>
> > > > On Oct 17, 2:53 am, "shailesh prakash" <[EMAIL PROTECTED]> wrote:
>
> > > > > Sure it does, but if your phone is stolen then it should wake up in
> > > > > password lock mode and ack should send to alternative number or mail
> > > > > with gps location and cell ID(network operator's cell).
>
> > > > > On Fri, Oct 17, 2008 at 11:34 AM, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > > > > I believe PowerManager.goToSleep() should lock the device as part of
> > > > > > putting it to sleep:
>
> > > > > >http://code.google.com/android/reference/android/os/PowerManager.html...)
>
> > > > > > On Oct 16, 9:51 pm, Mast3rpyr0 <[EMAIL PROTECTED]> wrote:
> > > > > >> hmm i wish there was a simple lockDevice() method :P
> > > > > >> this is the last thing i need before i want to release my app.
> > > > > >> it goes out for a closed beta on the 22nd.
>
> > > > > >> On Oct 17, 12:33 am, "shailesh prakash" <[EMAIL PROTECTED]> wrote:
>
> > > > > >> > Hey Mast3rpyr0,
>
> > > > > >> > I did try it earlier but drop in between. I had plans to do it 
> > > > > >> > like this,
> > > > > >> >     Send SMS, broadcast receiver will listen it and open msg read
> > > > > >> > content match with data in SQLite database and change phone state
> > > > > >> > accordingly.
> > > > > >> > I implemented till the last and most tedious task, changing 
> > > > > >> > phone state.
> > > > > >> > Hope it will help you in some extent
>
> > > > > >> > On Fri, Oct 17, 2008 at 9:56 AM, Mast3rpyr0 <[EMAIL PROTECTED]> 
> > > > > >> > wrote:
>
> > > > > >> > > Im working on a security app that allows a user to track their 
> > > > > >> > > phone
> > > > > >> > > on a web site if they lose the phone or it is stolen. I 
> > > > > >> > > already have
> > > > > >> > > the part working where i could do this if a user selected lock 
> > > > 

[android-developers] Re: MAC address?

2008-10-19 Thread Tauno T

Just a note - this string is "null" in emulator and any application
can change the value of the string if it wants to (provided they have
the WRITE_SETTINGS permission).



Tauno

On Oct 18, 1:36 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Al Sutton wrote:
> > Just by looking at the docs, what about getting ANDROID_ID from the
> > System Settings?
>
> > The docs at
> >http://code.google.com/android/reference/android/provider/Settings.Sy...
> > say;
>
> >         public static final String
> >         
> >         ANDROID_ID
>
> > The Android ID (a unique 64-bit value) as a hex string. Identical to
> > that obtained by calling GoogleLoginService.getAndroidId(); it is also
> > placed here so you can get it without binding to a service.
> > Constant Value: "android_id"
>
> Ooo!
>
> That's got possibilities! It doesn't really say what the universe of
> "unique" is, but since it's static, one would hope it is unique to the
> device.
>
> I'll try it out later this morning -- many thanks!
>
> --
> 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] ImageButton layout issues

2008-10-19 Thread Alvin Yates

I am having a problem with how my images display.  For some reason, my
layout weights are being ignored and my set of ImageButtons in the
center of the screen are extending to the bottom of the screen,
completely removing the button beneath.  Basically, android:scaleType
is making the images fit exactly how I want, but the button area
itself is giving me headaches.

I am trying to get something that looks like this (Using LinearLayout
for each row):

ImageButton ImageButton ImageButton
|--- ImageButton ---|

The images I am currently using are being scaled down to fit the
button (Which works in the emulator, but completely breaks in the
Eclipse preview).  Should I manually shrink the images and scale them
up?  Is there something in the XML file that I am missing?  I'm really
looking for a solution involving defining the max size the button can
take up, but not finding anything that will do the job.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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 import org.apache.commons.httpclient ?

2008-10-19 Thread De San Nicolas Jean Philippe
thank's, I just have a look at the different classes and package, I don't
recognize lot of thing...


2008/10/19 Jason Proctor <[EMAIL PROTECTED]>

>
> for reasons which i hope were good, the package names were changed to
> live off org.apache.http. the name change has served to confuse
> everything a good deal, especially if like me you use the http client
> in both Android and non-Android environments.
>
> you can find them in android.jar in the SDK distro, and google for a
> class to get its javadoc (usually).
>
> hth
>
>
> >Anyone has imported the package org.apache.commons.httpclient?
> >
> >Is there a special mnipulation? If someone could give me a response it
> >will be fine.
> >
> >thank's
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] ad2p

2008-10-19 Thread stevenhaensgen

I and many others are waiting with baited breath if stereo bluetooth
will be added to the g1. while we all know the htc- dream is hardware
capable, we are hoping that we all don't fall down the "iphone"
pitfall that is ad2p. that phone is not enabled but fully capable.
please big google in the sky don't let us down.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Screen orientation from code / Permissions to use Surface.SetOrientation

2008-10-19 Thread Peter Bradshaw

Hello all,

I'm trying to set screen orientation from code. I couldn't find any
leads so I went digging and found Surface.SetOrientation. Trying to
use it gave a permissions error referring to
android.permission.ACCESS_SURFACE_FLINGER, so I added:



To my manifest.

However now I get:

WARN/PackageManager(51): Not granting permission
android.permission.ACCESS_SURFACE_FLINGER to package
com.flatfeetpete.androidhello (protectionLevel=2 flags=0x44).

When the app starts, and then the same error.

Is there an easier way to change the orientation from code? It seems
like an odd thing to need permission for if I'm running my own app.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] sending data from one program to another

2008-10-19 Thread roshan

I wanna know a possible way of sending data from one android
application to another. but not as sms s. UDP is quite i achieved. i
preffer TCP. But couldn't go ahead. please help me with 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] NIO Buffer position problem?

2008-10-19 Thread mbarbeaux

Hello,

I'm currently trying to port a Java JRE6 program into Google Android
platform. This program uses NIO buffers to read data from a binary
file. It needs to read byte and short from the file.

With standard JRE6, I could "navigate" throught the memory mapped data
using thoses kind of code :

final FileInputStream fis = 
final FileChannel channel = fis.getChannel();
byteBuffer = channel.map(MapMode.READ_ONLY, 0, channel.size());

// Read some bytes.
byteBuffer.get();
byteBuffer.get(array);

OK, this seems to work well too on Google Android. But problems start
to happen when I need to read short values after reading byte values
from the buffer.

When, in JRE6 platform, I do :

// Read a short value
byteBuffer.asShortBuffer().get();

I successfully retrieve the first short value at the corresponding
position from byteBuffer. Eg, if byteBuffer is at position 10, then it
reads two bytes (pos 11 and 12) and computes then as a short. That's
the standard functionnality.

But with Google Android, it doesn't seem to work that way. The same
code doesn't produce the same output :

// Read a short value
byteBuffer.asShortBuffer().get();

The "byteBuffer.asShortBuffer()" successfully returns a ShortBuffer,
but position seems to be lost in the creation of the ShortBuffer. Eg,
if position in byteBuffer was 10, the position of ShortBuffer is
actually 0. So when I read a short value from this ShortBuffer, it
actually read the two first bytes of the stream (0 and 1) instead of
reading bytes at position 11 and 12 as the normal JRE6 does.

Thus, each time I want to read a short value, either I must use the
ByteBuffer and computes by myself two bytes into one short, either I
use the "asShortBuffer" method but then I have to compute myself the
right position into the new buffer, thing I didn't have to make with
JRE6.

Is that a bug or a normal thing with Android ?
Thanks for your help,
Mikael

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Implementing collision detection (Game)

2008-10-19 Thread Robert Green

How did you express your walls programmatically?  Did you use tiles or
did you draw lines?

If you used tiles, the collision detection is very easy.  If the next
move will cause the player to enter the tile, game over.

If you drew the walls on a full coordinate system, you have to keep
the coordinates that you used in an array or list or wherever and
write a little algorithm that checks to see if the position of the
player on the next tick will intersect with a wall.

I used the second method for my game and it works very well.

I just wrote all this then reread and saw that you used a png
background.  Here's what you can do to use that:

Create a second background that is only black and white and masks the
png background you have.  Load both but of course only draw your
normal one.  Load the mask into a bitmap and for collision detection,
just call bitmap.getPixel() for the next position of your player.  If
it's the wall color (let's say you use white for walls), there is a
collision.

On Oct 19, 5:51 am, mscwd01 <[EMAIL PROTECTED]> wrote:
> I am fairly new to android, although I have been using Java for a
> while.
>
> I am creating a 2d maze based game which consists of a bunch of walls
> and a rotating player piece (which rotates 360 degrees), while trying
> to get from the entrance to the exit of the maze - without touching
> the walls.
>
> My question is, what is the best way to represent the walls of the
> maze and the playing piece (which rotates, hence doesn't always occupy
> the same location on screen) so that I can effectively check for
> collisions between the two entities?
>
> The level itself will be quite small so the maze will be a png
> background image which moves when the player moves up, down, left or
> right (the playing piece will remain at the center of the screen). I
> was thinking of drawing a polygon object over the walls of the png
> image and try to detect collisions between the rectangle playing piece
> and the polygon shape - is this possible?
>
> There may be a better way, if there is please let me know!
>
> Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How do I 'convert' web apps into Java apps that don't need to access the net?

2008-10-19 Thread William D. Volk

I understand that I can replace the main view in an Eclipse generated  
application with a WebView, and point it to my content, enable  
javascript and then have a web based (javascript) application that can  
be treated as a Java app (App Market etc...).

My question is simply this, how can I supply the HTML and Javascript  
for this app from Java so that it doesn't need to access the network  
every time it's run?  That is the HTML, Javascipt, and picture files.

Anyone know if this is possible?  Are there any tools that automate  
this?

Thanks,

Bill

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Tips for Orientation

2008-10-19 Thread Mark Hansen

I was thinking Android switched orientation automatically based on the
phones position but I'm finding from users this is not the case.

Anyone have some sample code on how to switch screen orientation based
on the position of the phone?

Thanks,

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



[android-developers] Permission denial when i try to modify system settings

2008-10-19 Thread Selmi

hi, i don't know if it wasn't answered many times already but i didn't
had luck to find solution

my manifest looks like this:


http://schemas.android.com/apk/res/android";
  package="com.android.gx5.ringtoneshuffler"
  android:versionCode="1"
  android:versionName="1.0.0">

















but when i get called to RingtoneShufflerReceiver and i try to mofidy
system settings with
RingtoneManager.setActualDefaultRingtoneUri(context,RingtoneManager.TYPE_RINGTONE,uri);
(i am trying to set new ringtone) i always get security exception
which says: Permission Denial: writing
com.android.providers.settings.SettingsProvider uri content://settings/system
from pid=561, uid=10017 requires android.permission.WRITE_SETTINGS

i have this in my uses_permission tags, what else i need to make it
work?

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] Re: Permission denial when i try to modify system settings

2008-10-19 Thread Jason Parekh
I believe your issue is the  tag needs to be a direct child
of the  tag, not the  tag.

jason

On Sun, Oct 19, 2008 at 3:45 PM, Selmi <[EMAIL PROTECTED]> wrote:

>
> hi, i don't know if it wasn't answered many times already but i didn't
> had luck to find solution
>
> my manifest looks like this:
>
> 
> http://schemas.android.com/apk/res/android";
>  package="com.android.gx5.ringtoneshuffler"
>  android:versionCode="1"
>  android:versionName="1.0.0">
>
>  android:label="@string/app_name">
>
>
> android:name="android.intent.category.LAUNCHER" />
>
>
> android:permission="android.permission.READ_PHONE_STATE">
>
>
>
>
>
>
> 
> 
>
> but when i get called to RingtoneShufflerReceiver and i try to mofidy
> system settings with
>
> RingtoneManager.setActualDefaultRingtoneUri(context,RingtoneManager.TYPE_RINGTONE,uri);
> (i am trying to set new ringtone) i always get security exception
> which says: Permission Denial: writing
> com.android.providers.settings.SettingsProvider uri
> content://settings/system
> from pid=561, uid=10017 requires android.permission.WRITE_SETTINGS
>
> i have this in my uses_permission tags, what else i need to make it
> work?
>
> 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] Re: Implementing collision detection (Game)

2008-10-19 Thread mscwd01

Thanks for your reply,

So just to recap...
I draw the main maze png background image and then have another image
I draw on top of this which is fully transparent apart from lines of
non transparent pixels which represent the maze walls. That sounds
nice and easy.

To make this work I'd need to find out the center point (coordinates)
of the screen, determine which coordinates the playing piece current
fills (i.e. y,x,y+10,x+10) and then check to see whether any of these
pixels are also occupied by the mask "walls" layer.

Could you let me know the best way to implement multiples layers, i.e.
the maze background image, the mask walls image and the playing piece.

Also could you let me know how you retrieve a section of pixels from
an image, so I can determine whether the mask layer for example has
walls in a section occupied by the playing piece.

Many thanks!



On Oct 19, 10:38 pm, Robert Green <[EMAIL PROTECTED]> wrote:
> How did you express your walls programmatically?  Did you use tiles or
> did you draw lines?
>
> If you used tiles, the collision detection is very easy.  If the next
> move will cause the player to enter the tile, game over.
>
> If you drew the walls on a full coordinate system, you have to keep
> the coordinates that you used in an array or list or wherever and
> write a little algorithm that checks to see if the position of the
> player on the next tick will intersect with a wall.
>
> I used the second method for my game and it works very well.
>
> I just wrote all this then reread and saw that you used a png
> background.  Here's what you can do to use that:
>
> Create a second background that is only black and white and masks the
> png background you have.  Load both but of course only draw your
> normal one.  Load the mask into a bitmap and for collision detection,
> just call bitmap.getPixel() for the next position of your player.  If
> it's the wall color (let's say you use white for walls), there is a
> collision.
>
> On Oct 19, 5:51 am, mscwd01 <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am fairly new to android, although I have been using Java for a
> > while.
>
> > I am creating a 2d maze based game which consists of a bunch of walls
> > and a rotating player piece (which rotates 360 degrees), while trying
> > to get from the entrance to the exit of the maze - without touching
> > the walls.
>
> > My question is, what is the best way to represent the walls of the
> > maze and the playing piece (which rotates, hence doesn't always occupy
> > the same location on screen) so that I can effectively check for
> > collisions between the two entities?
>
> > The level itself will be quite small so the maze will be a png
> > background image which moves when the player moves up, down, left or
> > right (the playing piece will remain at the center of the screen). I
> > was thinking of drawing a polygon object over the walls of the png
> > image and try to detect collisions between the rectangle playing piece
> > and the polygon shape - is this possible?
>
> > There may be a better way, if there is please let me know!
>
> > Thanks- 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: List View Issue

2008-10-19 Thread gymshoe

(I assume you are using the Eclipse IDE with android.)

I am a novice too, so of limited help.  But I do know that your
"Log.w() "statements don't print in the console "view", they print in
the LogCat "view" within the DDMS "perspective".  (Console is also a
view within the DDMS perspective.) To see the Log printouts, I think
you have to have the emulator itself selected in the Devices "view".
(If you don't  have the emulator selected, I think the LogCat doesn't
show you anything...)


Jim


On Oct 12, 9:45 am, JavaAndroid <[EMAIL PROTECTED]> wrote:
> Hi All,
> I m a novice in Google Android.. Just started with couple of tutorials
> present in Google Android Documentation page.
> I have modified the NotePad application present there. I have four
> textfields namely, employeeName,employeeAge,
> employeeQualification, employeeDept.
> I could insert a new record and delete an existing record, but i m
> facing problem in editing an existing record. When i click a record it
> says, the Application EmployeeInformation has stopped unexpectedly.
> Here is my EmployeeInfo class
> package com.dreamapp.employeeinfo.activity;
>
> import android.app.ListActivity;
> import android.content.Intent;
> import android.database.Cursor;
> import android.os.Bundle;
> import android.util.Log;
> import android.view.Menu;
> import android.view.MenuItem;
> import android.view.View;
> import android.widget.ListView;
> import android.widget.SimpleCursorAdapter;
>
> import com.dreamapp.employeeinfo.util.EmployeeDAO;
>
> public class EmployeeInfo extends ListActivity {
>         private static final int ACTIVITY_CREATE =0;
>         private static final int ACTIVITY_EDIT =1;
>
>         private static final int INSERT_ID = Menu.FIRST;
>         private static final int DELETE_ID = Menu.FIRST+1;
>
>         private EmployeeDAO employee;
>         private Cursor mCursor;
>
>         private static final String TAG="EmployeeInfo";
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.employee_list);
>         employee = new EmployeeDAO(this);
>         employee.open();
>         fillData();
>     }
>
>     public void fillData(){
>         mCursor = employee.fetchAllEmployeeInformation();
>         startManagingCursor(mCursor);
>
>         String[] from = new String[] {EmployeeDAO.EMP_NAME};
>
>         int[] to = new int[] {R.id.text1};
>         SimpleCursorAdapter employeeList =
>                 new SimpleCursorAdapter(this, R.layout.employee_row,
> mCursor,from, to);
>         setListAdapter(employeeList);
>     }
>
>     public boolean onCreateOptionsMenu(Menu menu){
>         super.onCreateOptionsMenu(menu);
>         menu.add(0, INSERT_ID, 0, R.string.menu_insert);
>         menu.add(0, DELETE_ID, 0, R.string.menu_delete);
>         return true;
>     }
>
>     public boolean onMenuItemSelected(int featureId, MenuItem item){
>         switch(item.getItemId()){
>         case INSERT_ID:
>                 insertEmployeeInformation();
>                 return true;
>         case DELETE_ID:
>                 employee.deleteEmployeenformation(getListView().
>                                  getSelectedItemId());
>                 fillData();
>                 return true;
>         }
>         return super.onMenuItemSelected(featureId, item);
>     }
>
>     public void insertEmployeeInformation(){
>         Intent i = new Intent(this,EmployeeEdit.class);
>         startActivityForResult(i, ACTIVITY_CREATE);
>     }
>
>     protected void onListItemClick(ListView l, View v, int position,
> long id){
>         super.onListItemClick(l, v, position, id);
>         Cursor c = mCursor;
>         Log.w(TAG, "Position in the List "+position);
>         c.moveToPosition(position);
>         Intent i = new Intent(this,EmployeeEdit.class);
>         i.putExtra(EmployeeDAO.KEY_ROW_ID, id);
>         i.putExtra(EmployeeDAO.EMP_NAME, c.getString(
>                         c.getColumnIndexOrThrow(EmployeeDAO.EMP_NAME)));
>         i.putExtra(EmployeeDAO.EMP_AGE, id);
>         i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getInt(
>                         
> c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION)));
>         i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getString(
>                         
> c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION)));
>         i.putExtra(EmployeeDAO.EMP_DEPT, c.getString(
>                         c.getColumnIndexOrThrow(EmployeeDAO.EMP_DEPT)));
>         startActivityForResult(i, ACTIVITY_EDIT);
>     }
>
>     protected void onActivityResult(int requestCode, int resultCode,
>                            Intent intent){
>         super.onActivityResult(requestCode, resultCode, intent);
>         Bundle extras = intent.getExtras();
>         switch(requestCode){
>         case ACTIVITY_CREATE:
>                 String employeeName = extras.getString(E

[android-developers] Updating Existing Contact Phone Number

2008-10-19 Thread blim

I've had no problem inserting a phone number but I have not been able
to update an existing phone number -- and I get no exceptions thrown
either.  Can somebody please help me?

I can update their name, e-mail, etc. but not their phone number.

contentValues.put(Contacts.Phones.PERSON_ID,
personId);
contentValues.put(Contacts.Phones.TYPE,
Phones.TYPE_MOBILE);
contentValues.put(Contacts.Phones.NUMBER,
updatedInfo.getMobileNumber());

getContentResolver().update(
 
Uri.withAppendedPath(Contacts.Phones.CONTENT_URI, personId),
contentValues, null, null);

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



[android-developers] Re: If you have G1, can you check this for me?

2008-10-19 Thread denismo

Thanks, I'll look for emulator settings (didn't see them before
though, but now that I know they must be somewhere there...), and rely
on the behavior.

Denis

On Oct 19, 8:56 pm, Huebi <[EMAIL PROTECTED]> wrote:
> The iPhone doesn't ask as always-on internet access is one of the key
> features. This is the same for Android so I would not expect any kind
> of popup. You probably can allow it to roam or not but that's it. The
> emulator control allows you to play with all these settings (data
> connection available / not available / roaming etc). Just rely on what
> happens in the emulator, that should do it.
>
> On Oct 19, 11:21 am, denismo <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I just need to quickly check simple behavior: when connection doesn't
> > have GPRS enabled yet (typically, after switching off/on), and you go
> > online (open browser and browse google.com), does it show a popup
> > dialog asking user if he wants to allow a program to access internet?
>
> > For comparison, typical mobile phone (like Nokia) would ask user
> > before initiating so called "data connection" through GPRS. I'm trying
> > to find out whether the same will be with Android phones.
>
> > Thanks.
>
> > Denis
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] this.finish() < did the activity totally exist??

2008-10-19 Thread Wesley Sagittarius

hi,

I don't know is it a issue or not???

when I this.finish() method was call... logically, it will exist the
process and remove in the process list right???

but when I got to check the process in the devices... my program seem
that still there wo is it normal???

any one have any idea on it???


Wesley.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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] Inflate Exception... how to diagnose?

2008-10-19 Thread DulcetTone

I have an XML file that causes an inflate exception with no
discernible detail to help me diagnose what went wrong

What is the best way to get Android to offer details on what was
objectionable?

tone

FYI, here was the XML:



http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10px">






















--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: this.finish() < did the activity totally exist??

2008-10-19 Thread Romain Guy

It is normal. finish() does not necessarily destroy the process.
Android manages processes automatically and destroy processes whenever
more resources are need. Just don't worry about it :)

On Sun, Oct 19, 2008 at 7:33 PM, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> I don't know is it a issue or not???
>
> when I this.finish() method was call... logically, it will exist the
> process and remove in the process list right???
>
> but when I got to check the process in the devices... my program seem
> that still there wo is it normal???
>
> any one have any idea on it???
>
>
> Wesley.
> >
>



-- 
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: this.finish() < did the activity totally exist??

2008-10-19 Thread Wesley
oic... because I afraid if some of my thread still running at the
background... and I can't manage to allocate it...
if this is the case... I think I should move on...

thanks Romain...

have a nice day...


Wesley.

On Mon, Oct 20, 2008 at 10:37 AM, Romain Guy <[EMAIL PROTECTED]> wrote:

>
> It is normal. finish() does not necessarily destroy the process.
> Android manages processes automatically and destroy processes whenever
> more resources are need. Just don't worry about it :)
>
> On Sun, Oct 19, 2008 at 7:33 PM, Wesley Sagittarius <[EMAIL PROTECTED]>
> wrote:
> >
> > hi,
> >
> > I don't know is it a issue or not???
> >
> > when I this.finish() method was call... logically, it will exist the
> > process and remove in the process list right???
> >
> > but when I got to check the process in the devices... my program seem
> > that still there wo is it normal???
> >
> > any one have any idea on it???
> >
> >
> > Wesley.
> > >
> >
>
>
>
> --
> 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: this.finish() < did the activity totally exist??

2008-10-19 Thread Wesley
hi,

how to terminate a threads??? any example???
how to free all resources???

do u mind give me some example a simple one will do...

thanks...



wesley.

On Mon, Oct 20, 2008 at 10:51 AM, Romain Guy <[EMAIL PROTECTED]> wrote:

>
> You should free all resources and terminate all your threads when you
> Activity stops or is destroyed (in onDestroy().)
>
> On Sun, Oct 19, 2008 at 7:50 PM, Wesley <[EMAIL PROTECTED]> wrote:
> > oic... because I afraid if some of my thread still running at the
> > background... and I can't manage to allocate it...
> > if this is the case... I think I should move on...
> >
> > thanks Romain...
> >
> > have a nice day...
> >
> >
> > Wesley.
> >
> > On Mon, Oct 20, 2008 at 10:37 AM, Romain Guy <[EMAIL PROTECTED]>
> wrote:
> >>
> >> It is normal. finish() does not necessarily destroy the process.
> >> Android manages processes automatically and destroy processes whenever
> >> more resources are need. Just don't worry about it :)
> >>
> >> On Sun, Oct 19, 2008 at 7:33 PM, Wesley Sagittarius <[EMAIL PROTECTED]
> >
> >> wrote:
> >> >
> >> > hi,
> >> >
> >> > I don't know is it a issue or not???
> >> >
> >> > when I this.finish() method was call... logically, it will exist the
> >> > process and remove in the process list right???
> >> >
> >> > but when I got to check the process in the devices... my program seem
> >> > that still there wo is it normal???
> >> >
> >> > any one have any idea on it???
> >> >
> >> >
> >> > Wesley.
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> 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: this.finish() < did the activity totally exist??

2008-10-19 Thread Romain Guy

You should free all resources and terminate all your threads when you
Activity stops or is destroyed (in onDestroy().)

On Sun, Oct 19, 2008 at 7:50 PM, Wesley <[EMAIL PROTECTED]> wrote:
> oic... because I afraid if some of my thread still running at the
> background... and I can't manage to allocate it...
> if this is the case... I think I should move on...
>
> thanks Romain...
>
> have a nice day...
>
>
> Wesley.
>
> On Mon, Oct 20, 2008 at 10:37 AM, Romain Guy <[EMAIL PROTECTED]> wrote:
>>
>> It is normal. finish() does not necessarily destroy the process.
>> Android manages processes automatically and destroy processes whenever
>> more resources are need. Just don't worry about it :)
>>
>> On Sun, Oct 19, 2008 at 7:33 PM, Wesley Sagittarius <[EMAIL PROTECTED]>
>> wrote:
>> >
>> > hi,
>> >
>> > I don't know is it a issue or not???
>> >
>> > when I this.finish() method was call... logically, it will exist the
>> > process and remove in the process list right???
>> >
>> > but when I got to check the process in the devices... my program seem
>> > that still there wo is it normal???
>> >
>> > any one have any idea on it???
>> >
>> >
>> > Wesley.
>> > >
>> >
>>
>>
>>
>> --
>> 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: Inflate Exception... how to diagnose?

2008-10-19 Thread Romain Guy

In the Logcat view of Eclipse (or from a shell, type adb logcat), you
will see the full stack trace with the explanation of what's wrong.

On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone <[EMAIL PROTECTED]> wrote:
>
> I have an XML file that causes an inflate exception with no
> discernible detail to help me diagnose what went wrong
>
> What is the best way to get Android to offer details on what was
> objectionable?
>
> tone
>
> FYI, here was the XML:
>
> 
>
> http://schemas.android.com/apk/res/
> android"
>android:layout_width="fill_parent"
>android:layout_height="wrap_content"
>android:padding="10px">
>
>android:layout_width="fill_parent"
>android:layout_height="wrap_content"
>android:drawSelectorOnTop="false"/>
>
>android:text="Output Speed"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_below="@id/skin_name"/>
>
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_toRightOf="@id/ospeed_label"/>
>
>
>android:text="Do incoming VAR"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_below="@id/ospeed"/>
>
>
>android:text="Input Speed"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_below="@id/var_output"/>
>
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_toRightOf="@id/ispeed_label"/>
>
>
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_below="@id/ispeed"
>android:layout_alignParentRight="true"
>android:layout_marginLeft="10px"
>android:text="OK" />
>
>android:layout_height="wrap_content"
>android:layout_toLeftOf="@id/ok"
>android:layout_alignTop="@id/ok"
>android:text="Cancel" />
> 
>
>
> >
>



-- 
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] Examples vs. Docs vs. Reality

2008-10-19 Thread ScottG

Folks, there is a serious disconnect between the examples that are
provided, what the documentation says, and what the Version 1.0 SDK
actually implements.

For openers, it'd be of great help to get rid of examples posted on
this forum and in Android docs that only work on m5.  I gotta believe
this is causing a lot of grief. I can understand old m5 code on the
Web but not on code.google.com.

Second, there are a number of m5 entry points that are implemented as
NOPs in v1.0.  This is NOT helpful.

Lots of good thinking as gone into V1.0.  It's a pity that it's so
hard to find.

IMHO, as always.

Cheers, Scott


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Tips for Orientation

2008-10-19 Thread hackbod

Use the android:screenOrientation attribute when declaring your
manifest:

http://code.google.com/android/reference/android/R.styleable.html#AndroidManifestActivity

http://code.google.com/android/reference/android/R.styleable.html#AndroidManifestActivity_screenOrientation

On Oct 19, 3:23 pm, Mark Hansen <[EMAIL PROTECTED]> wrote:
> I was thinking Android switched orientation automatically based on the
> phones position but I'm finding from users this is not the case.
>
> Anyone have some sample code on how to switch screen orientation based
> on the position of the phone?
>
> Thanks,
>
> Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: file that is wriiten on an SDCard not visible

2008-10-19 Thread for android
Thanks Mega for looking into this

I am seeing the sdcard from the emulator..When i start the emulator i have
given the option in eclipse of the location of the sdcard.So after i
download the file I want to view this file in the SDcard.I only see this the
file in the DDMS mode,so the file has actually been downloaded.But I have
not been able to figure out as to what stops me from seeing the file in the
sdcard.

Thanks
Guru

On Fri, Oct 17, 2008 at 12:28 PM, Megha Joshi <[EMAIL PROTECTED]> wrote:

>
>
> 2008/10/15 guru <[EMAIL PROTECTED]>
>
>>
>> I needed to download a file and store it in my sdcard.I first save it
>> by writing in the output stream(by using openFileOutput) in the
>> application package.From here I copy it to my SDCard and its written
>> on my SDCard.But when i see my SDCard in the file in the DDMS mode i
>> am able to see that file,
>
>
> If you see the file on your sdcard in the ddms file explorer  it should be
> there.
>
>
>> but in the SDCard i was not able to see that
>> file.
>
>
> Its not clear how you are viewing the sdcard in this case.
>
>
>
>> Please could anyone tell how can this be acheived.
>>
>>
>> heres the code snippet i use.
>>
>> String fileName = "myFileName";
>> File bufferedFile = new File("/sdcard/"+fileName);
>> copyFiletoSDCard(downloadingMediaFile,bufferedFile.getAbsolutePath());
>>
>> private void copyFiletoSDCard(File fromFile, String fileName) {
>>FileInputStream from = null;
>>FileOutputStream to = null;
>>try {
>>from = context.openFileInput(fromFile.getName());
>>to = new FileOutputStream(fileName);
>>byte[] buffer = new byte[4096];
>>int bytesRead;
>>
>>while ((bytesRead = from.read(buffer)) != -1)
>>to.write(buffer, 0, bytesRead); // write
>>} catch(IOException ioException){
>>Log.i(getClass().getName(),"ioException Msg");
>>
>>  Log.i(getClass().getName(),ioException.getMessage());
>>ioException.printStackTrace();
>>}finally {
>>if (from != null)
>>try {
>>from.close();
>>} catch (IOException e) {
>>;
>>}
>>if (to != null)
>>try {
>>to.close();
>>} catch (IOException e) {
>>;
>>}
>>}
>>
>>}
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Yet another HTTPS problem with HttpClient in Android SDK v1.0r1

2008-10-19 Thread vel

I am also facing the same problem.
Can please any one help us.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: Inflate Exception... how to diagnose?

2008-10-19 Thread for android
This post might help you also.

http://groups.google.com/group/android-developers/browse_thread/thread/f169c76bc7faccaf/cab78c24a36d3101?lnk=raot&pli=1

Also if you have done a sample for inflation.Could share a code snippet.I
also need it.

Thanks

On Mon, Oct 20, 2008 at 8:07 AM, Romain Guy <[EMAIL PROTECTED]> wrote:

>
> In the Logcat view of Eclipse (or from a shell, type adb logcat), you
> will see the full stack trace with the explanation of what's wrong.
>
> On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone <[EMAIL PROTECTED]> wrote:
> >
> > I have an XML file that causes an inflate exception with no
> > discernible detail to help me diagnose what went wrong
> >
> > What is the best way to get Android to offer details on what was
> > objectionable?
> >
> > tone
> >
> > FYI, here was the XML:
> >
> > 
> >
> > http://schemas.android.com/apk/res/
> > android"
> >android:layout_width="fill_parent"
> >android:layout_height="wrap_content"
> >android:padding="10px">
> >
> > >android:layout_width="fill_parent"
> >android:layout_height="wrap_content"
> >android:drawSelectorOnTop="false"/>
> >
> > >android:text="Output Speed"
> >android:layout_width="wrap_content"
> >android:layout_height="wrap_content"
> >android:layout_below="@id/skin_name"/>
> >
> > >android:layout_width="wrap_content"
> >android:layout_height="wrap_content"
> >android:layout_toRightOf="@id/ospeed_label"/>
> >
> >
> > >android:text="Do incoming VAR"
> >android:layout_width="wrap_content"
> >android:layout_height="wrap_content"
> >android:layout_below="@id/ospeed"/>
> >
> >
> > >android:text="Input Speed"
> >android:layout_width="wrap_content"
> >android:layout_height="wrap_content"
> >android:layout_below="@id/var_output"/>
> >
> > >android:layout_width="wrap_content"
> >android:layout_height="wrap_content"
> >android:layout_toRightOf="@id/ispeed_label"/>
> >
> >
> > >android:layout_width="wrap_content"
> >android:layout_height="wrap_content"
> >android:layout_below="@id/ispeed"
> >android:layout_alignParentRight="true"
> >android:layout_marginLeft="10px"
> >android:text="OK" />
> >
> > >android:layout_height="wrap_content"
> >android:layout_toLeftOf="@id/ok"
> >android:layout_alignTop="@id/ok"
> >android:text="Cancel" />
> > 
> >
> >
> > >
> >
>
>
>
> --
> 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: Stored data files in Android App

2008-10-19 Thread for android
These would be placed in ur application package which will be there in
data/data..You can view them in File Explorer in Eclipse with DDMS mode.

On Sat, Oct 18, 2008 at 10:51 PM, Le Duc Bao <[EMAIL PROTECTED]> wrote:

>
> Dear,
>
> I build a Android program with some static data files.
>
> I looked at Android Document:
> "Android provides access to read or write streams to files local to an
> application. Call Context.openFileOutput() and Context.openFileInput()
> with a local name and path to read and write files. Calling these
> methods with the same name and path strings from another application
> will not work; you can only access local files."
>
> If I have some existent data files, where they could be placed and how
> to read them by using Context.openFile*() methods?
>
> Thanks,
> Bao Le Duc
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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: background process

2008-10-19 Thread [EMAIL PROTECTED]

Thanks, i read it now.

i hope that will be the Answer



On 17 oct, 17:38, Ludwig <[EMAIL PROTECTED]> wrote:
> You will need to implement a service and have something that listens for the
> boot completed message being broadcast.
> I wrote about this 
> athttp://androidgps.blogspot.com/2008/09/starting-android-service-at-bo...
>
> HTH
>
> Ludwig
>
> 2008/10/17 [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>
>
>
> > I 'm interested too by running my program at the same time of boot,
> > and in background.
>
> > I try with thread, but that's display application, and next start
> > thread.
>
> > So that's not good.
>
> > any idea?
>
> > thanks
>
> > On 14 oct, 11:22, zeshu <[EMAIL PROTECTED]> wrote:
> > > How to design a process that boots itself up always at the same time
> > > with the device. This process should run on thebackground(like virus
> > > scanners), and observe what kind of events take place in the device
> > > (these events could be e.g. voice calls, network cell-id changes and
> > > incoming messages). If the process crashes, there should be some kind
> > > of implementation that initiates the process back up. How could this
> > > kind ofbackgroundprocess be built on Google Android?Please provide
> > > references/guidelines regarding how to start building and
> > > implementing 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: Inflate Exception... how to diagnose?

2008-10-19 Thread shailesh prakash

I don't know why you all complexing the problem. I t is just a missing
classname in provided namespace.
 As I can see there is no TextField in res/android namespace better
you try TextView

On Mon, Oct 20, 2008 at 11:55 AM, for android <[EMAIL PROTECTED]> wrote:
> This post might help you also.
>
> http://groups.google.com/group/android-developers/browse_thread/thread/f169c76bc7faccaf/cab78c24a36d3101?lnk=raot&pli=1
>
> Also if you have done a sample for inflation.Could share a code snippet.I
> also need it.
>
> Thanks
>
> On Mon, Oct 20, 2008 at 8:07 AM, Romain Guy <[EMAIL PROTECTED]> wrote:
>>
>> In the Logcat view of Eclipse (or from a shell, type adb logcat), you
>> will see the full stack trace with the explanation of what's wrong.
>>
>> On Sun, Oct 19, 2008 at 7:34 PM, DulcetTone <[EMAIL PROTECTED]> wrote:
>> >
>> > I have an XML file that causes an inflate exception with no
>> > discernible detail to help me diagnose what went wrong
>> >
>> > What is the best way to get Android to offer details on what was
>> > objectionable?
>> >
>> > tone
>> >
>> > FYI, here was the XML:
>> >
>> > 
>> >
>> > http://schemas.android.com/apk/res/
>> > android"
>> >android:layout_width="fill_parent"
>> >android:layout_height="wrap_content"
>> >android:padding="10px">
>> >
>> >> >android:layout_width="fill_parent"
>> >android:layout_height="wrap_content"
>> >android:drawSelectorOnTop="false"/>
>> >
>> >> >android:text="Output Speed"
>> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_below="@id/skin_name"/>
>> >
>> >> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_toRightOf="@id/ospeed_label"/>
>> >
>> >
>> >> >android:text="Do incoming VAR"
>> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_below="@id/ospeed"/>
>> >
>> >
>> >> >android:text="Input Speed"
>> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_below="@id/var_output"/>
>> >
>> >> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_toRightOf="@id/ispeed_label"/>
>> >
>> >
>> >> >android:layout_width="wrap_content"
>> >android:layout_height="wrap_content"
>> >android:layout_below="@id/ispeed"
>> >android:layout_alignParentRight="true"
>> >android:layout_marginLeft="10px"
>> >android:text="OK" />
>> >
>> >> >android:layout_height="wrap_content"
>> >android:layout_toLeftOf="@id/ok"
>> >android:layout_alignTop="@id/ok"
>> >android:text="Cancel" />
>> > 
>> >
>> >
>> > >
>> >
>>
>>
>>
>> --
>> 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: background process

2008-10-19 Thread [EMAIL PROTECTED]

I tryed it but, i Think It works. My programm run when the phone boot.
But it always be on the foreground.

I'd like not.



On 20 oct, 08:34, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Thanks, i read it now.
>
> i hope that will be the Answer
>
> On 17 oct, 17:38, Ludwig <[EMAIL PROTECTED]> wrote:
>
> > You will need to implement a service and have something that listens for the
> > boot completed message being broadcast.
> > I wrote about this 
> > athttp://androidgps.blogspot.com/2008/09/starting-android-service-at-bo...
>
> > HTH
>
> > Ludwig
>
> > 2008/10/17 [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>
> > > I 'm interested too by running my program at the same time of boot,
> > > and inbackground.
>
> > > I try with thread, but that's display application, and next start
> > > thread.
>
> > > So that's not good.
>
> > > any idea?
>
> > > thanks
>
> > > On 14 oct, 11:22, zeshu <[EMAIL PROTECTED]> wrote:
> > > > How to design a process that boots itself up always at the same time
> > > > with the device. This process should run on thebackground(like virus
> > > > scanners), and observe what kind of events take place in the device
> > > > (these events could be e.g. voice calls, network cell-id changes and
> > > > incoming messages). If the process crashes, there should be some kind
> > > > of implementation that initiates the process back up. How could this
> > > > kind ofbackgroundprocess be built on Google Android?Please provide
> > > > references/guidelines regarding how to start building and
> > > > implementing 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: this.finish() < did the activity totally exist??

2008-10-19 Thread Jason Parekh
This may be useful (first hit from 'java interrupt thread'):

http://articles.techrepublic.com.com/5100-10878_11-5144546.html

jason


On Sun, Oct 19, 2008 at 7:58 PM, Wesley <[EMAIL PROTECTED]> wrote:

> hi,
>
> how to terminate a threads??? any example???
> how to free all resources???
>
> do u mind give me some example a simple one will do...
>
> thanks...
>
>
>
> wesley.
>
>
> On Mon, Oct 20, 2008 at 10:51 AM, Romain Guy <[EMAIL PROTECTED]> wrote:
>
>>
>> You should free all resources and terminate all your threads when you
>> Activity stops or is destroyed (in onDestroy().)
>>
>> On Sun, Oct 19, 2008 at 7:50 PM, Wesley <[EMAIL PROTECTED]> wrote:
>> > oic... because I afraid if some of my thread still running at the
>> > background... and I can't manage to allocate it...
>> > if this is the case... I think I should move on...
>> >
>> > thanks Romain...
>> >
>> > have a nice day...
>> >
>> >
>> > Wesley.
>> >
>> > On Mon, Oct 20, 2008 at 10:37 AM, Romain Guy <[EMAIL PROTECTED]>
>> wrote:
>> >>
>> >> It is normal. finish() does not necessarily destroy the process.
>> >> Android manages processes automatically and destroy processes whenever
>> >> more resources are need. Just don't worry about it :)
>> >>
>> >> On Sun, Oct 19, 2008 at 7:33 PM, Wesley Sagittarius <
>> [EMAIL PROTECTED]>
>> >> wrote:
>> >> >
>> >> > hi,
>> >> >
>> >> > I don't know is it a issue or not???
>> >> >
>> >> > when I this.finish() method was call... logically, it will exist the
>> >> > process and remove in the process list right???
>> >> >
>> >> > but when I got to check the process in the devices... my program seem
>> >> > that still there wo is it normal???
>> >> >
>> >> > any one have any idea on it???
>> >> >
>> >> >
>> >> > Wesley.
>> >> > >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> 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
-~--~~~~--~~--~--~---