您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > 通过声明式方法和编程方式开发数据服务
Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.1Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.2IntegratingDeviceServiceswithADFMobileCopyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.3ApacheCordova/PhoneGapADFMobileutilizesPhoneGaptoaccessmostoftheonboarddevicesservices–TobereplacedbyApacheCordovasoonProvidesaccessto:–DeviceProperties–SMSandEmail(NotthroughPhoneGap)–Contacts–CameraandPhotoLibrary–GeolocationCopyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.4OverviewAccessingDeviceServices2.ImplicitELObjects3.ProgrammaticAPIs1.DataControlsCopyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.5OverviewAccessingDeviceServices2.ImplicitELObjects3.ProgrammaticAPIs1.DataControlsFoundintheDataControlPaletteDragndropservicesontoapageTakethegruntworkoutofcodingcallstotheAPIandconstructingthenecessaryscreensCopyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.6OverviewAccessingDeviceServices2.ImplicitELObjects3.ProgrammaticAPIs1.DataControlsProvideeasyaccesstodevicepropertiesReferencedviatheUIcomponentsSimplytypeorusetheExpressionBuilder#{deviceScope.device.hasContacts}Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.7OverviewAccessingDeviceServices2.ImplicitELObjects3.ProgrammaticAPIs1.DataControlsProvideprogrammerstheflexibilityofaccessingdeviceservicesfromJavawiththeirownJavaBeansEasiertohandleerrorconditionsandprocessanyoutputsDeviceManagerdm=DeviceManagerFactory.getDeviceManager();dm.sendEmail(foo@bar.com,joe.jones@corp.com,Testemail,Testmessage,null,null,null);Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.8DeviceServiceAccessiblefromJavaScriptAccessdeviceservicesfromnonAMXpages–RemoteURL–LocalHTMLAddJavaScriptlibrarytoyourpageDirectaccesstoinvokedevicefeaturesUseadf.mf.api.*–adf.mf.api.sendSMS({to:5551234567,body:Thisisatestmessage});Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.9Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.10AccessingDevicePropertiesServiceDataControlELAccessProgrammaticDevicePropertiesYesYesCopyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.11PropertyStatic/DynamicELExpressionSampleValueJavaAPIdevice.nameStatic#{deviceScope.device.name}JoeSmith'siPhoneDeviceManager.getName()device.platformStatic#{deviceScope.device.platform}iPhoneDeviceManager.getPlatform()device.versionStatic#{deviceScope.device.version}4.3.2,5.0.1DeviceManager.getVersion()device.osStatic#{deviceScope.device.os}iOSDeviceManager.getOs()device.modelStatic#{deviceScope.device.model}i386,iPhone3,1DeviceManager.getModel()device.phonegapStatic#{deviceScope.device.phonegap}1.0.0DeviceManager.getPhonegap()hardware.hasCameraStatic#{deviceScope.hardware.hasCamera}true,falseDeviceManager.hasCamera()hardware.hasContactsStatic#{deviceScope.hardware.hasContacts}true,falseDeviceManager.hasContacts()hardware.hasTouchScreenStatic#{deviceScope.hardware.hasTouchScreen}true,falseDeviceManager.hasTouchScreen()hardware.hasGeolocationStatic#{deviceScope.hardware.hasGeolocation}true,falseDeviceManager.hasGeolocation()hardware.hasAccelerometerStatic#{deviceScope.hardware.hasAccelerometer}true,falseDeviceManager.hasAccelerometer()hardware.hasCompassStatic#{deviceScope.hardware.hasCompass}true,falseDeviceManager.hasCompass()hardware.hasFileAccessStatic#{deviceScope.hardware.hasFileAccess}true,falseDeviceManager.hasFileAccess()hardware.hasLocalStorageStatic#{deviceScope.hardware.hasLocalStorage}true,falseDeviceManager.hasLocalStorage()hardware.hasMediaPlayerStatic#{deviceScope.hardware.hasMediaPlayer}true,falseDeviceManager.hasMediaPlayer()hardware.hasMediaRecorderStatic#{deviceScope.hardware.hasMediaRecorder}true,falseDeviceManager.hasMediaRecorder()hardware.networkStatusDynamic#{deviceScope.hardware.networkStatus}wifi,2g,unknownDeviceManager.getNetworkStatus()hardware.screen.widthDynamic#{deviceScope.hardware.screen.width}320,480DeviceManager.getScreenWidth()hardware.screen.heightDynamic#{deviceScope.hardware.screen.height}480,320DeviceManager.getScreenHeight()hardware.availableWidthDynamic#{deviceScope.hardware.availableWidth}=320,=480DeviceManager.getAvailableScreenWidth()hardware.availableHeightDynamic#{deviceScope.hardware.availableHeight}=480,=320DeviceManager.getAvailableScreenHeight()hardware.screen.dpiStatic#{deviceScope.hardware.screen.dpi}160,326DeviceManager.getScreenDpi()hardware.screen.diagonalSizeStatic#{deviceScope.hardware.screen.diagonalSize}9.7,6.78DeviceManager.getScreenDiagonalSize()hardware.screen.scaleFactorStatic#{deviceScope.hardware.screen.scaleFactor}1.0,2.0DeviceManager.getScreenScaleFactor()Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.12PRODUCTDEMONSTRATIONACCESSINGDEVICEPROPERTIESviaELExpressionCopyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.13Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.14Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.15Copyright©2012,Oracleand/oritsaffiliates.Allrightsreserved.16Copyright©2012,Oracleand/oritsaffiliates.Allri
本文标题:通过声明式方法和编程方式开发数据服务
链接地址:https://www.777doc.com/doc-1602796 .html