Comments (1)
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)
- Python example Exit
- Python example SimulateTouch HOT 1
- Python SetTheme example
- Python example GetLanguage
- LastButton, LastCheckBox, LastImage, LastToggle
- IsNewVersion Python example
- GetType example Python
- IsService example Python
- SimulateTouch example Javascript
- SetInForeground and SetInBackground examples
- GetFileSize example Python
- Gravar a tela do aparelho. HOT 4
- Problema com testadores. HOT 1
- Como usar extensão de linguagen ? HOT 1
- Erro Android 14 HOT 1
- RGB clarity
- AddTabs docs doesn't have parm for kayout
- Tutorial on Hybrid
- SetAlarm(); Problem
- [ invalid issue ] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.