method One: Publish Eclipse Android Project (tick), as IOS Publish Xcode like, in Eclipse in the Write call
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/50/wKioL1R-5s7QD6LDAADSoB9rjGI139.jpg "title=" 1.jpg " alt= "Wkiol1r-5s7qd6ldaadsob9rjgi139.jpg"/>
Method Two:
Operational process Configuration points:
1. new Android Project, note the package path like mine is com.zx, the other steps are done directly next
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/52/wKiom1R-5mGiXUlCAABT1sfoAN8434.jpg "title=" 2.jpg " alt= "Wkiom1r-5mgixulcaabt1sfoan8434.jpg"/>
2. tick Mark This project as a library
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/50/wKioL1R-5wzybiRMAAB1dJnKkhA488.jpg "title=" 3.jpg " alt= "Wkiol1r-5wzybirmaab1djnkkha488.jpg"/>
3, the new Android project to write the relevant interface method, copy bin file (only need Zx.jar),res resource Pack, Androidmainfest.xml configuration file
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/52/wKiom1R-5svTmWyeAAElVaVV6l8304.jpg "title=" 4.jpg " alt= "Wkiom1r-5svtmwyeaaelvavv6l8304.jpg"/>
4.Copy to the Plugins/android folder in the Unity project , such as, and unzip the Zx.jar package in the bin folder
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/50/wKioL1R-54_x4MhpAAAqaJpMInA911.jpg "title=" 5.jpg " alt= "Wkiol1r-54_x4mhpaaaqajpmina911.jpg"/>
5, set the release package reference Path, note the same as the Android class package
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/52/wKiom1R-5xHxGXukAABMLl3jPhU838.jpg "title=" 6.jpg " alt= "Wkiom1r-5xhxgxukaabmll3jphu838.jpg"/>
6.Unity Call Android method Reference
Java class public method 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/54/50/ Wkiol1r-56mbhi0laaagmttylpy366.jpg "title=" 7.jpg "alt=" Wkiol1r-56mbhi0laaagmttylpy366.jpg "/>
Unity calls
public void Savetophoto (string imgurl) {#if unity_editor//Current platform #elif unity_iphone//ios platform #elif unity_android Android Platform Androidjavaclass JC = Newandroidjavaclass ("Com.unity3d.player.UnityPlayer"); Androidjavaobject Jo =JC. Getstatic<androidjavaobject> ("currentactivity"); Jo. Call ("SaveImage", Imgurl); #endif}
Unity calls Android Configuration method