[英]How can I improve/make changes to the orginal Gluon Charm Down Services and use it in my app?
I am using Gluon Mobile so that I can use javafx to build applications to iOS and Android. 我正在使用Gluon Mobile,以便可以使用javafx将应用程序构建到iOS和Android。 I wonder how I can change/improve on the existing Charm Down library of services that are available: http://gluonhq.com/products/mobile/charm-down/
我不知道如何更改/改进现有的Charm Down服务库: http : //gluonhq.com/products/mobile/charm-down/
In my case specifically I need to take images that cover the whole screen on mobile. 以我为例,我需要拍摄覆盖移动设备整个屏幕的图像。 How can images taking up the whole screen be taken on Android and iPhone?
如何在Android和iPhone上拍摄占据整个屏幕的图像? And so I am looking to make edits to the
VideoService
and the PicturesService
. 所以我想对
VideoService
和PicturesService
进行编辑。 By altering and building onto these existing services I hope to avoid alot of work that has already been done. 通过更改和构建这些现有服务,我希望避免进行很多工作。
How can I edit existing services in Charm Down and use it in my app? 如何在Charm Down中编辑现有服务并在我的应用程序中使用它?
If you check the Charm Down repository overview, you will find the required instructions for building your own version. 如果查看Charm Down 存储库概述,则将找到构建自己的版本所需的说明。
These are the requisites in case you want to fork Gluon Charm Down and build your local version: 这些是您要派生Gluon Charm Down并构建本地版本的必要条件:
To build the Android Services: 要构建Android服务:
Android SDK: the android SDK must be downloaded. Android SDK:必须下载android SDK。 The required Android platform is android-25.
所需的Android平台为android-25。
ANDROID_HOME
has to be defined as an environment variable, typically by adding it as a gradle property to ~/.gradle/gradle.properties
. 必须将
ANDROID_HOME
定义为环境变量,通常将其作为gradle属性添加到~/.gradle/gradle.properties
。
To build the iOS Services: 要构建iOS服务:
Once you have the above requisites, clone the repository from here: 满足上述条件后,请从此处克隆存储库:
hg clone https://bitbucket.org/gluon-oss/charm-down
(You might need to sign in in Bitbucket). (您可能需要登录Bitbucket)。
Open the project with your IDE. 用您的IDE打开项目。
Before modifying any of the services try to build it, install it and use them in your project. 在修改任何服务之前,请尝试对其进行构建,安装并在项目中使用它们。
To build the Charm Down services, on the project's root, run on command line: 要构建Charm Down服务,请在项目的根目录上,在命令行上运行:
./gradlew clean build
If you want to install them, run: 如果要安装它们,请运行:
./gradlew clean install
When the process finishes successfully, the different services are installed in your local .m2
maven repository. 该过程成功完成后,将在本地
.m2
maven存储库中安装不同的服务。
All these required jars can be added to a Gluon Mobile project by including mavenLocal()
in the list of repositories and the snapshot version ( currently 3.7.0-SNAPSHOT
, but this could be changed as well): 通过在存储库列表和快照版本( 当前为
3.7.0-SNAPSHOT
,但也可以更改mavenLocal()
中包括mavenLocal()
,可以将所有这些必需的jar添加到mavenLocal()
Mobile项目中:
repositories {
mavenLocal()
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
jfxmobile {
downConfig {
version = '3.7.0-SNAPSHOT'
plugins 'display', 'lifecycle', 'pictures', 'statusbar', 'storage'
}
}
Tip: there are too many services that you don't want to modify, so you can comment out some of them from the settings.gradle
file, mainly to reduce the building time. 提示:不想修改的服务太多,因此您可以从
settings.gradle
文件中注释掉其中一些,主要是为了减少构建时间。
Once everything is settled properly, you can start modifying the source code as you need. 一切妥当解决后,您可以根据需要开始修改源代码。 Anytime you want to check your changes, just run
./gradlew install
and then deploy and run your project. ./gradlew install
您要检查更改时,只需运行./gradlew install
,然后部署并运行您的项目即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.