[web2py] Re: web2py on android

2016-09-18 Thread eric cuver
you can use local storage for example :

var objet = { propriete1 : "valeur1", propriete2 : "valeur2" }; var 
monobjet_json = window.JSON.stringify(monobjet); window.localStorage
.setItem("objet",monobjet_json);

Le dimanche 18 septembre 2016 01:39:01 UTC+2, JorgeH a écrit :
>
> what if I need to store data in the mobile when there is no internet 
> connection and sync with the webserver when there is connection?
>
> what db or sqlite, can I use?
>
> On Saturday, July 23, 2016 at 1:03:24 AM UTC-5, eric cuver wrote:
>>
>> you can use cordova wbeview and used side client brython( python) and 
>> backend web2py
>> I create the applications in this way it works very well 
>>
>> Le mardi 19 juillet 2016 13:16:10 UTC+2, Paolo Amboni a écrit :
>>>
>>> Is it possible to do something like that with web2py?
>>>
>>> Android apps with Python, Flask and a WebView 
>>> 
>>> (
>>> https://kivy.org/planet/2016/05/android-apps-with-python-flask-and-a-webview/
>>> )
>>>
>>> Thanks!!
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py on android

2016-09-17 Thread JorgeH
what if I need to store data in the mobile when there is no internet 
connection and sync with the webserver when there is connection?

what db or sqlite, can I use?

On Saturday, July 23, 2016 at 1:03:24 AM UTC-5, eric cuver wrote:
>
> you can use cordova wbeview and used side client brython( python) and 
> backend web2py
> I create the applications in this way it works very well 
>
> Le mardi 19 juillet 2016 13:16:10 UTC+2, Paolo Amboni a écrit :
>>
>> Is it possible to do something like that with web2py?
>>
>> Android apps with Python, Flask and a WebView 
>> 
>> (
>> https://kivy.org/planet/2016/05/android-apps-with-python-flask-and-a-webview/
>> )
>>
>> Thanks!!
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py on android

2016-07-25 Thread Francisco García
Hello,

Yes, you can write your backend Restful service with Web2py, and connect 
consumer web applications, android or iOS apps, etc.

I use to read ODoo web services, process data with Web2py and publish to 
customers with a Restfull service.
Web2py is perfect for this tasks. It is very fast and powerful to code the 
restful services and the web GUI is almost done out of the box.

Regards
Francisco.

El martes, 19 de julio de 2016, 13:16:10 (UTC+2), Paolo Amboni escribió:
>
> Is it possible to do something like that with web2py?
>
> Android apps with Python, Flask and a WebView 
> 
> (
> https://kivy.org/planet/2016/05/android-apps-with-python-flask-and-a-webview/
> )
>
> Thanks!!
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py on android

2016-07-23 Thread eric cuver
you can use cordova wbeview and used side client brython( python) and 
backend web2py
I create the applications in this way it works very well 

Le mardi 19 juillet 2016 13:16:10 UTC+2, Paolo Amboni a écrit :
>
> Is it possible to do something like that with web2py?
>
> Android apps with Python, Flask and a WebView 
> 
> (
> https://kivy.org/planet/2016/05/android-apps-with-python-flask-and-a-webview/
> )
>
> Thanks!!
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py on android

2016-07-19 Thread samuel bonill
You can use web2py for build a ret_api server and build your app with 
NativeScript (Angular2), ionic or reactnative


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py on android

2016-07-19 Thread Massimo Di Pierro
Any web app can run as an android app or ios app. What the server side is 
written in irrelevant.

One of the easiest ways is to use gonative.io but it is not free. 

Everything you see in the article you mention works if you replace Flask 
with web2py.

I am sure other users have other recommendations.

Massimo





On Tuesday, 19 July 2016 06:16:10 UTC-5, Paolo Amboni wrote:
>
> Is it possible to do something like that with web2py?
>
> Android apps with Python, Flask and a WebView 
> 
> (
> https://kivy.org/planet/2016/05/android-apps-with-python-flask-and-a-webview/
> )
>
> Thanks!!
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py on Android

2013-09-14 Thread xinx
I am facing perhaps a similar issue when I try to get my web2py (Version 
2.5.1-stable+timestamp.2013.06.06.15.39.19) application running on a tablet 
with Android 4.3 and sl4a (python 2.6). GETs seems to be okay but POSTs 
(e.g. login as user) result in tickets. As any attempt to login results in 
tickets and is unsuccessful finally the content of tickets is not displayed 
in the browser but I manged to extract the complain:

(self=FieldStorage(None, None, ''))
'read_lines_to_outerboundary'
'Python 2.6.2: 
/data/user/0/com.googlecode.pythonforandroid/files/python/bin/python 
(prefix: /data/user/0/com.googlecode.pythonforandroid/files/python)'
type 'exceptions.IOError'
'Tue Sep 10 08:25:09 2013'
'delim'
''
FieldStorage(None, None, '')
'-53628658412953322821182323057--'
'True'
'-53628658412953322821182323057'
'Traceback (most recent call last):
  File /storage/emulated/legacy/sl4a/scripts/web2py/gluon/main.py, line 
533, in wsgibase
parse_get_post_vars(request, environ)
  File /storage/emulated/legacy/sl4a/scripts/web2py/gluon/main.py, line 
348, in parse_get_post_vars
dpost = cgi.FieldStorage(fp=body, environ=environ, keep_blank_values=1)
  File /storage/emulated/legacy/sl4a/scripts/web2py/cgi.py, line 508, in 
__init__
self.read_multi(environ, keep_blank_values, strict_parsing)
  File /storage/emulated/legacy/sl4a/scripts/web2py/cgi.py, line 632, in 
read_multi
environ, keep_blank_values, strict_parsing)
  File /storage/emulated/legacy/sl4a/scripts/web2py/cgi.py, line 510, in 
__init__
self.read_single()
  File /storage/emulated/legacy/sl4a/scripts/web2py/cgi.py, line 647, in 
read_single
self.read_lines()
  File /storage/emulated/legacy/sl4a/scripts/web2py/cgi.py, line 669, in 
read_lines
self.read_lines_to_outerboundary()
  File /storage/emulated/legacy/sl4a/scripts/web2py/cgi.py, line 698, in 
read_lines_to_outerboundary
line = self.fp.readline(116)
IOError: [Errno 2] No such file or directory

When I add some python code to the cgi module function ' 
read_lines_to_outerboundary' to inspect self.fp ...

   while 1:
print 'DBG: fp - %s' % str(self.fp)
line = self.fp.readline(116)
if not line:
self.done = -1
break

 ... I get the following:

DBG: fp - open file 'fdopen', mode 'w+b' at 0x40b41ed0

Any help or hints how to track down the root cause of this issue are 
appreciated very much.

Regards,
Michael



Am Sonntag, 14. Juli 2013 12:11:22 UTC+2 schrieb Massimo Di Pierro:

 Can you try wrap (in main.py)

 parse_get_post_vars(request, environ)

 in try: ...  except IOError: pass and see what happens.

 Web2py copies the input stream into a temp file in order to be able to 
 parse it but also pass a copy to the app. I suspect something happens to 
 the original stream and it gets closed twice (not sure why, not by web2py, 
 but by the wsgi adapter). If we isolate the problem we can find a work 
 around.

 On Sunday, 14 July 2013 03:16:09 UTC-5, Fernando Pacheco wrote:

 I'm trying to run a minimal version of web2py (git version) on Android 
 (Samsung Galaxy Tab 2 10 ) with kivy (as a service, latest python 
 version 2.7) and / or from the launcher SL4A (pythn 2.6).

 Everything works fine when I use GET, but when I submit a form (POST) I 
 get the following error: 

 *close failed in file object destructor: **
 **IOError: [Errno 5] I/O error
 *
 The admin application also has this problem (password submit with the 
 same error).

 Full web2py version (from git) has the same problem. 

 I have tried to detect the source of error with no luck. Has anyone run 
 applications -on Android- that contain forms (POST) successfully?.Any 
 thoughts on this?. 

 Thank you very much. Greetings. Fernando.



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py on Android

2013-07-14 Thread Massimo Di Pierro
Can you try wrap (in main.py)

parse_get_post_vars(request, environ)

in try: ...  except IOError: pass and see what happens.

Web2py copies the input stream into a temp file in order to be able to 
parse it but also pass a copy to the app. I suspect something happens to 
the original stream and it gets closed twice (not sure why, not by web2py, 
but by the wsgi adapter). If we isolate the problem we can find a work 
around.

On Sunday, 14 July 2013 03:16:09 UTC-5, Fernando Pacheco wrote:

 I'm trying to run a minimal version of web2py (git version) on Android 
 (Samsung Galaxy Tab 2 10 ) with kivy (as a service, latest python version 
 2.7) and / or from the launcher SL4A (pythn 2.6).

 Everything works fine when I use GET, but when I submit a form (POST) I 
 get the following error: 

 *close failed in file object destructor: **
 **IOError: [Errno 5] I/O error
 *
 The admin application also has this problem (password submit with the same 
 error).

 Full web2py version (from git) has the same problem. 

 I have tried to detect the source of error with no luck. Has anyone run 
 applications -on Android- that contain forms (POST) successfully?.Any 
 thoughts on this?. 

 Thank you very much. Greetings. Fernando.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.