Home

MayLoon User Manual

image

Contents

1. 3 Mayloon Application Run Configurations Pici5 Run as Mayloon application MayLoon User Manual Select Java Application 0 I e mS Select type any character any String TZ TimeZone Matching items Q CompressedTrieEn org feit findword trie start android core Q TrieDictBuilder org feit findword trie H android core Q Pic16 Select Java application to run as MayLoon application 2 Start your desktop Chrome browser with the allow file access from files command line option and open the generated start page If a Chrome instance is already running without this option please close that first Please check the log messages in the Developer Console of Chrome in case the application does not launch successfully 18 MayLoon User Manual i n te AA Unpack Chromium e C file home luq runtime EclipseApplication mpt linpack android android core Start htm Google Bookm Developer Cons Commit Histor sdcard mim Handbook of M Shell variable 3185x182 AF Hello world LinpackActivity Pic17 Converted application running on Chrome 5 4 Debugging Application in Browser If you fail to launch your converted application in browser you can follow the below steps to identify the problem 1 Take Chrome Chromium browser as an example press F12 to invoke the Developer Tools view and click Console tab as below to check the console message you ca
2. 0 k funParams length k 427 if funParams k instanceof Clazz CastedNull 428 methodParams k null 429 else 430 methodParams k funParams k 431 H 432 l 433 else 434 methodParams funParams 435 H if fx lastMethod d 438 else 439 return 440 H 441 l 442 fx lastParams params typeString 443 fx lastClaxxRef claxxRef 444 var stacks fx stacks 445 if stacks null f Pic22 Application debug 5 5 Packaging for Tizen If you want to package the converted application for Tizen please follow the steps below after converting the project to MayLoon 22 MayLoon User Manual 5 6 7 Open mayloon build properties file of your converted application modify value of mayloon deploy mode to tizen mayloon deploy mode tizen Right click converted project and select Run As Mayloon Application Right click project and then select Export Expand Mayloon and select Export Mayloon Application and click Next as follows Select an export destination type filter text amp General amp Android amp Install amp Java 4 z Mayloon amp Export Mayloon Application amp Plug in Development amp Run Debug amp Tasks z Team amp XML Pic23 Export application Select the project you want to export and click Finish By default the Tizen project will be exported to mayLoon bin folder under your project folde
3. new EmbossMaskFilter direction ambien specular blurRadius Pic12 Converted MayLoon project without partial conversion If Partial Conversion mode is enabled stub classes functions will be generated for classes not supported by Mayloon and JNI method declarations Refer to section 5 2 for details You can review the generated code before proceeding 5 2 Implementing Stubs If Partial Conversion mode is enabled stub classes functions will be generated for classes not supported by Mayloon and JNI method declarations Here is a comparison between original android project and converted MayLoon project with partial conversion File Edit Run Source Navigate JX5d 0 Search Project Refactor Window Help amp G i0o4 De iti m Lr oa eer Y Du l 5 M y S I Package Explo z Project Explor IL E E com example missingclassnormal MainActivity BA Android 2 3 3 BA Android Dep gen Generated Java Files e assets amp bin amp libs amp res x classpath project AndroidManifest xml ic launcher web png proguard project txt project properties ii DP E i9 package com example missingclassnormal 4 amp import android os Bundle public class MainActivity extends Activity Override protected void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R layout activity main float
4. 24 MayLoon User Manual i n te e Otherwise if you are using Tizen IDE 2 1 please create a new Tizen web project and import your exported MayLoon application to this newly created project as following shows Please confirm if prompted to overwrite existing resources Import e EE Select Import resources from the local file system into an existing project Select an import source type filter text 4 General G Archive File 23 Existing Projects into Workspace 5e E Preferences amp Android amp C C cvs amp Git Install gt Plug in Development gt Run Debug Tasks amp Team m Tizen Q Back Next Finish Pic26 Select import source 9 MayLoon User Manual P omi E NEXELS anos File system Import resources from the local file system P From directory C Share source mayloon qa AndroidAppSource linpack mayloon_bi v Browse mayloon bin I com intel linpack LinpackActivity html Rs icon png Filter Types Select All Deselect All Into folder linpack Browse Options Overwrite existing resources without warning Create top level folder Advanced Pic27 Import from File System Open config xml in created project modify index html in Content tab to the generated html file
5. D Tizen Web li nfig xml Tizen File Edit Navigate Search Project Run Window Help r BGe5 mi 0 Qq 0 49 8B m iE Hye eror T Project Explorer 3N BSle7 ao ue linpack BA JavaScript Resources Overview bin General Infomation Widget Content e cs This section describes general information about this The content of the widget is made up of the following external widget section s amp images j2slib Identifier http yourdomain linpack amp Widget Sis Version 100 Features res sys Privileges amp WebContent Name linpack Access a config xml Content linpack html B icon png Localization a index html Icon icon png Browse Preference 0 linpack html Lon Launcher Icon Connection Explorer 3 A EE Tizen Content GB The content of the tizen is made up of the following section s Files X3 Tizen Overview Widget Features Privileges Access Localization Preferences Tizen Source fan MM ma eam STW Pic28 Set Content html file 26 MayLoon User Manual i n te 10 Right click the project and click Run As gt Tizen Web Simulator Application to run the project in Tizen web simulator 11 If you want to run the application on a Tizen device you should build the imported project in Tizen IDE and a Tizen application widget wgt file will be generated Note In order to speed up project build please go to project Proper
6. Xe 4 w 43 c LY GN ow oe E New gt Packag Pio Project 7 1 t Go Into amp amp vw a ES com intel linpack LinpackActivit BA Android 2 3 3 Open Type Hierarchy F4 BA Android Dependencies Show In Alt Shift W gt amp src gs gen Generated Java Files Copy Ctrl C settings Copy Qualified Name amp assets f Paste Ctrl V amp bin X Delete Delete D res X classpath Remove from Context Ctrl Alt Shift Down Li project Build Path a AndroidManifest xml Sauce Alt Shift S gt proguard cfg E project properties Refactor Alt Shift T gt gig Import e5 Export Build Project Refresh F5 T Close Project Assign Working Sets p pr p ar Run As gt ving e AD Debug As gt g ia Validate es o Convert to Mayloon Project m Team gt Compare With gt Restore from Local History Android Tools Pic8 Convert to Mayloon project 4 Convert Wizard will pop up you can configure partial conversion mode for application Partial Conversion Mode If partial conversion is enabled MayLoon will modify application source code in the following way during conversion It converts JNI method declarations into stub methods that you can later implement in either Java or JavaScript Under this mode MayLoon will also generate stub classes for the Android framework classes that MayLoon does not support Select the checkbox to enable this mode C
7. notice Do not finalize a design with this information The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications Current characterized errata are available on request Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order Copies of documents which have an order number and are referenced in this document or other Intel literature may be obtained by calling 1 800 548 4725 or by visiting Intel s Web Site Intel processor numbers are not a measure of performance Processor numbers differentiate features within each processor family not across different processor families See http www intel com products processor number for details BunnyPeople Celeron Celeron Inside Centrino Centrino Atom Centrino Atom Inside Centrino Inside Centrino logo Core Inside FlashFile i960 InstantIP Intel Intel logo Intel386 Intel486 IntelDX2 IntelDX4 IntelSX2 Intel Atom Intel Atom Inside Intel Core Intel Inside Intel Inside logo Intel Leap ahead Intel Leap ahead logo Intel NetBurst Intel NetMerge Intel NetStructure Intel SingleDriver Intel SpeedStep Intel StrataFlash Intel Viiv Intel vPro Intel XScale Itanium Itanium Inside MCS MMX Oplus OverDrive PDCharm Pentium Pentium Inside skoool Sound Mark The Journey Inside Viiv Inside vPro Inside V
8. Find more software by working with the Available Software Sites preferences type filter text Name MPT Location jar file C tools mayloon MPT MPT_0 3 zip Le jJ ewe jJ V Show only the latest versions of available software E Hide items that are already installed V Group items by category What is already installed E Show only software applicable to target environment Fl Contact all update sites during install to find required software Pic2 Add installation package Install MPT feature as normal eclipse plugin MayLoon User Manual i n te I j Available Software Check the items that you wish to install Work with MPT jar file C tools mayloon MPT MPT 0 3 zip Find more software by working with the Available Software Sites preferences type filter text Name b 000 MPT T Details V Show only the latest versions of available software Hide items that are already installed V Group items by category What is already installed E Show only software applicable to target environment E Contact all update sites during install to find required software lt Back Cne Finish Cancel Pic3 Installation process Note If you get a security warning saying that the authenticity or validity of the software can t be established click OK and continue S Installing Software Warning You are installing soft
9. EA ER RR 29 8 Known Incompatibilities and Limitations sssssssee mene 31 8 1 Eclipse pI giN mm 31 8 2 Incompatibility between Java and JavaScript sss 31 9 Upcoming Features aoene eret nt ret bex aRnek da aa Rma RRR RR R Re Ea DR R saad SRRR REN Ra arida 33 PT G 1 MayLoon User Manual Environment Requirements Linux or Windows PC Java JDK 1 6 Eclipse Classical 3 7 2 Indigo SR2 or higher with android ADT 21 or greater and JDT plugin installed MayLoon porting tool installation package MPT zip MayLoon SDK archive file MayLoon zip MayLoon User Manual i n te e Installing MayLoon Porting Tool 1 Open Eclipse IDE Help gt Install New Software then click Add button Select a site or enter the location of a site Work with type or select a site type filter text Name EO There is no site selected Details V Show only the latest versions of available software E Hide items that are already installed Group items by category What is already installed E Show only software applicable to target environment E Contact all update sites during install to find required software Pic1 Install MPT 2 Click Archive then select MPT xxx zip and OK 3 MayLoon User Manual n SS Install ca Available Software Select a site or enter the location of a site Work with type or select a site X
10. MayLoon User Manual Copyright 2013 Intel Corporation Document Number xxxxxx xxxUS World Wide Web http www intel com software Document Number XXXXX XXXXX e n tel MayLoon User Manual Disclaimer and Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS NO LICENSE EXPRESS OR IMPLIED BY ESTOPPEL OR OTHERWISE TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT EXCEPT AS PROVIDED IN INTEL S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY RELATING TO SALE AND OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE MERCHANTABILITY OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS OTHERWISE AGREED IN WRITING BY INTEL THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR Intel may make changes to specifications and product descriptions at any time without notice Designers must not rely on the absence or characteristics of any features or instructions marked reserved or undefined Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them The information here is subject to change without
11. Tune Xeon and Xeon Inside are trademarks of Intel Corporation in the U S and other countries Other names and brands may be claimed as the property of others Copyright C 2010 Intel Corporation All rights reserved Revision History Document Revision Description Revision Date Number Number Initial release March 2013 003 Updated for MayLoon 0 3 1 June 2013 ee 002 Updated for MayLoon alpha May 2013 E la Updatea ror Mayloon a July 2013 MayLoon User Manual i n te Table of Contents 1 Environment Requiremients ouessecossei rng dono oet veretur a enne ma dune Ra one Gd Eu 4 2 Installing MayLoon Porting Tool irrigeren a a 5 3 Uninstalling and Upgrading Mayloon Porting Tool c sse ee 8 3 1 Uninstal DUUM 8 3 2 WP GFA Sai EE 9 4 Configuring MayLoon Porting Tool sssssssessssen nnne ensem 10 5 Using MayLoori Portirig TOO 5n eon pn nonet n Rd bin me ne a cube Robes ket a wee 11 5 1 Converting to MayLOOr eei eren npn ernannt hn hr ka dtr eR Ra RR Rin RE RR GER FERA 11 5 2 Implementing St bs z ceci tat arse rex rera ae DE De ch Cr a va sa ge RR RUE 15 5 3 Building and Running iuit reor tne regn n nax kk retur cer a ra niche pea ke as 17 5 4 Debugging Application in Browser cccceeceeee eee ee eee eee menn 19 5 5 Packaging fOr TIZ6rn dii ai iia sap en sana edax RR ERE RE N 22 6 Supported cU 28 7 Unsupported Features seriinin peores n dee qadan nearer side eus rad rk pK RUE R
12. ayout android widget LayoutInflater Creating view Framelayout Done UIID 148 ID 16908290 LayoutInflater inflate createView success LayoutInflater in rInflate for View 148 Activity Activity s CanonicalName com example android patharc ArcsActivity onStart Activity Activity s CanonicalName com example android patharc ArcsActivity onResume ViewRoot Attaching handlers ViewRoot viewVisibilityChanged 0 Home Application launch time is 211 29 lt top frame gt GD Qro Warnings Logs Pic18 Chrome console bin framework android util bin framework android util bin framework android util bin framework android util L bin framework android util Log 1s 99 bin framework android util L bin framework android util L bin framework android util L bin framework android util L bin framework android util bin fram fandroid util bin fram Jandroid util L bin fra android util bin f rk android util L bin framework android util L bin framework android util Log is 9 bin framework android util bin framework android util bin framework android util L bin framework android util L ramework android util L ramework android util bin framework android util l bin framework android util bin framework android util L bin framework android util l bin framework android util bin framew
13. cript code in the panel more readable with proper indent 75 function load2J2SLibZ2S path cb 3 76 var sxr document createElement SCRIPT 77 sxr src path 78 sxr type text javascript 78 if cb 8e var t onreadystatechange 81 ar xhrCallback generateScriptCallback 82 if typeof sxr t undefined 83 sxr onload xhrCallback 84 else 85 sxr t xhrCallback 86 87 l 88 document getElementsByTagName HEAD 0 appendChild sxr 89 98 if navieatnr user eent tn nwerCase indexOF cerka 1 f 91 4 m J P r ret rint B 2 Of N Pic20 Chrome console format 3 You can check Call Stack Watch Expressions Scope Variables and also Step into the function in the Debug Area at the right of the source code panel You can also search methods in the Search Scripts toolbar MayLoon User Manual uj gt gt f Paused a Watch Expressions eC a No Watch Expressions Call Stack ava ecfipse ava unc win32 Clazz load Clazz defineMethod Sfz se anonymous function e2 Clazz defineMethod viewGroup bin framework android view View js 188 1 Clazz overrideMethod children bin framework android view ViewGroup js 621 Clazz defineMethod more bin frameworc android view ViewGroup js 489 Clazz ssem C Java eclipse java junc win22 x86 64 eclipse plugin delegsting C Java eclipse java junc win32 x86 64 eclipse plugin C
14. direction 1 0f 2 0f 3 0f 4 0f h float ambien 1f float specular 1f float blurRadius 1f EmbossMaskFilter emf new EmbossMaskFilter direction emf hashCode public static native int add int a int b 4 Pic13 Original Android project ambien specular blurRadius MayLoon User Manual J Package Explo 3 gt lj Project Explor J MainActivityjava 23 ES 7 EBS Z BS J package com example missingclassnormal 4 com example missingclassnormal MainActivity 4 B src import android os Bundle 83 android core 4 android graphics public class MainActivity extends Activity J EmbossMaskfFilter java S Override iH com example missingclassnormal protected void onCreate Bundle savedInstanceState BB com intel mpt annotation super onCreate savedInstanceState 8 gen setContentView R layout activity main BA Mayloon 1 0 float direction assets 1 0f 2 0f 3 0f 4 0f bin H float ambien 1f amp external float specular 1f libs float blurRadius 1f njs aor per oy emf new EmbossMaskFilter res emf hashCode amp res sys X classpath E J2s p Xj project H pjzaative d Andean ew 7 archive zip Ma ic launcher web png public static int add int a int b B mayloon build properties System out println Stub Function add B proguard project txt return 0 B pr
15. eClasspath java j2sBase true Y Breakpoints 53 ClazzLoader setPrimaryFolder bin framework 54 ClazzLoader packageClasspath com intel jsdroid com dujin amail com imps tabletennis tranning java net com intel jsdroid weather android graphic No Breakpoints 55 ClazzLoader loadClass android core Start function 56 android core Start main 2 DOM Beskooits 57 H gt XHR Breakpoints 58 gt Event Listener Breakpoints 59 a gt Workers mozilla addon js Following script will make J2SLib compatiable with Java2Script addon 3 function generateScriptCallback 64 return function 65 var s this readyState 66 loaded s complete ader null j2s 1ib onload this 7 this onreadystatechange null this onload null B m nction loadJ2SLibZJS path cb var sxr document createElement SCRIPT sxr src path sxr type text javascript if cb var t onreadystatechange var xhrCallback generateScriptCallback if typeof sxr t undefined P sxr onload xhrCallback 84 else 85 sxr t xhrCallback 86 l 87 88 document getElementsByTagName HEAD 0 appendChild sxr 89 901 iva exOF eerkn I 1 f E Pause on all exceptions Click to Pause on uncaught exceptions ou aT NE Pic19 Chrome console debugging 2 You can click Pretty Print to make the JavaS
16. hat after conversion the project is still a Java project When you run it as MayLoon project it will be translated into an HTML5 application After converting Android application to MayLoon project if Partial Conversion mode is disabled and converted application contains APIs classes not supported by Mayloon problem markers will be displayed in editor as the following pic shows 14 MayLoon User Manual File Edit Run Source Refactor Navigate Search Project Window i i ig i my amp 4 j com example missingclassnormal MainActivity 4 9 src 8 android core 4B com example missingclassnormal gt GB gen BA Mayloon 1 0 assets bin external gt libs amp njs gt g res amp res sys Xj classpath j2s project j AndroidManifest xml archive zip c launcher web png mayloon build properties proguard project txt project properties Brug rO rQ EO Orr iF B JJ MainActivityjava 23 package com example missingclassnormal dy import android os Bundle public class MainActivity extends Activity e Override protected void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R layout activity main float direction 1 0f 2 0f 3 0f 4 0f h float ambien 1f float specular 1f float blurRadius 1f emf hashCode public static native int add int a int b B emf
17. ion provider MayLoon currently doesn t support GPS location provider Camera MayLoon applications cannot use camera yet e Wallpaper The resulting HTML5 applications cannot operate on wallpaper e AppWidget Predefined intents MayLoon User Manual Intents is mechanism that Android implements to support message delivery between Android application and system MayLoon currently does not support any of the predefined Intents for example placing phone call or launching web browser e Bluetooth operation e Networking features e Telephony features e Vibrator e File IO e Sensors 30 MayLoon User Manual 8 8 1 Known Incompatibilities and Limitations Eclipse plugin On Windows PC if the Eclipse installation and the application are on different disk drives C D the resulting HTML5 application might not be able to run 8 2 Incompatibility between Java and JavaScript This section lists the known incompatibilities when converting with MayLoon Currently the MayLoon porting tool does not prompt the developer that any of the incompatibilities is identified in the original Android application As MayLoon translates between 2 different programming languages some differences are inevitable e NullPointerException In some APIs of the Android framework a NullPointerException will be thrown when a null pointer is passed in for the API invocation This mechanism is built into Java runtime MayLoon ap
18. it 8 bytes floating point numbers However JavaScript bitwise operators do not work on all 64 bits of the operands Actually they only work on half of the bits 32 bits Therefore when the Android application performs bitwise operations on long integers the behavior of the resulting HTML5 application might be different Multi process and multi thread Due to the single threaded nature of JavaScript MayLoon applications do not support multi process or multi thread Threading behavior of MayLoon applications is undefined 32 MayLoon User Manual 9 Upcoming Features The following are some features we will add in upcoming releases Basic HTTP networking e SQLite database amp Content Provider Simple services em G
19. lazz overrideMethod children bin framework android view ViewGroup js 619 I Clazz defineMethod more bin framework android view ViewGroup js 489 Clazz ssem 0 Java eclipse java junc win32 x86 64 eclipse plugin delegating C Java eclipse java junc win22 x86 64 eclipse plugin Clazz defineMethod viewGroup bin framework android view View js 1885 Clazz defineMethod Sfz bin framework android view ViewRoot js 752 Clazz defineMethod Sfz bin framework android view ViewRoot js 561 anonymous function bin framework android view ViewRoot js 778 anonymous function bin framework android os Handler js 22 Clazz defineMethod Sfz bin framewcrk android os MesssgeQueue js 140 Clazz defineMethod msg bin framework android os MesssgeQueue js 112 Clazz defineMethod sent bin framework android os Handler js 158 snonymous function bin framework android os Handler js 143 Scope Variables Y Local Pic21 Stack info 4 Sometimes we can t step into the function directly We need to reach the function by going through some internal low level function calls This is depending on the compiler s implementation 419 Clazz saem function To claxxRef fxName funParams 420 var params Clazz getParamsType funParams 421 var fx To fxName 422 if fx lastParams params typeString amp amp fx lastClaxxRef claxxRef 423 var methodParams null 8 424 if params hasCastedNull 425 methodParams new Array 426 for var k
20. lick Next gt button to continue 12 MayLoon User Manual Convert to Mayloon Application Press Next to check necessary files and information Enable partial conversion ETE m mm nee Pic9 Convert wizard 5 Check info will list in this page Error information Errors that will terminate convert process Warning information Information that needs developer to pay attention to Check Before Convert Error and warning information shows below Error information Can t find necessary Android file C Share source mayloon qa AndroidAppSource com intel jsdroid calculi I ALT Warning information Project depends on other library C tools mayloon android app com intel jsdroid calculator2 libs arity 2 1 2 Fish Pic10 Check before conversion MayLoon User Manual Click Next or Finish button if there is no error in project otherwise please fix the error before converting project If partial conversion mode is enabled stub class and method info will be listed You can also click View Report button to view stub info in browser gt g ow S mt Sn Conversion Report Stub information shows below All stub classes and methods shall be implemented manually Stub classes Stub methods Method add int a int b in MainActivity java Pic11 Conversion report Note t
21. n filter it with Errors at the bottom of the Console tab m MayLoon User Manual 3 EB tements a Resources Network i Scripts amp Timeine gt Profies Q Audts o Console qa ActivityStack gt gt gt Activity com example animation MainActivity being finished but not in LRU list Activity in startActivityForResult ActivityStack gt gt gt startActivityMayWait PackageManager resolveIntenti PackageManager resolveIntent2 PackageManager 1 ActivityStacko startActivityMayWait2 ActivityStack gt gt gt aInfo applicationInfo packageName com example android patharc alnfo name com example android patharc ArcsActivity ActivityStack gt gt gt intent getComponent com example android patharc com example android patharc ArcsActivity ActivityStack gt gt gt ActivityStack gt gt gt Sending result to com intel jsdroid home Home index 8 ActivityStack gt gt gt NH gt 6 NH 4 Activity Activity s CanonicalName com intel jsdroid home Home onPause Context Context is 18 Context ApplicationContentResolver create 1 18 Context ApplicationContentResolver NOT NULL Context Context is 19 Context Context is 20 Context Context is 21 Context ApplicationContentResolver create 1 21 Context ApplicationContentResolver NOT NULL ActivityThread appContext is created 21 Activity Activity s CanonicalName com example android patharc ArcsActivity onCreate LayoutInflater createView Framel
22. oject properties Pic14 Converted MayLoon project with partial conversion enabled A list of the generated stub methods and stub classes are printed in the Eclipse console You can review the generated stubs and implement them Toimplement the method add int a int b please remove the comment including the j2sNative just above the method and implement the method using either Java code or JavaScript Intuitively the above method would be implemented as follows public static int add int a int b return a 4 b The generated stub class EmbossMaskFilter contains 3 constructors that once called will error out To implement the stub class please implement all the necessary constructors and methods as in normal Android Java application If the stub class originates from Android framework please refer to the official Android developer documentation http developer android com index html for detailed description of the class In addition to converting Java code to JavaScript MayLoon also offers a hybrid programming model meaning that you can embed JavaScript code into Java program in the same way as you can embed assembly code into C C program MayLoon uses the Java2Script library to achieve hybrid programming The j2sNative block in Pic14 is an example illustrating how this works Please refer to http j2s sourceforge net for more information on hybrid programming using j2s Application developer
23. ork android util L bin framework android util Log bin framework android util L bin framework android util Li 1 Asthe errors in Console are printed out when the errors already occur if you want to pause at the stack when errors occur you can switch to Sources It can be Scripts varying from Chromium versions tab and enable Pause all exceptions at the bottom Then press F5 to refresh the page to reload the application and it will pause at the exceptions Other than relying on runtime exceptions MayLoon also provides the force breakpoints for the developer It will force the debugger to break at that line if you have opened the Chrome Inspector regardless there is exception or not You can insert the breakpoint by using either of the below functions in Java code DebuguUtils DebugBreakPoint for unconditional breakpoint DebugUtils DebugBreakPoint boolean condition for conditional breakpoint If you want to force break at JavaScript level you can use below code debugger break at JavaScript level 20 MayLoon User Manual i n te e Elements Resources Network Sources Timeline Profiles Audits Console o F android core Start html F nja t ti y 48 forward true b Watch Expressions e 49 mode dailybuild Y Call Stack 50 onload function 51 var j2sBase window j2s lib j2sBase Y Scope Variables 52 ClazzLoader packag
24. ource Project SWTBot for Eclipse Forms Testing incubation 2 10 201302221524 org eclipse swtbot forms feature group Eclipse org Q SWTBot for Eclipse Testing incubation 2 1 0 201302221524 org eclipse swtboteclipsefeature group Eclipse org Q SWTBot for GEF Testing incubation 21 0 201302221524 org eclipse swtbot eclipse gef feature group Eclipse org n Q SWTBot for SWT Testing incubation 2 0 201302221524 org eclipse swtbot feature group Eclipse org Q SWTBot IDE Features incubation 21 0201302221524 org eclipse swtbot ide feature group Eclipse org GP SWTBot JUnit Headless launchers for Eclipse incubation 2 1 0 201302221524 org eclipse swtbot eclipse test junit featur Eclipse org Q SWTBot Recorder and Test Generator incubation 21 0 2001302221524 org eclipse swtbot generatorfeaturefeatu Eclipse org Q Tracer for OpenGL ES 20 0 0 v2012062420 com android ide eclipse gldebugger featu The Android Open Source Project 4 n Mayloon Porting Tool q Pepe Pic6 Uninstall 2 3 Then click Finish button to finish uninstalling and click Restart Now button to make uninstallation work immediately 3 2 Upgrade If you want to Upgrade MayLoon porting tool please uninstall installed MayLoon porting tool plugin as 3 1 describes and then follow section 2 to install your new MayLoon porting tool ntel MayLoon User Manual 4 Configuring MayLoon Porting Tool Click Window gt Preference
25. plications do not always throw NullPointerException when it is required by the Android API specification Function overload Function overloading is a usual feature in Object Oriented languages MayLoon implements majority of function overloading capability However consider the following Java class public class MyClass public static void method int intParam System out println int public static void method float floatParam System out println float public static void method String strParam System out println String public static void main String args method 0 Call method int method 1 2f Call method float method Hello Call method String MayLoon User Manual One of the differences between JavaScript and Java is the numbering system In JavaScript there is only one Number type for all the numbers Therefore when converted to JavaScript the application is not able to distinguish between method int intParam and method float floatParam When method 0 is invoked in the example the program outputs float instead of int The application is able to distinguish between method String strParam from the other two though 64 bit Bitwise Operators Bitwise operators are also translated from Java to JavaScript in a straightforward way For example bitwise AND a amp b is translated into the same operation In JavaScript all numbers are stored as 64 b
26. r Follow the page http developer tizen org downloads sdk installing tizen sdk to setup your Tizen development environment Open Tizen IDE and create a new Tizen web project MayLoon User Manual O Tien Web Teen DE RR RR m ae File Edit Navigate Search Project Run Window Help New Alt Shift N gt Tizen Web Project E Open File F3 Project Close Cti W FY Other Ctrl N Close All Ctrl Shift W Save Ctrl S Save As Save All Ctrl Shift S Revert Move 7 Rename F2 Refresh F5 Convert Line Delimiters To Print Ctrl P Switch Workspace Restart Import Export EE Properties Alt Enter 1 config xml amail 2 config xml hairstyle 3 config xml test 4 confiaxml com intel isdroid calcu Ff Problems 52 El Console Pic24 Create Tizen web project 8 If you are working with Tizen IDE 2 0 do not use default location and set Location with content exported in step 5 Create a Web Application Project Create a Web Application project in the workspace or in an external location a Sample User Template 4 Tizen Blank Application E m n Tizen Web UI Framework Type JavaScript jQuery Mobile T Tizen Web UI Builder Tizen Blank Application Project name linpack Use default location Location C Share source mayloon qa AndroidAppSource linpack mayloon_bin Pic25 Set project location
27. s select Mayloon on the left tab there will be 1 item to configure SDK Location Set proper location of MayLoon SDK folder where MayLoon zip is extracted as the following pic shows Click Apply and OK button to apply your settings S Preferences type filter text General Android Ant Help Install Update Java Mayloon Mylyn Plug in Development Run Debug SWTBot Preferences Team Usage Data Collector Validation XML ae Mayloon Mayloon Preferences SDK Location C tools mayloon MPT mayloonSDK SDK version is 1 0 Support API Level 10 10 Pic7 Mayloon preferences MayLoon User Manual i n te 5 Using MayLoon Porting Tool This section goes through the steps to convert and build your Android application to HTML5 5 1 Converting to MayLoon 1 Import an existing Android project into Eclipse 2 Build the Android project make sure an android application package is generated successfully usually under the bin directory of the Android project Note if the application uses proprietary extensions to Android framework and cannot build in Eclipse environment please generate an APK package corresponding to this application offline and put it in the bin directory The conversion cannot proceed without the APK file 3 In Eclipse IDE Select your project to convert and then right click Click Convert to Mayloon Project MayLoon User Manual r3 v lori i LAL o XN ght LA 0
28. s can use hybrid programming for implementing stub classes and methods 16 MayLoon User Manual intel After the stubs are implemented as necessary the project is ready to be translated into HTML5 5 3 4 5 linpack b 9 src gt GB gen gt BA May amp sett asse gt amp bin Building and Running 1 Finally you can click Run As from the popup menu and then click Mayloon Application If there are one or more main entries in your application Select Java Application dialog will pop up select item Start android core and click OK to continue In this step all the Java source code files will be translated into JavaScript code and an HTML file will be generated as the entry of converted web application New Go Into Open in New Window Open Type Hierarchy Show In Copy Copy Qualified Name Paste Delete Remove from Context Build Path Source Refactor Import Build Project Refresh Close Project Assign Working Sets Run As Debug As Validate Team Compare With F4 Alt Shift W gt Ctrl C Ctrl V Delete Ctrl Alt Shift Down b Alt Shift S gt Alt Shift T gt 5 693 INFO Convert Project com example 2 318 INFO Partial Conversion Miss clas 2 359 INFO Partial Conversion Annotatio 2 453 INFO Convert Project com example i Rackun 1linp gt E5 1 Java Applet Alt Shift X A Hip i I 2Java Application Alt Shitt x Cla
29. ties Builders then unselect Validator and JSLint Builder items If you keep these builder options selected the build process will be much longer There might be compile errors in the project although they will not impact the generated package MayLoon User Manual 6 Supported APIs Please refer to one of the MayloonAPISupport HTML documents to find the list of APIs supported by MayLoon alpha 28 MayLoon User Manual i n te 7 Unsupported Features This chapter lists some of the features available from Android application framework while currently not available from MayLoon If some features are not supported the corresponding API will not function as expected but this does not necessarily mean that MayLoon will not be able to convert those Android applications Google service MayLoon has no access to Google service and APIs for now e TTS Text to speech APIs are not supported for now Notification MayLoon currently doesn t have notification support Security model MayLoon does not support Android s security model Instead the resulting HTML5 applications work in web browsers and web runtimes and are governed by their respective security models Therefore behavior with security impact in MayLoon could be different from Android External storage MayLoon cannot access external storage on the devices yet Power management MayLoon does not support Android power management API and schemes GPS locat
30. ware that contains unsigned content The authenticity or validity of this software cannot be established Do you want to continue with the installation ox J cmwe jJ Dee Pic4 Security warning MayLoon User Manual 5 r 3 3 Uninstalling and Upgrading Mayloon Porting Tool 3 1 Uninstall 1 Click Help gt About Eclipse then click Installation Details button in popup window x About Eclipse Eclipse for RCP and RAP Developers Version Indigo Service Release 2 Build id 20120216 1857 c Copyright Eclipse contributors and others 2000 2012 All rights reserved Visit http eclipse org This product includes software developed by the Apache Software Foundation http apache org e jJ Pic5 Uninstall 1 2 Select MayLoon porting tool plugin in Installed Software Tab and then click Uninstall button MayLoon User Manual i n te e Installed Software Installation History Features Plug ins Configuration Name Version Id Provider Q Android DDMS 20 0 0 v2012062420 com android ide eclipse ddms feature gro The Android Open Source Project Q Android Development Tools 20 0 0 v2012062420 com android ide eclipse adt feature group The Android Open Source Project Q Android Hierarchy Viewer 20 0 0 v2012062420 com android ide eclipse hierarchyviewer f The Android Open Source Project Qj Android Traceview com android ide eclipse traceview feature The Android Open S

Download Pdf Manuals

image

Related Search

Related Contents

  注意事項 - レミックス  OWNER`S MANUAL  Relatório e Contas  Prevents Weeds Before They Start  Point sur les accueils de jour - Informations - CHU Saint  User Manual - Graphtec America  3355 Series  Clarke 56105281 Use and Care Manual  Optoma TW615-3D data projector  

Copyright © All rights reserved.
Failed to retrieve file