renamed folders with lower cases and renamed user preferences to local settings

This commit is contained in:
Stanimir Karoserov
2014-05-13 17:59:30 +03:00
parent b6313517db
commit ceff7bb368
58 changed files with 227 additions and 225 deletions

27
camera/camera.android.ts Normal file
View File

@@ -0,0 +1,27 @@
import appModule = require("application/application");
var REQUEST_IMAGE_CAPTURE: number = 1;
var REQUEST_SELECT_PICTURE: number = 2;
export class CameraManager {
public takePicture(params: any, onSuccess: (imageData: any) => any, onError?: (error: any) => any) {
var takePictureIntent = new android.content.Intent('android.media.action.IMAGE_CAPTURE');
var androidApp = appModule.android;
if (takePictureIntent.resolveActivity(androidApp.context.getPackageManager()) !== null) {
androidApp.currentActivity.startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
}
}
// options { useSavedPhotos: true }
public pictureFromLibrary(params: any, onSuccess: (imageData: any) => any, onError?: (error: any) => any) {
var readPictureIntent = new android.content.Intent();
var androidApp = appModule.android;
readPictureIntent.setType('image/*');
readPictureIntent.setAction('android.intent.action.GET_CONTENT');
androidApp.currentActivity.startActivityForResult(android.content.Intent.createChooser(readPictureIntent, 'Select Picture'),
REQUEST_SELECT_PICTURE);
}
}

18
camera/camera.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
export declare enum CameraPosition {
FRONT = 0,
BACK = 1,
}
export declare enum FlashMode {
AUTO = 0, // default
ON = 1,
OFF = 2
}
// TODO most of hardware related parts need to handle onPause and onResume of the calling activities
export declare class CameraManager {
takePicture(params: any, onSuccess: (imageData: any) => any, onError?: (error: any) => any);
// options { useSavedPhotos: true }
pictureFromLibrary(params: any, onSuccess: (imageData: any) => any, onError?: (error: any) => any);
}

11
camera/camera.ios.ts Normal file
View File

@@ -0,0 +1,11 @@
var REQUEST_IMAGE_CAPTURE: number = 1;
var REQUEST_SELECT_PICTURE: number = 2;
export class CameraManager {
public takePicture(params: any, onSuccess: (imageData: any) => any, onError?: (error: any) => any) {
}
// options { useSavedPhotos: true }
public pictureFromLibrary(params: any, onSuccess: (imageData: any) => any, onError?: (error: any) => any) {
}
}

2
camera/index.ts Normal file
View File

@@ -0,0 +1,2 @@
declare var module, require;
module.exports = require("Camera/camera");