Cordova Background Geolocation 示例应用教程

Cordova Background Geolocation 示例应用教程

cordova-background-geolocation-SampleAppCordova Background Geolocation Sample Application项目地址:https://gitcode.com/gh_mirrors/co/cordova-background-geolocation-SampleApp

1. 项目的目录结构及介绍

cordova-background-geolocation-SampleApp/
├── bin/
├── resources/
├── scripts/
├── src/
├── .gitignore
├── LICENSE.md
├── README.md
├── angular.json
├── config.xml
├── ionic.config.json
├── karma.conf.js
├── package-lock.json
├── package.json
├── tsconfig.app.json
├── tsconfig.json
└── tsconfig.spec.json
  • bin/: 包含一些构建和运行脚本的目录。
  • resources/: 包含应用的资源文件,如图标和启动画面。
  • scripts/: 包含一些自定义脚本。
  • src/: 包含应用的主要源代码。
  • .gitignore: Git忽略文件。
  • LICENSE.md: 项目的许可证文件。
  • README.md: 项目的说明文档。
  • angular.json: Angular项目的配置文件。
  • config.xml: Cordova项目的配置文件。
  • ionic.config.json: Ionic项目的配置文件。
  • karma.conf.js: Karma测试框架的配置文件。
  • package-lock.json: npm依赖锁文件。
  • package.json: npm包配置文件。
  • tsconfig.app.json: TypeScript应用配置文件。
  • tsconfig.json: TypeScript主配置文件。
  • tsconfig.spec.json: TypeScript测试配置文件。

2. 项目的启动文件介绍

项目的启动文件位于 src/ 目录下,主要包括:

  • main.ts: 应用的主入口文件,负责启动Angular应用。
  • index.html: 应用的HTML模板文件,包含应用的根元素。
  • app.component.ts: 应用的根组件,负责初始化应用的视图和逻辑。

3. 项目的配置文件介绍

config.xml

config.xml 是Cordova项目的配置文件,包含应用的基本信息、插件配置、平台配置等。

<widget id="com.transistorsoft.backgroundgeolocation.ionic2" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>BG Geo</name>
    <description>A sample Apache Cordova application that responds to the deviceready event.</description>
    <author email="support@transistorsoft.com" href="http://transistorsoft.com">Transistor Software</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

package.json

package.json 是npm包配置文件,包含项目的依赖、脚本、版本等信息。

{
  "name": "cordova-background-geolocation-SampleApp",
  "version": "0.0.1",
  "author": "Chris Scott <chris@transistorsoft.com>",
  "homepage": "https://transistorsoft.com",
  "private": true,
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "dependencies": {
    "@angular/common": "~8.1.2",
    "@angular/core": "~8.1.2",
    "@angular/forms": "~8.1.2",
    "@angular/platform-browser": "~8.1.2",
    "@

cordova-background-geolocation-SampleAppCordova Background Geolocation Sample Application项目地址:https://gitcode.com/gh_mirrors/co/cordova-background-geolocation-SampleApp

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

羿辰果Gemstone

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值