Giter Club home page Giter Club logo

Comments (1)

alex-Symbroson avatar alex-Symbroson commented on August 29, 2024

AlanH — 01/10/2023 11:40
Not sure if it’s what you want, this url is how to create a plug-in with AIDE

https://groups.google.com/d/msg/androidscript/UdFza30tYEY/ELBOIbFTBQAJ

Jumar — 02/10/2023 03:07
If you are creating plugins as pure javascript plugin you can use the Web IDE to code. But if you are creating a native/java plugin for DS you should use AIDE or Android Studio to code which you can build to APK too using AIDE or Android Studio.
For javascript plugin you can compile it to .ppk or just zip the folder containing the "MyPlugin.js" or "MyPlugin.inc", "MyPlugin.html" and "Version.txt".
To install, copy the .zip file or .ppk file into the Plugins folder of DroidScript and restart DroidScript app. You should be able to see a popup saying "Plugin installed" upon opening DroidScript.

d_a_v_e — 11/10/2023 02:58
@eric Zollman If you are creating a pure JavaScript plugin then you can use the ide.MakePlugin method like this -

If you create a fresh project in DS and include the ide.MakePlugin call at the start, it will generate the necessary javascript and html files required for a simple DS plugin. You just need to reload your project to see the new generated files. For example the code below will add 3 new files to your project - DemoPlugin.js, DemoPlugin.html and DemoPlugin.png

function OnStart() 
{ 
  //Package this project into a plugin and install it. 
  ide.MakePlugin( "DemoPlugin" ) 

   //Test the plugin functionality. 
   app.LoadPlugin( "DemoPlugin" ) 
   plg = app.CreateDemoPlugin() 
   alert( plg.Test( "World" ) ) 
}

You can examine those files to see the function pattern/style you need to use to add new features to your plugin. These files will be re-generated every time you run the project and a DemoPlugin.ppk will also be generated every time (in the DroidScript/PPKs folder) which contains the packaged plugin, ready for deployment or uploading to the DS Store.

If you want to make a Java plugin, I recommend using Android Studio and this template - https://github.com/DroidScript/Plugin-Java

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.