mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Removed location tests and deprecated camera module.
This commit is contained in:
@@ -1 +1 @@
|
||||
Allows you to take pictures with the device's camera.
|
||||
Deprecated. Please use same functionality from `nativescript-camera` npm module.
|
||||
|
||||
@@ -7,6 +7,9 @@ import * as platform from "platform";
|
||||
|
||||
var REQUEST_IMAGE_CAPTURE = 3453;
|
||||
|
||||
/**
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export var takePicture = function (options?): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
@@ -96,6 +99,9 @@ export var takePicture = function (options?): Promise<any> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export var isAvailable = function () {
|
||||
var utils: typeof utilsModule = require("utils/utils");
|
||||
|
||||
|
||||
8
tns-core-modules/camera/camera.d.ts
vendored
8
tns-core-modules/camera/camera.d.ts
vendored
@@ -6,16 +6,18 @@ declare module "camera" {
|
||||
import imageSource = require("image-source");
|
||||
|
||||
/**
|
||||
* Take a photo using the camera.
|
||||
* @param options - Optional parameter for setting different camera options.
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
|
||||
|
||||
/**
|
||||
* Is the camera available to use
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export function isAvailable(): Boolean;
|
||||
|
||||
/**
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export interface CameraOptions {
|
||||
/**
|
||||
* Defines the desired width (in device independent pixels) of the taken image. It should be used with height property.
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as cameraCommonModule from "./camera-common";
|
||||
import * as imageSourceModule from "image-source";
|
||||
import * as frameModule from "ui/frame";
|
||||
|
||||
@Deprecated
|
||||
class UIImagePickerControllerDelegateImpl extends NSObject implements UIImagePickerControllerDelegate {
|
||||
public static ObjCProtocols = [UIImagePickerControllerDelegate];
|
||||
|
||||
@@ -79,6 +80,9 @@ class UIImagePickerControllerDelegateImpl extends NSObject implements UIImagePic
|
||||
|
||||
var listener;
|
||||
|
||||
/**
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export var takePicture = function (options): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
listener = null;
|
||||
@@ -125,6 +129,9 @@ export var takePicture = function (options): Promise<any> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* [Deprecated. Please use same functionality from `nativescript-camera` npm module]
|
||||
*/
|
||||
export var isAvailable = function () {
|
||||
return UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
Allows you to use the geolocation of the device.
|
||||
Deprecated. Please use same functionality from `nativescript-geolocation` npm module.
|
||||
6
tns-core-modules/location/location.d.ts
vendored
6
tns-core-modules/location/location.d.ts
vendored
@@ -12,6 +12,7 @@ declare module "location" {
|
||||
|
||||
/**
|
||||
* A data class that encapsulates common properties for a geolocation.
|
||||
* [Deprecated. Please use same functionality from `nativescript-geolocation` npm module]
|
||||
*/
|
||||
export class Location {
|
||||
/**
|
||||
@@ -67,6 +68,7 @@ declare module "location" {
|
||||
|
||||
/**
|
||||
* Provides options for location monitoring.
|
||||
* [Deprecated. Please use same functionality from `nativescript-geolocation` npm module]
|
||||
*/
|
||||
export interface Options {
|
||||
/**
|
||||
@@ -97,6 +99,7 @@ declare module "location" {
|
||||
|
||||
/**
|
||||
* Provides methods for querying geolocation (in case available) on the target platform.
|
||||
* [Deprecated. Please use same functionality from `nativescript-geolocation` npm module]
|
||||
*/
|
||||
export class LocationManager {
|
||||
/**
|
||||
@@ -157,6 +160,7 @@ declare module "location" {
|
||||
|
||||
/**
|
||||
* Provides Android specific data related to location.
|
||||
* [Deprecated. Please use same functionality from `nativescript-geolocation` npm module]
|
||||
*/
|
||||
export interface AndroidLocationManager {
|
||||
/**
|
||||
@@ -175,12 +179,14 @@ declare module "location" {
|
||||
* If you specify timeout = 0 it just requests the last known location.
|
||||
* However if you specify maximumAge and the location received is older it won't be received.
|
||||
* @param options - An optional object specifying location update settings.
|
||||
* [Deprecated. Please use same functionality from `nativescript-geolocation` npm module]
|
||||
*/
|
||||
export function getLocation(options?: Options): Promise<Location>;
|
||||
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* Provides iOS specific data related to location.
|
||||
* [Deprecated. Please use same functionality from `nativescript-geolocation` npm module]
|
||||
*/
|
||||
export interface iOSLocationManager {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user