[android-developers] Re: maps behind proxy 0.9 beta

2008-08-27 Thread jokochi

T_LOGICAL_OR means "or" operator in PHP, but there is no "or" operator
in the script.
Maybe you got a capture with needless line break in the script.

Please fix to be one line.
// add a protocol and a host address to be a full URI in a POST and/or
GET request.

I don't think other lines will cause side effect.

On 8月27日, 午後6:52, shan <[EMAIL PROTECTED]> wrote:
> Im getting this :
>
> PHP Parse error:  syntax error, unexpected T_LOGICAL_OR in C:\Program
> Files\PHP\
> AndroidMapProxy.php on line 169
>
> Please assist
>
> On Aug 26, 2:20 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > Hi Shan,
>
> > I did open two windows with cmd.exe.
> > And run php script in a window,
> > c:\> php AndroidMapProxy.phphttp://my.proxy.com:8001 <- please
> > fix them.
>
> > Then run emulator in another window,
> > c:\>emulator -http-proxyhttp://127.0.0.1:8001<- this must be the
> > same port number that specified script's parameter.
>
> > No firewall setting is required.
>
> > I saw the maps using original map application.
>
> > On 8月26日, 午後2:35, shan <[EMAIL PROTECTED]> wrote:
>
> > > Also, did you see the maps via the maps application or on the browser?
>
> > > On Aug 22, 7:06 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > > Yes, I am able to see the map.
> > > > After that I checked the script working on Windows.
> > > > Have you install PHP5 and run it on command prompt(cmd.exe) ?
>
> > > > Windows PHP can be found 
> > > > here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror
>
> > > > I installed it with default setting.
> > > > Please do not forget to turn off the firewall.
>
> > > > On 8月22日, 午後6:43, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > Thanks Jokochi, still can't get it same problems. Please update if you
> > > > > could.
> > > > > Were you able to display the maps?
>
> > > > > On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi Shan,
>
> > > > > > I am sorry I did not test with windows so I can not answer you so 
> > > > > > far.
> > > > > > But at least your PC has to be installed PHP5.
>
> > > > > > Regarding port no, only if your site proxy is the same PC which runs
> > > > > > emurator, you have to change the port no.
> > > > > > In my example mentioned before,  it is running the PHP script and
> > > > > > emulator on local pc (xxx.yyy.com).
> > > > > > The connection is like this
> > > > > >  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> 
> > > > > > proxy
> > > > > > (aaa.bbb.com:8000) -> (Google?)
> > > > > > Of course you can change the local port and run script on the
> > > > > > different PC.
>
> > > > > > Ahh, I found a bug in my code.
> > > > > > Please fix this line;
> > > > > > wrong:
> > > > > > if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> > > > > > correct:
> > > > > > if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> > > > > > Thank you.
>
> > > > > > On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi Jokochi
>
> > > > > > > I am using a Windows machine, do i need to setup something to 
> > > > > > > execute
> > > > > > > the script?
> > > > > > > Also my proxy port no is 8080, i could make out that you were 
> > > > > > > routing
> > > > > > > to 8080 but mine already runs on the same.
> > > > > > > I tried to execute it on IE7 but it returned an open-save dialog 
> > > > > > > which
> > > > > > > keeps looping.
> > > > > > > I got the browser up but the maps won't respond.
> > > > > > > Thanks for the script.
>
> > > > > > > Any solutions.
>
> > > > > > > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Hi Justin
>
> > > > > > > > Now the browser works in the emulator but not the maps.
> > > > > > > > Any suggestions to get the maps going.
>
> > > > > > > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL 
> > > > > > > > PROTECTED]>
> > > > > > > > wrote:
>
> > > > > > > > > Does the browser work in the emulator for you? The emulator 
> > > > > > > > > doesn't
> > > > > > > > > deal well with being behind a proxy and my guess would be 
> > > > > > > > > that you
> > > > > > > > > aren't able to use any data at all.
>
> > > > > > > > > Cheers,
> > > > > > > > > Justin
> > > > > > > > > Android Team @ Google
>
> > > > > > > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide 
> > > > > > > > > > quoted text -
>
> > > > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK be

[android-developers] Re: maps behind proxy 0.9 beta

2008-08-27 Thread shan

Im getting this :

PHP Parse error:  syntax error, unexpected T_LOGICAL_OR in C:\Program
Files\PHP\
AndroidMapProxy.php on line 169

Please assist

On Aug 26, 2:20 pm, jokochi <[EMAIL PROTECTED]> wrote:
> Hi Shan,
>
> I did open two windows with cmd.exe.
> And run php script in a window,
> c:\> php AndroidMapProxy.phphttp://my.proxy.com:8001  <- please
> fix them.
>
> Then run emulator in another window,
> c:\>emulator -http-proxyhttp://127.0.0.1:8001<- this must be the
> same port number that specified script's parameter.
>
> No firewall setting is required.
>
> I saw the maps using original map application.
>
> On 8月26日, 午後2:35, shan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Also, did you see the maps via the maps application or on the browser?
>
> > On Aug 22, 7:06 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > Yes, I am able to see the map.
> > > After that I checked the script working on Windows.
> > > Have you install PHP5 and run it on command prompt(cmd.exe) ?
>
> > > Windows PHP can be found 
> > > here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror
>
> > > I installed it with default setting.
> > > Please do not forget to turn off the firewall.
>
> > > On 8月22日, 午後6:43, shan <[EMAIL PROTECTED]> wrote:
>
> > > > Thanks Jokochi, still can't get it same problems. Please update if you
> > > > could.
> > > > Were you able to display the maps?
>
> > > > On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Shan,
>
> > > > > I am sorry I did not test with windows so I can not answer you so far.
> > > > > But at least your PC has to be installed PHP5.
>
> > > > > Regarding port no, only if your site proxy is the same PC which runs
> > > > > emurator, you have to change the port no.
> > > > > In my example mentioned before,  it is running the PHP script and
> > > > > emulator on local pc (xxx.yyy.com).
> > > > > The connection is like this
> > > > >  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
> > > > > (aaa.bbb.com:8000) -> (Google?)
> > > > > Of course you can change the local port and run script on the
> > > > > different PC.
>
> > > > > Ahh, I found a bug in my code.
> > > > > Please fix this line;
> > > > > wrong:
> > > > > if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> > > > > correct:
> > > > > if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> > > > > Thank you.
>
> > > > > On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi Jokochi
>
> > > > > > I am using a Windows machine, do i need to setup something to 
> > > > > > execute
> > > > > > the script?
> > > > > > Also my proxy port no is 8080, i could make out that you were 
> > > > > > routing
> > > > > > to 8080 but mine already runs on the same.
> > > > > > I tried to execute it on IE7 but it returned an open-save dialog 
> > > > > > which
> > > > > > keeps looping.
> > > > > > I got the browser up but the maps won't respond.
> > > > > > Thanks for the script.
>
> > > > > > Any solutions.
>
> > > > > > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi Justin
>
> > > > > > > Now the browser works in the emulator but not the maps.
> > > > > > > Any suggestions to get the maps going.
>
> > > > > > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > > > > wrote:
>
> > > > > > > > Does the browser work in the emulator for you? The emulator 
> > > > > > > > doesn't
> > > > > > > > deal well with being behind a proxy and my guess would be that 
> > > > > > > > you
> > > > > > > > aren't able to use any data at all.
>
> > > > > > > > Cheers,
> > > > > > > > Justin
> > > > > > > > Android Team @ Google
>
> > > > > > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide 
> > > > > > > > > quoted text -
>
> > > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-26 Thread jokochi

Hi Shan,

I did open two windows with cmd.exe.
And run php script in a window,
c:\> php AndroidMapProxy.php http://my.proxy.com: 8001  <- please
fix them.

Then run emulator in another window,
c:\>emulator -http-proxy http://127.0.0.1:8001 <- this must be the
same port number that specified script's parameter.

No firewall setting is required.

I saw the maps using original map application.

On 8月26日, 午後2:35, shan <[EMAIL PROTECTED]> wrote:
> Also, did you see the maps via the maps application or on the browser?
>
> On Aug 22, 7:06 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > Yes, I am able to see the map.
> > After that I checked the script working on Windows.
> > Have you install PHP5 and run it on command prompt(cmd.exe) ?
>
> > Windows PHP can be found 
> > here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror
>
> > I installed it with default setting.
> > Please do not forget to turn off the firewall.
>
> > On 8月22日, 午後6:43, shan <[EMAIL PROTECTED]> wrote:
>
> > > Thanks Jokochi, still can't get it same problems. Please update if you
> > > could.
> > > Were you able to display the maps?
>
> > > On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Shan,
>
> > > > I am sorry I did not test with windows so I can not answer you so far.
> > > > But at least your PC has to be installed PHP5.
>
> > > > Regarding port no, only if your site proxy is the same PC which runs
> > > > emurator, you have to change the port no.
> > > > In my example mentioned before,  it is running the PHP script and
> > > > emulator on local pc (xxx.yyy.com).
> > > > The connection is like this
> > > >  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
> > > > (aaa.bbb.com:8000) -> (Google?)
> > > > Of course you can change the local port and run script on the
> > > > different PC.
>
> > > > Ahh, I found a bug in my code.
> > > > Please fix this line;
> > > > wrong:
> > > > if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> > > > correct:
> > > > if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> > > > Thank you.
>
> > > > On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Jokochi
>
> > > > > I am using a Windows machine, do i need to setup something to execute
> > > > > the script?
> > > > > Also my proxy port no is 8080, i could make out that you were routing
> > > > > to 8080 but mine already runs on the same.
> > > > > I tried to execute it on IE7 but it returned an open-save dialog which
> > > > > keeps looping.
> > > > > I got the browser up but the maps won't respond.
> > > > > Thanks for the script.
>
> > > > > Any solutions.
>
> > > > > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi Justin
>
> > > > > > Now the browser works in the emulator but not the maps.
> > > > > > Any suggestions to get the maps going.
>
> > > > > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > Does the browser work in the emulator for you? The emulator 
> > > > > > > doesn't
> > > > > > > deal well with being behind a proxy and my guess would be that you
> > > > > > > aren't able to use any data at all.
>
> > > > > > > Cheers,
> > > > > > > Justin
> > > > > > > Android Team @ Google
>
> > > > > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide 
> > > > > > > > quoted text -
>
> > > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-25 Thread shan

Also, did you see the maps via the maps application or on the browser?

On Aug 22, 7:06 pm, jokochi <[EMAIL PROTECTED]> wrote:
> Yes, I am able to see the map.
> After that I checked the script working on Windows.
> Have you install PHP5 and run it on command prompt(cmd.exe) ?
>
> Windows PHP can be found 
> here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror
>
> I installed it with default setting.
> Please do not forget to turn off the firewall.
>
> On 8月22日, 午後6:43, shan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thanks Jokochi, still can't get it same problems. Please update if you
> > could.
> > Were you able to display the maps?
>
> > On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > Hi Shan,
>
> > > I am sorry I did not test with windows so I can not answer you so far.
> > > But at least your PC has to be installed PHP5.
>
> > > Regarding port no, only if your site proxy is the same PC which runs
> > > emurator, you have to change the port no.
> > > In my example mentioned before,  it is running the PHP script and
> > > emulator on local pc (xxx.yyy.com).
> > > The connection is like this
> > >  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
> > > (aaa.bbb.com:8000) -> (Google?)
> > > Of course you can change the local port and run script on the
> > > different PC.
>
> > > Ahh, I found a bug in my code.
> > > Please fix this line;
> > > wrong:
> > > if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> > > correct:
> > > if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> > > Thank you.
>
> > > On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Jokochi
>
> > > > I am using a Windows machine, do i need to setup something to execute
> > > > the script?
> > > > Also my proxy port no is 8080, i could make out that you were routing
> > > > to 8080 but mine already runs on the same.
> > > > I tried to execute it on IE7 but it returned an open-save dialog which
> > > > keeps looping.
> > > > I got the browser up but the maps won't respond.
> > > > Thanks for the script.
>
> > > > Any solutions.
>
> > > > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Justin
>
> > > > > Now the browser works in the emulator but not the maps.
> > > > > Any suggestions to get the maps going.
>
> > > > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > Does the browser work in the emulator for you? The emulator doesn't
> > > > > > deal well with being behind a proxy and my guess would be that you
> > > > > > aren't able to use any data at all.
>
> > > > > > Cheers,
> > > > > > Justin
> > > > > > Android Team @ Google
>
> > > > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide quoted 
> > > > > > > text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-25 Thread shan

Hi Jokochi, I have added exceptions for PHP.exe in the firewall, still
does'nt work.
Could you please give me the exact steps of how you did it  on windows
so that i can check where am i messing it.

On Aug 22, 7:06 pm, jokochi <[EMAIL PROTECTED]> wrote:
> Yes, I am able to see the map.
> After that I checked the script working on Windows.
> Have you install PHP5 and run it on command prompt(cmd.exe) ?
>
> Windows PHP can be found 
> here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror
>
> I installed it with default setting.
> Please do not forget to turn off the firewall.
>
> On 8月22日, 午後6:43, shan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thanks Jokochi, still can't get it same problems. Please update if you
> > could.
> > Were you able to display the maps?
>
> > On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > Hi Shan,
>
> > > I am sorry I did not test with windows so I can not answer you so far.
> > > But at least your PC has to be installed PHP5.
>
> > > Regarding port no, only if your site proxy is the same PC which runs
> > > emurator, you have to change the port no.
> > > In my example mentioned before,  it is running the PHP script and
> > > emulator on local pc (xxx.yyy.com).
> > > The connection is like this
> > >  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
> > > (aaa.bbb.com:8000) -> (Google?)
> > > Of course you can change the local port and run script on the
> > > different PC.
>
> > > Ahh, I found a bug in my code.
> > > Please fix this line;
> > > wrong:
> > > if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> > > correct:
> > > if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> > > Thank you.
>
> > > On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Jokochi
>
> > > > I am using a Windows machine, do i need to setup something to execute
> > > > the script?
> > > > Also my proxy port no is 8080, i could make out that you were routing
> > > > to 8080 but mine already runs on the same.
> > > > I tried to execute it on IE7 but it returned an open-save dialog which
> > > > keeps looping.
> > > > I got the browser up but the maps won't respond.
> > > > Thanks for the script.
>
> > > > Any solutions.
>
> > > > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Justin
>
> > > > > Now the browser works in the emulator but not the maps.
> > > > > Any suggestions to get the maps going.
>
> > > > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > Does the browser work in the emulator for you? The emulator doesn't
> > > > > > deal well with being behind a proxy and my guess would be that you
> > > > > > aren't able to use any data at all.
>
> > > > > > Cheers,
> > > > > > Justin
> > > > > > Android Team @ Google
>
> > > > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide quoted 
> > > > > > > text -
>
> > > > > > - Show quoted text -- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-22 Thread jokochi

Yes, I am able to see the map.
After that I checked the script working on Windows.
Have you install PHP5 and run it on command prompt(cmd.exe) ?

Windows PHP can be found here.
http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror

I installed it with default setting.
Please do not forget to turn off the firewall.

On 8月22日, 午後6:43, shan <[EMAIL PROTECTED]> wrote:
> Thanks Jokochi, still can't get it same problems. Please update if you
> could.
> Were you able to display the maps?
>
> On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
>
> > Hi Shan,
>
> > I am sorry I did not test with windows so I can not answer you so far.
> > But at least your PC has to be installed PHP5.
>
> > Regarding port no, only if your site proxy is the same PC which runs
> > emurator, you have to change the port no.
> > In my example mentioned before,  it is running the PHP script and
> > emulator on local pc (xxx.yyy.com).
> > The connection is like this
> >  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
> > (aaa.bbb.com:8000) -> (Google?)
> > Of course you can change the local port and run script on the
> > different PC.
>
> > Ahh, I found a bug in my code.
> > Please fix this line;
> > wrong:
> > if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> > correct:
> > if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> > Thank you.
>
> > On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
> > > Hi Jokochi
>
> > > I am using a Windows machine, do i need to setup something to execute
> > > the script?
> > > Also my proxy port no is 8080, i could make out that you were routing
> > > to 8080 but mine already runs on the same.
> > > I tried to execute it on IE7 but it returned an open-save dialog which
> > > keeps looping.
> > > I got the browser up but the maps won't respond.
> > > Thanks for the script.
>
> > > Any solutions.
>
> > > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Justin
>
> > > > Now the browser works in the emulator but not the maps.
> > > > Any suggestions to get the maps going.
>
> > > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > Does the browser work in the emulator for you? The emulator doesn't
> > > > > deal well with being behind a proxy and my guess would be that you
> > > > > aren't able to use any data at all.
>
> > > > > Cheers,
> > > > > Justin
> > > > > Android Team @ Google
>
> > > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide quoted 
> > > > > > text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-22 Thread shan

Thanks Jokochi, still can't get it same problems. Please update if you
could.
Were you able to display the maps?


On Aug 22, 1:10 pm, jokochi <[EMAIL PROTECTED]> wrote:
> Hi Shan,
>
> I am sorry I did not test with windows so I can not answer you so far.
> But at least your PC has to be installed PHP5.
>
> Regarding port no, only if your site proxy is the same PC which runs
> emurator, you have to change the port no.
> In my example mentioned before,  it is running the PHP script and
> emulator on local pc (xxx.yyy.com).
> The connection is like this
>  emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
> (aaa.bbb.com:8000) -> (Google?)
> Of course you can change the local port and run script on the
> different PC.
>
> Ahh, I found a bug in my code.
> Please fix this line;
> wrong:
> if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
> correct:
> if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))
>
> Thank you.
>
> On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi Jokochi
>
> > I am using a Windows machine, do i need to setup something to execute
> > the script?
> > Also my proxy port no is 8080, i could make out that you were routing
> > to 8080 but mine already runs on the same.
> > I tried to execute it on IE7 but it returned an open-save dialog which
> > keeps looping.
> > I got the browser up but the maps won't respond.
> > Thanks for the script.
>
> > Any solutions.
>
> > On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > Hi Justin
>
> > > Now the browser works in the emulator but not the maps.
> > > Any suggestions to get the maps going.
>
> > > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > Does the browser work in the emulator for you? The emulator doesn't
> > > > deal well with being behind a proxy and my guess would be that you
> > > > aren't able to use any data at all.
>
> > > > Cheers,
> > > > Justin
> > > > Android Team @ Google
>
> > > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide quoted 
> > > > > text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-22 Thread jokochi

Hi Shan,

I am sorry I did not test with windows so I can not answer you so far.
But at least your PC has to be installed PHP5.

Regarding port no, only if your site proxy is the same PC which runs
emurator, you have to change the port no.
In my example mentioned before,  it is running the PHP script and
emulator on local pc (xxx.yyy.com).
The connection is like this
 emulator (xxx.yyy.com:???) -> php script (xxx.yyy.com:8080) -> proxy
(aaa.bbb.com:8000) -> (Google?)
Of course you can change the local port and run script on the
different PC.

Ahh, I found a bug in my code.
Please fix this line;
wrong:
if (isset($argv[2]) && (preg_match("^\d+$", $argv[2])))
correct:
if (isset($argv[2]) && (preg_match("/^\d+$/", $argv[2])))

Thank you.

On 8月22日, 午後3:58, shan <[EMAIL PROTECTED]> wrote:
> Hi Jokochi
>
> I am using a Windows machine, do i need to setup something to execute
> the script?
> Also my proxy port no is 8080, i could make out that you were routing
> to 8080 but mine already runs on the same.
> I tried to execute it on IE7 but it returned an open-save dialog which
> keeps looping.
> I got the browser up but the maps won't respond.
> Thanks for the script.
>
> Any solutions.
>
> On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
>
> > Hi Justin
>
> > Now the browser works in the emulator but not the maps.
> > Any suggestions to get the maps going.
>
> > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Does the browser work in the emulator for you? The emulator doesn't
> > > deal well with being behind a proxy and my guess would be that you
> > > aren't able to use any data at all.
>
> > > Cheers,
> > > Justin
> > > Android Team @ Google
>
> > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > Can the maps API  work behind proxy in the 0.9 beta?- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-21 Thread shan

Hi Jokochi

I am using a Windows machine, do i need to setup something to execute
the script?
Also my proxy port no is 8080, i could make out that you were routing
to 8080 but mine already runs on the same.
I tried to execute it on IE7 but it returned an open-save dialog which
keeps looping.
I got the browser up but the maps won't respond.
Thanks for the script.

Any solutions.

On Aug 22, 11:04 am, shan <[EMAIL PROTECTED]> wrote:
> Hi Justin
>
> Now the browser works in the emulator but not the maps.
> Any suggestions to get the maps going.
>
> On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Does the browser work in the emulator for you? The emulator doesn't
> > deal well with being behind a proxy and my guess would be that you
> > aren't able to use any data at all.
>
> > Cheers,
> > Justin
> > Android Team @ Google
>
> > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > Can the maps API  work behind proxy in the 0.9 beta?- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-21 Thread shan

Hi Justin

Now the browser works in the emulator but not the maps.
Any suggestions to get the maps going.

On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
wrote:
> Does the browser work in the emulator for you? The emulator doesn't
> deal well with being behind a proxy and my guess would be that you
> aren't able to use any data at all.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Can the maps API  work behind proxy in the 0.9 beta?- 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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-21 Thread jokochi

Hi daspears,

Ok  I attached whole script at the end of this post.

It has been tested on
Linux Fedora Core 6 + PHP5 +Android m5rc15
and
Linux Fedora Core 9 + PHP5 +Android 0.9beta .

Please keep a mind this is a workaround and possibly be dangerous:-).

This script runs as proxy's proxy.
1.
Please cut and paste this code and save it.
The file name is "AndroidMapProxy.php" in this example.

2.
For example, your site proxy http://aaa.bbb.com:8000 and your Linux
host (local PC) xxx.yyy.com, please run this program on your local PC
like this;

 [EMAIL PROTECTED] AndroidMapProxy.php http://aaa.bb.com:8000 8080

3.
then, run android emulator like this;

  [root:@xxx]$ emulator -http-proxy http://xxx.yyy.com:8080


The script begins here.

#!/usr/bin/php
error($message);
}
fclose($c);
$this->site_proxy = $site_proxy;

// create in-bound socket to connect emulator.
$this->socket = stream_socket_server("tcp://0.0.0.0:".$port, 
$errno,
$errstr);
if (!$this->socket) {
$message = sprintf("error:%d %s", $errstr, $errno);
$this->error($message);
}
}

public function __destruct() {
if (is_resource($this->socket)) {
fclose($this->socket);
}
if (is_resource($this->inbound)) {
fclose($this->inbound);
}
if (is_resource($this->outbound)) {
fclose($this->outbound);
}
}

public function execute() {
while (true) {
// wait for a message from emulator.
$timeout = .0;
$this->inbound = stream_socket_accept($this->socket, 
$timeout);
if ($this->inbound === false) {
$this->error("socket accept error");
}
// echo "new connection.\n";

// set the timeout value and the non-blocking mode on 
the stream.
stream_set_timeout($this->inbound, 300);
if (false === stream_set_blocking($this->inbound, 0)) {
echo "warning: cannot set  non blocking on 
in-bound stream\n";
}

// open an out-bound socket to connect the site proxy.
$this->outbound = 
stream_socket_client($this->site_proxy, $errno,
$errstr, 30);
if ($this->outbound === false) {
$message = sprintf("error:%d %s", $errstr, 
$errno);
$this->error($message);
}
// set the timeout value and the non-blocking mode on 
the stream.
stream_set_timeout($this->outbound, 300);
if (false === stream_set_blocking($this->outbound, 0)) {
echo "warning: cannnot set non blocking on 
out-bound stream\n";
}

// set flag.
$this->active = true;
while ($this->active) {
// use a select function because PHP does not 
support a thread.
$read = array($this->inbound, $this->outbound);
$write = NULL;
$except = NULL;
if (false === ($n = stream_select($read, 
$write, $except, 10)))
{
$this->error("select error");
}
switch ($n) {
case 0:
$this->active = false;
break;
case 1:
if ($read[0] === $this->inbound)
{
if (!feof($this->inbound)) {
$request = 
$this->in_to_out();
}
else {
$this->active = false;
}
}
if ($read[0] === $this->outbound)
{
if (!feof($this->outbound)) {
$request = 
$this->out_to_in();
}
   

[android-developers] Re: maps behind proxy 0.9 beta

2008-08-21 Thread daspears

Jokochi,

I would be interested in seeing your solution as well.  Thanks.


On Aug 21, 5:12 am, jokochi <[EMAIL PROTECTED]> wrote:
> I am in the same situation that the browser in 0.9 couldn't get any
> data behind proxy.
> Also I recognize this problem is same as map view.
>
> Because of most proxy server will not convey a packet besides SSL(443)
> port with CONNECT method but MapView is trying to connect with CONNECT
> method first.
> The browser in 0.9 has changed same as MapView.
>
> As for the solution, I make a small program that ignore the CONNECT
> method and change the POST's URI.
> It is written in PHP and it is only 200 lines.
> Please let me know if you are interesting in my program, and I will
> give it.
>
> On 8月21日, 午後2:26, shan <[EMAIL PROTECTED]> wrote:
>
> > No the browser is not working till now, the -http-proxystartup option
> > does'nt seem to work(for the 0.9).
>
> > But in the m5r15 i could get the browser to work via the http_proxy
> > field in the system table, but the maps application could not connect
> > to the server. I think that it uses a config totally different from
> > the standard ones, to which we dont have access.
>
> > I am guessing that the situation would be same in 0.9 as well. Only
> > hope being that the maps API would recognise the http-proxyoption.
>
> > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Does the browser work in the emulator for you? The emulator doesn't
> > > deal well with being behind aproxyand my guess would be that you
> > > aren't able to use any data at all.
>
> > > Cheers,
> > > Justin
> > > Android Team @ Google
>
> > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > > Can the maps API  work behindproxyin the 0.9 beta?- 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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-21 Thread tar blazer
sure jokochi, that would be a great help. At least we can expect a reply
from google about the situation

2008/8/21 jokochi <[EMAIL PROTECTED]>

>
> I am in the same situation that the browser in 0.9 couldn't get any
> data behind proxy.
> Also I recognize this problem is same as map view.
>
> Because of most proxy server will not convey a packet besides SSL(443)
> port with CONNECT method but MapView is trying to connect with CONNECT
> method first.
> The browser in 0.9 has changed same as MapView.
>
> As for the solution, I make a small program that ignore the CONNECT
> method and change the POST's URI.
> It is written in PHP and it is only 200 lines.
> Please let me know if you are interesting in my program, and I will
> give it.
>
> On 8月21日, 午後2:26, shan <[EMAIL PROTECTED]> wrote:
> > No the browser is not working till now, the -http-proxystartup option
> > does'nt seem to work(for the 0.9).
> >
> > But in the m5r15 i could get the browser to work via the http_proxy
> > field in the system table, but the maps application could not connect
> > to the server. I think that it uses a config totally different from
> > the standard ones, to which we dont have access.
> >
> > I am guessing that the situation would be same in 0.9 as well. Only
> > hope being that the maps API would recognise the http-proxyoption.
> >
> > On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Does the browser work in the emulator for you? The emulator doesn't
> > > deal well with being behind aproxyand my guess would be that you
> > > aren't able to use any data at all.
> >
> > > Cheers,
> > > Justin
> > > Android Team @ Google
> >
> > > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
> >
> > > > Can the maps API  work behindproxyin the 0.9 beta?- 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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-21 Thread jokochi

I am in the same situation that the browser in 0.9 couldn't get any
data behind proxy.
Also I recognize this problem is same as map view.

Because of most proxy server will not convey a packet besides SSL(443)
port with CONNECT method but MapView is trying to connect with CONNECT
method first.
The browser in 0.9 has changed same as MapView.

As for the solution, I make a small program that ignore the CONNECT
method and change the POST's URI.
It is written in PHP and it is only 200 lines.
Please let me know if you are interesting in my program, and I will
give it.

On 8月21日, 午後2:26, shan <[EMAIL PROTECTED]> wrote:
> No the browser is not working till now, the -http-proxystartup option
> does'nt seem to work(for the 0.9).
>
> But in the m5r15 i could get the browser to work via the http_proxy
> field in the system table, but the maps application could not connect
> to the server. I think that it uses a config totally different from
> the standard ones, to which we dont have access.
>
> I am guessing that the situation would be same in 0.9 as well. Only
> hope being that the maps API would recognise the http-proxyoption.
>
> On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> wrote:
>
> > Does the browser work in the emulator for you? The emulator doesn't
> > deal well with being behind aproxyand my guess would be that you
> > aren't able to use any data at all.
>
> > Cheers,
> > Justin
> > Android Team @ Google
>
> > On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
> > > Can the maps API  work behindproxyin the 0.9 beta?- 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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-20 Thread shan

No the browser is not working till now, the -http-proxy startup option
does'nt seem to work(for the 0.9).

But in the m5r15 i could get the browser to work via the http_proxy
field in the system table, but the maps application could not connect
to the server. I think that it uses a config totally different from
the standard ones, to which we dont have access.

I am guessing that the situation would be same in 0.9 as well. Only
hope being that the maps API would recognise the http-proxy option.


On Aug 21, 1:34 am, "Justin (Google Employee)" <[EMAIL PROTECTED]>
wrote:
> Does the browser work in the emulator for you? The emulator doesn't
> deal well with being behind a proxy and my guess would be that you
> aren't able to use any data at all.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
>
>
>
> > Can the maps API  work behind proxy in the 0.9 beta?- 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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-20 Thread Justin (Google Employee)

Does the browser work in the emulator for you? The emulator doesn't
deal well with being behind a proxy and my guess would be that you
aren't able to use any data at all.

Cheers,
Justin
Android Team @ Google

On Aug 20, 5:40 am, shan <[EMAIL PROTECTED]> wrote:
> Can the maps API  work behind proxy in the 0.9 beta?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---