Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 0 additions & 98 deletions .circleci/config.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

25 changes: 0 additions & 25 deletions .npmignore

This file was deleted.

30 changes: 30 additions & 0 deletions BackgroundGeolocation.Promise.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// <reference path="node_modules/react-native-mauron85-background-geolocation/index.d.ts" />

// Type definitions for react-native-mauron85-background-geolocation
// Project: https://github.com/mauron85/react-native-background-geolocation
// Definitions by: Mauron85 (@mauron85)
// Definitions: https://github.com/mauron85/react-native-background-geolocation/blob/master/index.d.ts

namespace BackgroundGeolocationPlugin {
export interface LocationZ {
speed: number
}

/**
* One time location check to get current location of the device.
*
* Error codes:
* 1. PERMISSION_DENIED
* 2. LOCATION_UNAVAILABLE
* 3. TIMEOUT
*
* @param success
* @param fail
* @param options
*/
export function getCurrentLocationAsync(
options?: PositionOptions
): Promise<Location>;
}

export { BackgroundGeolocationPlugin as BackgroundGeolocation }
24 changes: 24 additions & 0 deletions BackgroundGeolocation.Promise.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//import { promisify } from './es6-promisify';
import BackgroundGeolocation from 'react-native-mauron85-background-geolocation';

function promisify(func) {
return (...args) => {
return new Promise((resolve, reject) => {
const success = (data) => resolve(data);
const failure = (err) => reject(err);
func.apply(func, [success, failure, ...args]);
});
};
}

const EXCLUDES = ['on'];

for (var propName in BackgroundGeolocation) {
const prop = BackgroundGeolocation[propName];
if (typeof prop === 'function' && !~EXCLUDES.indexOf(propName)) {
BackgroundGeolocation[propName + 'Async'] = promisify(prop);
}
}


export { BackgroundGeolocation };
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

Npm package is now [@mauron85/react-native-background-geolocation](https://www.npmjs.com/package/@mauron85/react-native-background-geolocation)!

# Donation

Please support my work and continued development with your donation.

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6GW8FPTE6TV5J)

## Submitting issues

All new issues should follow instructions in [ISSUE_TEMPLATE.md](https://raw.githubusercontent.com/mauron85/react-native-background-geolocation/master/ISSUE_TEMPLATE.md).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
o/classes
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.marianhello.bgloc.react;

public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.marianhello.bgloc.react";
public static final String BUILD_TYPE = "debug";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.marianhello.bgloc.react"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="21" />

<uses-permission android:name="android.hardware.location" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application>
<service
android:name="com.marianhello.bgloc.sync.SyncService"
android:exported="true"
android:process=":sync" >
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>

<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
</service>
<service
android:name="com.marianhello.bgloc.sync.AuthenticatorService"
android:exported="true" >
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>

<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>

<provider
android:name="com.marianhello.bgloc.data.provider.LocationContentProvider"
android:authorities="@string/mauron85_bgloc_content_authority"
android:exported="false"
android:syncable="true" />

<service
android:name="com.marianhello.bgloc.service.LocationServiceImpl"
android:enabled="true"
android:exported="false" />
<service
android:name="com.marianhello.bgloc.react.headless.HeadlessService"
android:enabled="true"
android:exported="false" />

<receiver
android:name="com.marianhello.bgloc.BootCompletedReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 3,
"artifactType": {
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
"kind": "Directory"
},
"applicationId": "com.marianhello.bgloc.react",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"outputFile": "AndroidManifest.xml"
}
],
"elementType": "File"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
aarFormatVersion=1.0
aarMetadataVersion=1.0
minCompileSdk=1
minCompileSdkExtension=0
minAndroidGradlePluginVersion=1.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Binary file not shown.
Binary file not shown.
Loading