Appspresso
Contact us   |
  • English
  • ABOUT
    • Overview
    • License
    • Roadmap
  • SHOWCASE
    • Featured Apps
    • Appspresso Features
    • Show off your app
  • DOWNLOAD
    • Download Appspresso
    • 3rd party libraries & frameworks
  • DEVELOPER CENTER
    • Getting Started
    • Tutorials
    • API Reference
    • API Samples
    • Appspresso Plug-in Development Kit
    • Google Groups

Namespace ax.ext.media

    Namespace Summary
    Constructor Attributes Constructor Name and Description
     
    ax.ext.media
    Media Extension API.

    Method Summary

    Method Attributes Method Name and Description
    <static>  
    ax.ext.media.captureImage(callback, errback, opts)
    capture an image(take a picture with camera).
    <static>  
    ax.ext.media.captureScreen(callback, errback, opts)
    capture the current screen(take a screenshot).
    <static>  
    ax.ext.media.pickImage(callback, errback, opts)
    pick an image(choose a picture from gallery).

    Namespace Detail

    ax.ext.media
    Media Extension API.

    Method Detail

    • <static> ax.ext.media.captureImage(callback, errback, opts)
      capture an image(take a picture with camera).
      var scb = function(file){
      	console.log(file);
      	
      	deviceapis.filesystem.resolve( 
      		function(file){ 
      			document.body.innerHTML = '';  
      		}, function(e){ 
      			console.log('resolve err:' + e.message);
      		}, file,  "r" 
      	);
      };
      var ecb = function(e){
      	console.log(e.message);
      };
      
      // for android 
      // var opts = {'crop':true, 'out': 'removable/capturedImage.jpg'};
      var opts = {'crop':true, 'out': 'images/capturedImage.jpg'};
      ax.ext.media.captureImage(scb, ecb, opts);
      Parameters:
      {function}callback
      {function}errback
      {ax.ext.media.CaptureImageOpts}opts
      Returns:
      AxRequest
    • <static> ax.ext.media.captureScreen(callback, errback, opts)
      capture the current screen(take a screenshot).
      var scb = function(file){
      	console.log(file);
      	
      	deviceapis.filesystem.resolve( 
      		function(file){ 
      			document.body.innerHTML = '';  
      		}, function(e){ 
      			console.log('resolve err:' + e.message);
      		}, file,  "r" 
      	);
      };
      var ecb = function(e){
      	console.log(e.message);
      };
      
      // for android
      // var opts = {'out': 'removable/capturedScreenImage.jpg'};
      var opts = {'out': 'images/capturedScreenImage.jpg'};
      ax.ext.media.captureScreen(scb, ecb, opts);
      Parameters:
      {function}callback
      {function}errback
      {ax.ext.media.CaptureScreenOpts}opts
      Returns:
      AxRequest
    • <static> ax.ext.media.pickImage(callback, errback, opts)
      pick an image(choose a picture from gallery).
      var scb = function(file){
      	console.log(file);
      	
      	deviceapis.filesystem.resolve( 
      		function(file){ 
      			document.body.innerHTML = '';  
      		}, function(e){ 
      			console.log('resolve err:' + e.message);
      		}, file,  "r" 
      	);
      };
      var ecb = function(e){
      	console.log(e.message);
      };
      // for android 
      // var opts = {'crop':true, 'out': 'removable/pickedImage.jpg'};
      var opts = {'crop':true, 'out': 'images/pickedImage.jpg'};
      ax.ext.media.pickImage(scb, ecb, opts);
      Parameters:
      {function}callback
      {function}errback
      {ax.ext.media.PickImageOpts}opts
      target dir & crop option
      Returns:
      AxRequest

      API Reference

      • Deviceapis
      • Devicestatus
      • Device Interaction
      • Contact
      • Accelerometer
      • Orientation
      • Geolocation
      • Camera
      • Messaging
      • Filesystem
      • Appspresso
        • ax
        • AxDef
        • AxPlugin
        • AxRequest
        • ax.bridge
        • ax.console
        • ax.util
      • Appspresso Extension
        • ax.ext.admob
        • ax.ext.android
        • ax.ext.contact
        • ax.ext.ios
        • ax.ext.ga
        • ax.ext.media
        • ax.ext.net
        • ax.ext.ui
        • ax.ext.zip
    RSS
    Twitter
    © 2011 Appspresso.com . powered by Wordpress