Python Forum
Python coming to DroidScript (build native Android Apps)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python coming to DroidScript (build native Android Apps)
#1
Hi Guys,

I'm the founder of droidscript.org, a not-for-profit organisation with the aim of making app development easy, fast and fun for everyone, everywhere.

I'm please to announce that we've just started adding Python support to DroidScript. I hope you find this as exciting as we do, because this will allow thousands of coders, young and old, to easily create native Android apps directly on their phones and tablets using Python.

This is what a simple Python app looks like in DroidScript -

#Import the native app object.
from native import app

#Called when application is created.
def OnStart():

    #Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "VCenter,FillXY" )

    #Add an image 20% of screen width.
    img = app.AddImage( lay, "/Sys/Img/Hello.png", 0.2 )
    
    #Add a button 30% of screen width.
    btn = app.AddButton( lay, "Press Me", 0.3 )
    btn.SetMargins( 0, 0.05, 0, 0 )
    btn.SetOnTouch( btn_OnTouch )
    
    #Add layout to app.    
    app.AddLayout( lay )
    
    
#Called when user touches our button.
def btn_OnTouch():

    app.ShowPopup( "Hello World!" )
    
    #Vibrate phone with a pattern (in milliseconds).
    #pause,vibrate,pause,vibrate...
    app.Vibrate( "0,100,30,100,50,300" )
That's a very simple app, but you have the 'full power' of the DroidScript native framework at you disposal and can use Camera, USB, Bluetooth Serial, BLE, WiFi, Accelerometer, GPS and much more... even NodeJS!

If you would like to try this out and maybe give us some feedback, then you can find a beta version of DroidScript here that supports it -

http://androidscript.org/beta/DroidScript_263b1/

You just need to enable the 'experiments' option in the About box and restart the app to see the Python templates appear in the 'New' menu.

We are making use of Brython to achieve this and the performance seems to be very good so far.

Please let me know what you think Smile

Regards
David
DeaD_EyE likes this post
Reply
#2
Your link leads to opaque files with extensions .ppk and .apk. They may be unsecure to download. Don't you have a web page where the source code of the library is freely available? Is the library open-source? If it is not, don't count on me to download it!
Reply
#3
(Oct-22-2023, 05:42 AM)Gribouillis Wrote: Your link leads to opaque files with extensions .ppk and .apk. They may be unsecure to download. Don't you have a web page where the source code of the library is freely available? Is the library open-source? If it is not, don't count on me to download it!

Hi there. If you are doubtful about this software, you can check it from Google PlayStore. DroidScript has almost 2 million downloads.

Here is the link from PlayStore: https://play.google.com/store/apps/detai...scriptfree

And there are too many apps created using this software that are uploaded by the community to PlayStore. It is available since October 26, 2013

Regards
Reply
#4
(Oct-22-2023, 05:42 AM)Gribouillis Wrote: Your link leads to opaque files with extensions .ppk and .apk. They may be unsecure to download. Don't you have a web page where the source code of the library is freely available? Is the library open-source? If it is not, don't count on me to download it!

Hi, if you are not comfortable downloading files directly from our server, then you can just wait till we publish to Google Play, which will hopefully be in the next week or two.

BTW .ppk and .apk files are just zip files and you can explore their contents if you like by adding a .zip extension.
Reply
#5
Hi @d_a_v_e

Thanks for the sharing.

I've tried to visit your website but I got
[Image: damn.png]

Cheers
[Image: NfRQr9R.jpg]
Reply
#6
Good news... we now have official Python support in DroidScript, including python samples in the documentation Smile
https://play.google.com/store/apps/detai...scriptfree

Thanks to Brython, you can now build native Android apps directly on your phone using Python!

Please let us know what you think of our implementation and report any issues here -
https://github.com/DroidScript/Tracker/issues

Or Discuss it here-
https://discord.gg/6suwJ3g4px

P.S. It would great if some of you Python dudes could help us create more Python samples, we are mostly JavaScript guys so we need a little help Big Grin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python to build desktop and mobile apps tneilson08 4 2,857 Apr-04-2024, 09:49 PM
Last Post: Thadectives
  python-3.10.0-amd64 build corrupt? lohphat 4 2,434 Nov-21-2021, 09:28 AM
Last Post: Axel_Erfurt
  Python GUI for Android - ebook for free OlafArtAnanda 2 3,793 Jul-20-2021, 11:07 PM
Last Post: phoenix
  configuring python at build time Skaperen 2 1,923 Jul-03-2019, 11:33 PM
Last Post: Skaperen
  Resources for automated testing of Android apps using TestComplete? ackmondual 0 1,784 May-20-2019, 09:03 PM
Last Post: ackmondual
  coming up with a sentinel string for file names lacaca 1 1,915 Apr-13-2019, 09:31 AM
Last Post: Larz60+
  Failed tkinter Compile In Custom 3.7.2 Build Using Custom Tcl/Tk Build gwc 0 2,623 Jan-25-2019, 01:56 PM
Last Post: gwc
  coming up with a sentinel string for file names Skaperen 4 2,634 Jan-05-2019, 06:28 AM
Last Post: Skaperen
  Whether or not it needs Java for Android with Python Aashuraa 4 3,176 Nov-26-2018, 02:36 PM
Last Post: Aashuraa
  How does one get reproducible builds for apps on PyPI? arnavb 0 2,728 Sep-06-2018, 07:44 PM
Last Post: arnavb

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020