回复 1楼王岳天的帖子
安装包中有随机安装例子,其中有 Support.java 文件中有 license 使用方法代码:
- public class Support {
- public static boolean isKernelExpired() {
- return RasterSupport.getKernelExpired();
- }
- public static void setLicense(Context context) {
- // add your license file to the raw folder
- int licenseFileId = 0;//R.raw.YourLicense;
- String developerKey = "";
- try {
- InputStream stream = context.getResources().openRawResource(licenseFileId);
- RasterSupport.setLicense(stream, developerKey);
- Log.w("RasterSupport", RasterSupport.getKernelType().toString());
- } catch(Exception ex) {
- Log.w("RasterSupport", ex.getMessage());
- } finally {
- if(RasterSupport.getKernelType() != RasterKernelType.RELEASE && !isKernelExpired())
- RasterSupport.initialize(context);
- }
- }
- }
复制代码
路径:
leadtools18_android\Examples\Android\Leadtools.Demos\src\leadtools\demos |