Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. PhoneGap plugins, why a different Javascript part for each platform (Android, iOS)?
  2. var FilePlugin = function() {};
  3. FilePlugin.prototype.read = function(data, successCallback, failureCallback) {
  4. return PhoneGap.exec(    
  5.         successCallback,  
  6.         failureCallback,    
  7.         'FilePlugin',  
  8.         'read',              
  9.         [data]);      
  10. };
  11. PhoneGap.addConstructor(function() {
  12. PhoneGap.addPlugin("FilePlugin", new FilePlugin());
  13. });