Re: [android-developers] Re: Regarding language change notification

2010-04-01 Thread Keiji Ariyama

Hi Dileep,

Hmm... File name is no matter I think.
I want to know what you're using to Android system component.

Where the thread is running? Activity, Service or BroadcastReceiver.

Regards,
keiji

(2010/04/02 12:30), Dilip Dilip wrote:

Hi Keiji,
   Its a thread runs under systemserver.java. I am looking for something
like subscribing for language change notification and reciving the event
on language notification.

Thanks and Regards,
   Dileep

On Fri, Apr 2, 2010 at 8:52 AM, Keiji Ariyama mailto:ml_andr...@c-lis.co.jp>> wrote:

Hi Vivek,

I'm sorry. I don't understand what you want to do.
Which component[Activity, Service or BroadcastReceiver] is used in
your code?

Please tell me about more detail.

Regards,
Keiji


(2010/04/01 16:53), Dilip Dilip wrote:

Hi All,
   Thanks for all the replys. Is there any other method to recieve
notification. My Service is not actually a service, it runs as a
thread
in other service, so i am not able to override it.
like subscribing for an event ??

Thanks and Regards,
   Vivek R

On Wed, Mar 31, 2010 at 5:12 AM, Paul Turchenko
mailto:paul.turche...@gmail.com>
<mailto:paul.turche...@gmail.com
<mailto:paul.turche...@gmail.com>>> wrote:

override onConfigurationChanged()

On Mar 30, 11:51 am, Dilip Dilip mailto:dileep2m...@gmail.com>
<mailto:dileep2m...@gmail.com <mailto:dileep2m...@gmail.com>>>
wrote:
 > Hi All,
 >  How to recieve the language change notification in my service?
 > I want to get a notification to my service whenever the user
changes the
 > phone language.
 >
 > Thanks and Regards,
 >   Dileep

--
You received this message because you are subscribed to the
Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com
<mailto:android-developers@googlegroups.com>
<mailto:android-developers@googlegroups.com
<mailto:android-developers@googlegroups.com>>

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
<mailto:android-developers%2bunsubscr...@googlegroups.com>
<mailto:android-developers%2bunsubscr...@googlegroups.com
<mailto:android-developers%252bunsubscr...@googlegroups.com>>

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.


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


--
Keiji,
ml_andr...@c-lis.co.jp <mailto:ml_andr...@c-lis.co.jp>

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


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


--
Keiji,
ml_andr...@c-lis.co.jp

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


Re: [android-developers] Re: Regarding language change notification

2010-04-01 Thread Keiji Ariyama

Hi Vivek,

I'm sorry. I don't understand what you want to do.
Which component[Activity, Service or BroadcastReceiver] is used in your 
code?


Please tell me about more detail.

Regards,
Keiji

(2010/04/01 16:53), Dilip Dilip wrote:

Hi All,
   Thanks for all the replys. Is there any other method to recieve
notification. My Service is not actually a service, it runs as a thread
in other service, so i am not able to override it.
like subscribing for an event ??

Thanks and Regards,
   Vivek R

On Wed, Mar 31, 2010 at 5:12 AM, Paul Turchenko
mailto:paul.turche...@gmail.com>> wrote:

override onConfigurationChanged()

On Mar 30, 11:51 am, Dilip Dilip mailto:dileep2m...@gmail.com>> wrote:
 > Hi All,
 >  How to recieve the language change notification in my service?
 > I want to get a notification to my service whenever the user
changes the
 > phone language.
 >
 > Thanks and Regards,
 >   Dileep

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.


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


--
Keiji,
ml_andr...@c-lis.co.jp

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


Re: [android-developers] Regarding language change notification

2010-03-30 Thread Keiji Ariyama

Hi Dileep,

I suppose that your service can receive broadcast intent that is 
"ACTION_CONFIGURATION_CHANGED".


--
Keiji,
ml_andr...@c-lis.co.jp

(2010/03/30 17:51), Dilip Dilip wrote:

Hi All,
  How to recieve the language change notification in my service?
I want to get a notification to my service whenever the user changes the
phone language.
Thanks and Regards,
   Dileep

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

To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email
with the words "REMOVE ME" as the subject.


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: [android-developers] Re: Debugging on Acer Liquid

2009-12-12 Thread Keiji Ariyama
Hi, I have succeeded.

; Acer Liquid
%SingleBootLoaderInterface% = USB_Install, USB\VID_0502&PID_3201
%SingleBootLoaderInterface% = USB_Install, USB\VID_0502&PID_3202&MI_00
%SingleAdbInterface% = USB_Install, USB\VID_0502&PID_3202&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0502&PID_3202&MI_02
%CompositeAdbInterface% = USB_Install, USB\VID_0502&PID_3202&MI_03

Thanks,
Keiji

Keiji Ariyama wrote:
> Hi,
> 
> Thank you for your providing information.
> 
> However, my liquid is still not working...
> My "Liquid" have been detected as four devices by my PC(Windows XP and 
> Vista).
> 
> USB\VID_0502&PID_3202&MI_00
> USB\VID_0502&PID_3202&MI_01
> USB\VID_0502&PID_3202&MI_02
> USB\VID_0502&PID_3202&MI_03
> 
> I tried your method[many combination] but not succeeded.
> 
> 
>  > adb devices
> List of devices attached
> 
> Would anyone give me any idea?
> I appreciate to any help.
> 
> Keiji,
> 
> bestpriv...@googlemail.com wrote:
>> Okay, I got it working this way:
>>
>> 1. get the latest usb updates
>>
>> 2. modify your android_winusb.inf file by adding these three lines to
>> [Google.NTx86] and [Google.NTamd64]:
>> ; Acer Liquid
>> %SingleAdbInterface%= USB_Install, USB\VID_0502&PID_3202
>> %CompositeAdbInterface% = USB_Install, USB\VID_0502&PID_3202&MI_01
>>
>> 3. if windows aks you for a driver, select manual, choose ADB
>> Interface and point to the android_winusb.inf file
>>
>> 4. start Eclipse and you should be able to debug on your Acer
>> Liquid :-)
>>
>> Unfortunately logcat seems to report "Invalid Argument" within Eclipse
>> only.
>> However, these commands should do it for a while:
>> adb logcat -c
>> adb -d logcat
>>
>> Maybe somebody else can help out to make logcat work within Eclipse?
>> Still I hope that Google and device manufacturers will provide better
>> support in the future.
>> I heared a lot of developers having trouble with on-device-debugging
>> (e.g. Samsung Galaxy).
>> We have better stuff to ... :-)
>>
>>
>> On 11 Dez., 13:55, "bestpriv...@googlemail.com"
>>  wrote:
>>> I have problems to start debugging on my new Acer Liquid.
>>> Windows XP SP3 always tells me that it cannot find any drivers for the
>>> "Acer HSUSB Device".
>>> I already installed the latest usb drivers (Revision 2, November 2009)
>>> using the SDK Manager.
>>> Do I have to wait for a new revision?
>>> Does somebody else have this problem?
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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


Re: [android-developers] Re: Debugging on Acer Liquid

2009-12-12 Thread Keiji Ariyama
Hi,

Thank you for your providing information.

However, my liquid is still not working...
My "Liquid" have been detected as four devices by my PC(Windows XP and 
Vista).

USB\VID_0502&PID_3202&MI_00
USB\VID_0502&PID_3202&MI_01
USB\VID_0502&PID_3202&MI_02
USB\VID_0502&PID_3202&MI_03

I tried your method[many combination] but not succeeded.


 > adb devices
List of devices attached

Would anyone give me any idea?
I appreciate to any help.

Keiji,

bestpriv...@googlemail.com wrote:
> Okay, I got it working this way:
> 
> 1. get the latest usb updates
> 
> 2. modify your android_winusb.inf file by adding these three lines to
> [Google.NTx86] and [Google.NTamd64]:
> ; Acer Liquid
> %SingleAdbInterface%= USB_Install, USB\VID_0502&PID_3202
> %CompositeAdbInterface% = USB_Install, USB\VID_0502&PID_3202&MI_01
> 
> 3. if windows aks you for a driver, select manual, choose ADB
> Interface and point to the android_winusb.inf file
> 
> 4. start Eclipse and you should be able to debug on your Acer
> Liquid :-)
> 
> Unfortunately logcat seems to report "Invalid Argument" within Eclipse
> only.
> However, these commands should do it for a while:
> adb logcat -c
> adb -d logcat
> 
> Maybe somebody else can help out to make logcat work within Eclipse?
> Still I hope that Google and device manufacturers will provide better
> support in the future.
> I heared a lot of developers having trouble with on-device-debugging
> (e.g. Samsung Galaxy).
> We have better stuff to ... :-)
> 
> 
> On 11 Dez., 13:55, "bestpriv...@googlemail.com"
>  wrote:
>> I have problems to start debugging on my new Acer Liquid.
>> Windows XP SP3 always tells me that it cannot find any drivers for the
>> "Acer HSUSB Device".
>> I already installed the latest usb drivers (Revision 2, November 2009)
>> using the SDK Manager.
>> Do I have to wait for a new revision?
>> Does somebody else have this problem?
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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


[android-developers] Re: 1.6 images for the ADP1 from HTC!

2009-09-29 Thread Keiji Ariyama

Hi

I updated my ADP1 using recovery image.
The update process was succeeded. But an error message has been 
displayed when system rebooted.

LogCat messages are below.

> 06-21 09:53:35.347: ERROR/DatabaseUtils(152):
> java.lang.SecurityException: Permission Denial: writing
> com.google.android.providers.settings.GoogleSettingsProvider uri
> content://com.google.settings/partner from pid=219, uid=10050 requires
> com.google.android.providers.settings.permission.WRITE_GSETTINGS
> 06-21 09:53:35.347: ERROR/DatabaseUtils(152): at
> android.content.ContentProvider$Transport.enforceWritePermission(ContentProvider.java:276)
> 06-21 09:53:35.347: ERROR/DatabaseUtils(152): at
> android.content.ContentProvider$Transport.insert(ContentProvider.java:139)
> 06-21 09:53:35.347: ERROR/DatabaseUtils(152): at
> android.content.ContentProviderNative.onTransact(ContentProviderNative.java:125)
> 06-21 09:53:35.347: ERROR/DatabaseUtils(152): at
> android.os.Binder.execTransact(Binder.java:287)
> 06-21 09:53:35.347: ERROR/DatabaseUtils(152): at
> dalvik.system.NativeStart.run(Native Method)

After all, I did factory reset. This problem was solved.
That's strange...

Anyone have same situation?

--
Keiji Ariyama

BoD wrote:
> Maybe it has been announced already and I missed it, but just in case:
> => http://developer.htc.com/adp.html !
> 
> BoD
> > 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: Have GET_INTENT_FILTERS been supported?

2009-09-04 Thread Keiji Ariyama

Hi EdoMike,

I'm sorry to bother you.
And Thank you for your kindness!

--
Keiji Ariyama

EboMike wrote:
> There is a very recent thread right here where this is being
> discussed. The last post was a few days ago.
> 
> http://groups.google.com/group/android-developers/browse_frm/thread/c72762894a5663b3
> 
> In short: It's not supposed yet, and it is not an immediate priority.
> 
> -Mike
> 
> 
> On Sep 3, 9:31 am, Keiji Ariyama  wrote:
>> Hi,
>>
>> I'm trying to get IntentFilter informations from ActivityInfo object.
>> But I haven't succeeded it.
>>
>> I found below article. The article is written at last 
>> year.http://groups.google.co.jp/group/android-developers/browse_thread/thr...
>>
>> Is this not supported yet?
>>
>> --
>> Keiji,
>> ml_andr...@c-lis.co.jp
> > 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Have GET_INTENT_FILTERS been supported?

2009-09-03 Thread Keiji Ariyama

Hi,

I'm trying to get IntentFilter informations from ActivityInfo object.
But I haven't succeeded it.

I found below article. The article is written at last year.
http://groups.google.co.jp/group/android-developers/browse_thread/thread/4502827143ea9b20?pli=1

Is this not supported yet?

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: disable HOME key and right soft key

2009-08-23 Thread Keiji Ariyama

Hi Shang,

You can use END_BUTTON_BEHAVIOR setting in Settings.System.

Android Developers
http://developer.android.com/reference/android/provider/Settings.System.html#END_BUTTON_BEHAVIOR

What happens when the user presses the end call button if they're not on 
a call.
Values:
0 - The end button does nothing.
1 - The end button goes to the home screen.
2 - The end button puts the device to sleep and locks the keyguard.
3 - The end button goes to the home screen. If the user is already on 
the home screen, it puts the device to sleep.

Cheers,
Keiji

Dianne Hackborn wrote:
> You already said it, PhoneWindowManager is what handles the keys.
> 
> On Sun, Aug 23, 2009 at 9:53 PM, Shang Hao  > wrote:
> 
> 
> Hi Roman,
> 
> Accepted that I cannot play around with these keys from apps...But
> there must be a way somewhere where they must be getting handledi
> just need to broadcast and make these keys handling ineffective/
> effective Can u help me with the files which i should be looking
> for
> 
> Thanks.
> 
> On Aug 23, 7:42 pm, Romain Guy  > wrote:
>  > You cannot disabled these keys from an application.
>  >
>  >
>  >
>  > On Sun, Aug 23, 2009 at 6:53 PM, Shang Hao > wrote:
>  >
>  > > Hi Mark,
>  >
>  > > Thanks for your reply.. I actually meant the home key and the
> End call
>  > > button on the device. For home key i have found a solution at
>  > > PhoneWindowManager.java @framework Any idea about the End call
>  > > button??
>  >
>  > > Thanks.
>  >
>  > > On Aug 22, 4:03 am, Mark Murphy  > wrote:
>  > >> Shang Hao wrote:
>  > >> > Hi,
>  > >> > dis
>  > >> > I m making a test application and want to able all keys
> excluding the
>  > >> > back button.. Using below code i am not able to disable
> HOME key
>  > >> > and right soft key. Please suggest what to do.
>  >
>  > >> >@Override
>  > >> >public boolean onKeyDown(int keyCode, KeyEvent event) {
>  > >> >if(keyCode == KeyEvent.KEYCODE_BACK){
>  > >> >return super.onKeyDown(keyCode, event);
>  > >> >}
>  > >> >else   {
>  > >> >return true;
>  > >> >}
>  >
>  > >> >}
>  >
>  > >> You cannot disable the home key, and Android does not have
> soft keys.
>  >
>  > >> --
>  > >> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>  >
>  > >> _Beginning Android_ from Apress Now Available!
>  >
>  > --
>  > Romain Guy
>  > Android framework engineer
>  > romain...@android.com 
>  >
>  > Note: please don't send private questions to me, as I don't have time
>  > to provide private support.  All such questions should be posted on
>  > public forums, where I and others can see and answer them
> 
> 
> 
> 
> -- 
> Dianne Hackborn
> Android framework engineer
> hack...@android.com 
> 
> Note: please don't send private questions to me, as I don't have time to 
> provide private support, and so won't reply to such e-mails.  All such 
> questions should be posted on public forums, where I and others can see 
> and answer them.
> 
> 
> > 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: Paid App Support for developers from India

2009-04-07 Thread Keiji Ariyama

Hi Karthik,

I am Keiji Ariyama.  I'm Japanese developer.
Do you want to sell your apps to people of India?

Or you want to make public your apps on Android Market?
If so, you would launch corporate in United States? I'm not kidding. Of 
course.
And you might be able to cooperate with many companies in U.S.

Regards,
Keiji,

karthikr wrote:
> Hey,
> 
> Im a developer from India.
> 
> I want to know when developers from India can release paid apps to the
> android market.
> 
> I have spent lot of time in developing and maintaining the quality of
> applications.
> 
> But I have to wait for a loong time to see the actual results, please
> tell me as to when there will be support for the same.
> 
> Im really frsutraed in having to wait for a long time to release the
> app after finishing it,
> 
> Regards,
> R.Karthik
> 
> > 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: How can I add subfolders to res

2009-02-26 Thread Keiji Ariyama

Hi susanner,

You can do right click on the res folder.

Cheers

susanner wrote:
> 
> I see folder res in APIDEMO in SDK contains subfolders as raw , anim , 
> xml ...,but mine only have basic three folders drawable, layout ,values, 
> how can I add subfolders to res/ and let eclipse produce a corresponding 
> R.java in my app?
>  
>  
> 
> 
> 
> 网易邮箱,中国第一大电子邮件服务商 
> > 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: LocationListener and location api working in Android Dev Phone (G1)

2009-02-18 Thread Keiji Ariyama

sheik,

I have ADP1. I have tested that code(have added super call)
As far as I understand, this is working fine.


Keiji,

---
public class GPSActivity extends Activity {

// LocationManager
private LocationManager _mLocMan;

// LocationListener Interface
private final LocationListener _mLocationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
// implement here
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras)
{
}
}; // _mLocationListener

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// get Location Manager
_mLocMan
= (LocationManager)this.getSystemService(LOCATION_SERVICE);

// register location listener
_mLocMan.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
0,
0,
_mLocationListener);

} // onCreate

@Override
public void onDestroy() {
super.onDestroy();

// unregister location listener
_mLocMan.removeUpdates(_mLocationListener);

} // onDestroy

} // GPSActivity

---



sheik wrote:
> Thank you for your response...
> 
> I have been using the some wat same  code to run in the emulator and
> it works fine as you have mentioned in response
> 
> My actual doubt was that, does it work in the ADP1 as i dont have
> handson  G1 or the DEV PHONE..
> 
> I like to know .Have u tested above code in the dev phone if it
> has worked well my doubt very much cleared 
> 
> Thank you agin...
> regards
> sheik
> 
> On Feb 19, 11:06 am, Keiji Ariyama  wrote:
>> Hi sheik,
>>
>> Please see below code. And you can see 
>> reference.http://developer.android.com/reference/android/location/LocationListe...
>>
>> 1. Implement LocationListener interface.
>> 2. Get Location Manager.
>> 3. Register LocationListener to LocationManager.
>>
>> LocationListener.onLocationChanged(Location location) method is called
>> when GPS can receive location.
>>
>> You can set minimum interval time or distance to work GPS on
>> requestLocationUpdates method.
>>
>> Attention, if LocationListener is once registered, GPS will be being
>> activated basically.
>> You should call to LocationManager.removeUpdates at onDestroy or onStop.
>>
>> Good luck,
>> Keiji
>>
>> ---
>> public class GPSActivity extends Activity {
>>
>> // LocationManager
>> private LocationManager _mLocMan;
>>
>> // LocationListener Interface
>> private final LocationListener _mLocationListener = new LocationListener() {
>> @Override
>> public void onLocationChanged(Location location) {
>> // implement here
>> }
>> @Override
>> public void onProviderDisabled(String provider) {
>> }
>> @Override
>> public void onProviderEnabled(String provider) {
>> }
>> @Override
>> public void onStatusChanged(String provider, int status, Bundle 
>> extras)
>> {
>> }
>>
>> }; // _mLocationListener
>>
>> @Override
>> public void onCreate(Bundle savedInstanceState) {
>>
>> // get Location Manager
>> _mLocMan
>> = (LocationManager)this.getSystemService(LOCATION_SERVICE);
>>
>> // register location listener
>> _mLocMan.requestLocationUpdates(
>> LocationManager.GPS_PROVIDER,
>> 0,
>> 0,
>> _mLocationListener);
>>
>> } // onCreate
>>
>> @Override
>> public void onDestroy() {
>> // unregister location listener
>> _mLocMan.removeUpdates(_mLocationListener);
>>
>> } // onDestroy
>> } // GPSActivity
>>
>> ---
>>
>>
>>
>> sheik wrote:
>>> Hi,
>>>  i need to know about the LocationListener() working in the Android
>>> DEV Phone(ADP1)
>>> Does it expect  the user(device) to move in order to update the
>>> current location de

[android-developers] Re: LocationListener and location api working in Android Dev Phone (G1)

2009-02-18 Thread Keiji Ariyama

Hi sheik,

Please see below code. And you can see reference.
http://developer.android.com/reference/android/location/LocationListener.html

1. Implement LocationListener interface.
2. Get Location Manager.
3. Register LocationListener to LocationManager.

LocationListener.onLocationChanged(Location location) method is called 
when GPS can receive location.

You can set minimum interval time or distance to work GPS on 
requestLocationUpdates method.

Attention, if LocationListener is once registered, GPS will be being 
activated basically.
You should call to LocationManager.removeUpdates at onDestroy or onStop.

Good luck,
Keiji

---
public class GPSActivity extends Activity {

// LocationManager
private LocationManager _mLocMan;

// LocationListener Interface
private final LocationListener _mLocationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
// implement here
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras)
{
}
}; // _mLocationListener

@Override
public void onCreate(Bundle savedInstanceState) {

// get Location Manager
_mLocMan
= (LocationManager)this.getSystemService(LOCATION_SERVICE);

// register location listener
_mLocMan.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
0,
0,
_mLocationListener);

} // onCreate

@Override
public void onDestroy() {
// unregister location listener
_mLocMan.removeUpdates(_mLocationListener);

} // onDestroy

} // GPSActivity

---

sheik wrote:
> Hi,
>  i need to know about the LocationListener() working in the Android
> DEV Phone(ADP1)
> 
> Does it expect  the user(device) to move in order to update the
> current location details or it automatically updates when ever the gps
> is enabled?
> 
> Another query is regarding the getLastKnownLocation().
> 
> When is that last known location will be lost and thus returns null...
> (ADP1)...
> 
> Thanks,
> regards,
> sheik
> > 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: GPS LocationManager Problem

2009-02-18 Thread Keiji Ariyama

Hi,

Correctly, it's ACCESS_FINE_LOCATION.

http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_FINE_LOCATION

This is still being here.

Sohail wrote:
> I can't find that permission in the official documentation. Isn't this
> deprecated?
> 
> Secondly, I'm using the emulator. I've tried both using the DDMS and
> telnet (geo fix) to send the coordinates. Both with no luck. I read
> somewhere that this works on windows. I'm using ubuntu (if that
> matters.)
> 
> (Just in case, I don't get any exception, just a null)
> 
> On Feb 17, 11:32 pm, Timo Bruck  wrote:
>> Have you also added permissions for
>> android.permission.ACCESS_LOCATION? I believe you need both.
> > 
> 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: GPS LocationManager Problem

2009-02-17 Thread Keiji Ariyama

Hi sohail,

Which do you use an emulator or Android Dev Phone 1?

In case of an emulator, you have to set location to emulator before 
calling getLastKnowLocation() method by adb command or DDMS.

-- 
Keiji,
ml_andr...@c-lis.co.jp


sohail khan wrote:
> I am developing an application that uses the GPS functionality. I am 
> getting a null pointer exception at the code below:
> 
> Location l = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
> 
> The java docs for the getLastKnownLocation states that: " if the 
> provider is disabled, null is returned.
> 
> I am getting null for the value of "l".
> 
> I have also send the GPS coordinates using the DDMS tool and have 
> assigned the permissions for using GPS "ACCESS_FINE_LOCATION".
> 
> What does it means by "disabled provider" and how to handle this error.
> 
> 
> Thank you in advance.
>  
> -- sohail
> 
> > 


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



[android-developers] Re: Where is a system-image for DP1?

2009-02-09 Thread Keiji Ariyama

Jean,

Thank you for your response.
I'm looking forward install new system image to my phone.

Regards,

keiji

Jean-Baptiste Queru wrote:
> We're working on it.
> 
> JBQ
> 
> On Mon, Feb 9, 2009 at 4:48 PM, Keiji Ariyama  wrote:
>> Hi folks,
>>
>> I downloaded new Android SDK 1.1 release 1. But I cannot find new system
>> image for Dev Phone 1.
>>
>> I thought that new system-image will be included in new SDK.
>>
>> Where is a system-image for DP1?
>>
>> --
>> Keiji,
>> ml_andr...@c-lis.co.jp
>>
> 
> 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Where is a system-image for DP1?

2009-02-09 Thread Keiji Ariyama

Hi folks,

I downloaded new Android SDK 1.1 release 1. But I cannot find new system
image for Dev Phone 1.

I thought that new system-image will be included in new SDK.

Where is a system-image for DP1?

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: Android Maps API Key gets 502 Server Error

2009-02-01 Thread Keiji Ariyama

Hi sonxurxo,

As long as I know, google's server encountered fatal trouble now.
I sent a mail for you.

Certs and api-key is included in the mail.

Keiji,

sonxurxo wrote:
> Hi, I'm trying to sign up my app (even with debug key, I don't need a
> custom key by now) and I get a Server Error 502. Anyone knows what's
> happening? How long will it take? I need the key for February 2nd.
> Please if anyone has a valid debug key could post it for me? (I'm
> reading my career thesis and I need that key!) Thank you
> 
> > 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: MapView disable?

2009-01-31 Thread Keiji Ariyama

Dave,

Thank you for your reply.

>> WiFi, 3G/EDGE (what carrier)? Is there anything useful in the log?
>> Maybe a proxy failure?
I didn't change any settings my dev phone.

As you know, this trouble cause is Google server error. And it has 
recovered now.

Thank you,
Keiji

Dave Sparks wrote:
> I don't know anything about MapView. What service are you on e.g.
> WiFi, 3G/EDGE (what carrier)? Is there anything useful in the log?
> Maybe a proxy failure?
> 
> On Jan 30, 5:46 pm, Keiji Ariyama  wrote:
>> Hi folks,
>>
>> Now, I'm developing an Android app called "Echo".
>> But 5 hours ago, My Dev phone haven't displayed MapView.
>>
>> First, I supposed that my API-key have been disabled.
>> I tried to Maps API Key signup agian. But google server response error.
>>
>>> Server Error
>>> The server encountered a temporary error and could not complete your 
>>> request.
>>> Please try again in 30 seconds.
>> And not only Echo but also other all map apps cannot display map.
>>
>> Default map apps display error message that "[Attention] There is a
>> connection problem... we'll keep trying.".
>>
>> If you can think of anything that may help me, I'll appreciate it.
>>
>> --
>> Keiji,
>> ml_andr...@c-lis.co.jp
> > 
> 
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] MapView disable?

2009-01-30 Thread Keiji Ariyama

Hi folks,

Now, I'm developing an Android app called "Echo".
But 5 hours ago, My Dev phone haven't displayed MapView.

First, I supposed that my API-key have been disabled.
I tried to Maps API Key signup agian. But google server response error.

> Server Error
> The server encountered a temporary error and could not complete your request.
> 
> Please try again in 30 seconds. 

And not only Echo but also other all map apps cannot display map.

Default map apps display error message that "[Attention] There is a
connection problem... we'll keep trying.".

If you can think of anything that may help me, I'll appreciate it.

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: Moving screen

2009-01-12 Thread Keiji Ariyama

Hi,

I think you can use SurfaceView.

Good luck!

-- 
Keiji,
ml_andr...@c-lis.co.jp

ipeg.stud...@gmail.com wrote:
> Hi developers ...
> 
> 
>I want to create a moving background in my application. Can
> anyone help me. Thanks in advance. please help me.
> > 
> 


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



[android-developers] Re: getLastKnownLocation is not working.

2009-01-05 Thread Keiji Ariyama

Hi Amir,

Where did you test that code? Emulator or dev phone?

> You may be missing the appropriate permissions (e.g.,
> ACCESS_FINE_LOCATION) in your AndroidManifest.xml file.
Mark is right.
Additionally, I suppose that cause of crash is null pointer exception.

>>> Double latPoint = myManager.getLastKnownLocation("gps").getLatitude
Here is.

If GPS is not working, the app doesn't have appropriate permissions or 
the phone couldn't determine location, "getLastKnownLocation method" 
return null.

If you test on emulator, you have to send location infomation to 
emulator[adb] by DDMS.

If you test on dev phone, you would test below code.


Double latPoint = null;
Double lngPoint = null;

Location loc = myManager.getLastKnownLocation("gps");
if(loc != null) {
   latPoint = myManager.getLastKnownLocation("gps").getLatitude();
   lngPoint = myManager.getLastKnownLocation("gps").getLongitude();

} else {
   Log.d("location", "location is null");
}


cheers,
keiji

Mark Murphy wrote:
> Amit Samel wrote:
>> Hello guys,
>> i am very much new to android platform. i am trying to implement some
>> codes from Android: A Programmer’s Guide. i have installed latest sdk
>> thats why there are  some issues regarding deprecated apis. when i was
>> trying to call getCurrentLocation() i got error , that this method is
>> not supported by LocationManager.So i had replaced it by
>> getLastKnownLocation . but it got crashed. can any one knows why is
>> this happening?
>> this is my code.
>>  LocationManager myManager = (LocationManager)
>>  getSystemService(Context.LOCATION_SERVICE);
>>  Double latPoint = myManager.getLastKnownLocation("gps").getLatitude
>> ();
>>  Double lngPoint = myManager.getLastKnownLocation("gps").getLongitude
>> ();
>> thanks .
> 
> You may be missing the appropriate permissions (e.g.,
> ACCESS_FINE_LOCATION) in your AndroidManifest.xml file.
> 
> Note that location tracking changed fairly substantially between the M5
> SDK from this summer and the current SDK.
> 

-- 
Keiji,
ml_andr...@c-lis.co.jp

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



[android-developers] Re: Android developer challenge II

2008-12-27 Thread C-LIS Keiji Ariyama

Hi BardieDahl,

I'm sorry. I don't know actually when ADC II is going to be launched.

However, I think Google have been thinking that Android Dev Phone 1 is 
the STANDARD Android phone. And I suppose that ADC II will be launched soon.

-- 
Keiji,
ml_andr...@c-lis.co.jp

BarbieDahl wrote:
> Has anyone heard any news about the second android developer
> challenge? It was suppose to be some information in the 4th quarter, I
> havent seen anything yet??
> > 
> 


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



[android-developers] Re: Android Dev Phon e 1™

2008-12-11 Thread C-LIS Keiji Ariyama

Hi folks,

 > Same problem here. I placed an order, but the order doesn't appear on
 > the Brightstar tracking page. It says that no orders have been placed.
Me too. I have ordered a Android Dev Phone 1. But the order doesn't appear.

"You haven't ordered anything yet"

I have asked about this problem to Brightstar. And Brightstar doesn't reply.

Keiji

kpowerinfinity wrote:
> Same problem here. I placed an order, but the order doesn't appear on
> the Brightstar tracking page. It says that no orders have been placed.
> I have sent 3 emails to andr...@brightstarcorp.com but not received
> any useful replies. Anybody here knows how long it will take the
> phones to ship?
> 
> I am relying on somebody to bring the phone from the US to India for
> me ... and in fact I paid extra shipping to ensure it reaches in time.
> In case, they delay shipping too much, I would rather cancel the order
> because then I can't get the phone brought to India for me, but the
> customer services hasn't even replied. Anybody here can help?
> 
> Thanks, Krishna.
> kkme...@gmail.com
> 
> melp wrote:
>> I have the same issue. I placed an order twice on 8 Dec and got the
>> confirming email. Both times my credit card was charged(!) but my
>> orders disappeared off the tracking page.
>>
>> Customer service is non-existent. Repeated emails have not received
>> any replies and I have tried calling their number during their stated
>> operating hours but always get a recorded message that says they are
>> closed or serving someone else.
>>
>> Any google employees care to comment?
>>
>>
>> On Dec 9, 9:33�pm, Logan  wrote:
>>> Does anyone know more about this company, I placed an order and all I
>>> got was an e-mail confirming my order but no way to check shipping
>>> status, etc. Are these phones actually shipping now?
>>>
>>> On Dec 8, 2:49�pm, Pastymage  wrote:
>>>
 � Does anyone have a more detailed FAQ than the text 
 onhttp://android.brightstarcorp.com/?�My main concern is that GPS is
 not listed anywhere in the hardware features - does it actually
 support GPS, or not?
 � Aside from that, I'm unclear on how the 3G bands work - what would
 the actual bandwidth of this device be on AT&T, for example?
 -Dave
> 
> > 
> 
> 

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



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

2008-11-04 Thread C-LIS Keiji Ariyama

Amir, I'm sorry...
> permissions are acquired:
> Network communication (full)
> Your location (fine (GPS), coarse (network-based) location)

Keiji,

Amir wrote:
> 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/4 Amir <[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:
>>>>>   
>>>>>> Hi Amir,
>>>>>> 
>>>>

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

2008-11-04 Thread C-LIS Keiji Ariyama

Hi Amir,

Hmm... is this apps allowed permission of "ACCESS_FINE_LOCATION"?

http://code.google.com/android/reference/android/Manifest.permission.html#ACCESS_FINE_LOCATION

Keiji,

Amir wrote:
> 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/4 Amir <[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:
>>>>>   
>>>>>> Hi Amir,
>&

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

2008-11-01 Thread C-LIS Keiji Ariyama

Hi Amir,

I had encountered a same situation. But my case is about 
getLastKnownLocation(String)  
method on the emulator.
In that time, I fixed my code below.

 Old 
public class TestActivity extends Activity {
private void initActivity() {
LocationManager locman = (LocationManager) getContext()
.getSystemService(Context.LOCATION_SERVICE);
}
}
-

 Fixed 
public class TestActivity extends Activity {
LocationManager locman = null;
private void initActivity() {
locman = (LocationManager) getContext()
.getSystemService(Context.LOCATION_SERVICE);
}
}
-

Sorry. I don't know about G1. Because I have not been having it...

Keiji,

Amir wrote:
> I'm creating a project that allows for my location to be found using
> the android device and communicating with my website as to where my
> Android device is.  When I download the .apk to my phone the following
> permissions are acquired:
>
> Network communication (full)
> Your location (fine (GPS), coarse (network-based) location)
>
> As of now, on the emulator everything works fine and I can find my
> location (default location on Google Maps), but on the phone the
> application/device can't find location of the android phone.
>
> please help!...below is the code I'm using for the GPS section.
>
> - Amir
>
> 
>
> package org.gw.service;
>
> import android.content.Context;
> import android.location.Location;
> import android.location.LocationListener;
> import android.location.LocationManager;
> import android.os.Bundle;
> import android.widget.Toast;
>
> public class LocationService extends AService {
>
>public int excute() {
> getDataMap().put(Command, LOCATION);
>
> if (isOk()) {
>
> // // location.
> // getDataMap().put(Des, "OK");
> // //get location
> // getDataMap().put(Value, "100,100");
> // String location = "25,121.55";
> LocationManager lm = (LocationManager) getContext()
>  .getSystemService(Context.LOCATION_SERVICE);
>
> LocationListener locationListener = new GWLocationListener(this);
> lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
>  locationListener);
>
>
>
> } else {
> getDataMap().put(Des, "error password!!");
> }
>
> return 0;
>}
>
>private class GWLocationListener implements LocationListener {
> private LocationService service;
> public GWLocationListener(LocationService service) {
> this.service=service;
> }
>
> @Override
> public void onLocationChanged(Location loc) {
> if (loc != null) {
>  String location = loc.getLatitude()+","+loc.getLongitude();
>  service.getDataMap().put(Value, location);
>   getDataMap().put(Des, "OK");
>  new ServiceClient(service).excute();
> }
> else
> {
>
>  getDataMap().put(Des, "Location fail!");
>  new ServiceClient(service).excute();
> }
> }
>
> @Override
> public void onProviderDisabled(String provider) {
>return;
> }
>
> @Override
> public void onProviderEnabled(String provider) {
> return;
> }
>
> @Override
> public void onStatusChanged(String provider, int status, Bundle
> extras) {
> return;
> }
>}
> }
>
> >
>
>   


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