This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var enumsModule = require("ui/enums"); | |
var cameraModule = require("camera"); | |
var fs = require('file-system'); | |
var bghttp = require("nativescript-background-http"); | |
exports.takephoto = function(args) { | |
cameraModule.takePicture({width: 800, height: 800, keepAspectRatio: true}).then(function(picture) { | |
var savepath = fs.knownFolders.currentApp().path + "/saved_images"; | |
var filename = 'img_' + new Date().getTime() + '.jpg'; | |
var filepath = fs.path.join(savepath, filename); |
NewerOlder