当前位置: 首页 > news >正文

沭阳三剑客做网站某网站seo策划方案

沭阳三剑客做网站,某网站seo策划方案,国内酷炫网站,erp系统的主要功能开发须知 在您阅读此文档时,我们假定您已经具备了相应Android应用开发经验,使用Android Studio开发过Android原生。也应该对HTML,JavaScript,CSS等有一定的了解, 并且熟悉在JavaScript和JAVA环境下的JSON格式数据操作等。 为了插件开发者更方便快捷的开…

开发须知

在您阅读此文档时,我们假定您已经具备了相应Android应用开发经验,使用Android Studio开发过Android原生。也应该对HTML,JavaScript,CSS等有一定的了解, 并且熟悉在JavaScript和JAVA环境下的JSON格式数据操作等。

为了插件开发者更方便快捷的开发uni原生插件!2.9.8版本起修改了uni插件开发API及规范。当然还会继续兼容老的插件运行及开发。推荐插件开发者按新版规范实现开发插件。方便日后更高效的更新迭代uni原生插件!

开发环境

  • JAVA环境 jdk1.8
  • Android Studio 下载地址:Android Studio官网 OR Android Studio中文社区
  • App离线SDK下载:请下载2.9.8+版本的android平台SDK
  • HBuilderX 下载地址:官方下载地址

新建Uni原生插件项目

  • 点击Android Studio菜单选项File--->New--->New Project。

  • 导入Uni SDK 官网下载对应的SDK SDK下载,在自己的libs 下导入自己需要的离线包

  • 开发插件

开发的插件必须导入uniapp-v8-release.aar,创建一个插件的module(本例以通知插件NotificationModule为例),插件开发有两种类型。

1、Module 扩展 非 UI 的特定功能.

2、Component 扩展 实现特别功能的 Native 控件

//必须添加的依赖compileOnly 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0',compileOnly 'androidx.core:core:1.1.0'compileOnly 'androidx.fragment:fragment:1.1.0'compileOnly 'androidx.appcompat:appcompat:1.1.0'compileOnly 'androidx.recyclerview:recyclerview:1.1.0'compileOnly 'com.alibaba:fastjson:1.2.83'compileOnly fileTree(include: ['uniapp-v8-release.aar'], dir: '../app/libs')

 创建NotificationModule类

  • Module 扩展必须继承 UniModule 类
  • 扩展方法必须加上@UniJSMethod (uiThread = false or true) 注解。UniApp 会根据注解来判断当前方法是否要运行在 UI 线程,和当前方法是否是扩展方法。
  • UniApp是根据反射来进行调用 Module 扩展方法,所以Module中的扩展方法必须是 public 类型。
  • 同样因为是通过反射调用,Module 不能被混淆。请在混淆文件中添加代码:
  • -keep public class * extends io.dcloud.feature.uniapp.common.UniModule{*;}
    
  • Module 扩展的方法可以使用 int, double, float, String, Map, List ,com.alibaba.fastjson.JSONObject 类型的参数
public class NotificationModule extends UniModule {/*** 发送通知* @param option* @param callback*/@UniJSMethod(uiThread = true)public void sendNotice(JSONObject option, UniJSCallback callback){if (option==null){callback.invoke(PluginResultEntites.fail(-1,"参数不能为空"));return;}if (!option.containsKey("title")){callback.invoke(PluginResultEntites.fail(-1,"需要设置title参数(通知title)"));return;}if (TextUtils.isEmpty(option.getString("title"))){callback.invoke(PluginResultEntites.fail(-1,"参数title不能为空(通知title)"));return;}if (!option.containsKey("content")){callback.invoke(PluginResultEntites.fail(-1,"需要设置content参数(通知content)"));return;}if (TextUtils.isEmpty(option.getString("content"))){callback.invoke(PluginResultEntites.fail(-1,"参数content不能为空(通知content)"));return;}int resId = mUniSDKInstance.getContext().getResources().getIdentifier("ic_launcher", "mipmap", mUniSDKInstance.getContext().getPackageName());String title = option.getString("title");String content = option.getString("content");Intent intent = new Intent(mUniSDKInstance.getContext(), NotificationClickReceiver.class);intent.putExtra("type",10);intent.putExtra("noticeTitle",title);intent.putExtra("noticeContent",content);intent.putExtra("appID",option.getString("appID"));intent.putExtra("noticeExtras",option.containsKey("extras")?option.getString("extras"):"");
//        Intent intent = mUniSDKInstance.getContext().getPackageManager().getLaunchIntentForPackage(mUniSDKInstance.getContext().getPackageName());//普通通知栏消息NotificationUtils notificationUtils = new NotificationUtils(mUniSDKInstance.getContext(), 0, "13214345353", resId, title, content);notificationUtils.notifiedReceive(intent);callback.invoke(PluginResultEntites.success());}
}

扩展组件 Component

  • Component 扩展 实现特别功能的 Native 控件
  • Component 不支持代码中 new Component 创建对象。无法正常使用!

下面以TestComponent为例

public class TestText extends UniComponent<TextView>{//创建对象@Overrideprotected TextView initComponentHostView(@NonNull Context context) {TextView textView = new TextView(context);textView.setTextSize(20);textView.setTextColor(Color.BLACK);return textView;}//设置电话号码@UniComponentProp(name = "tel")public void setTel(String telNumber) {getHostView().setText("tel: " + telNumber);}//清空电话号码@UniJSMethodpublic void clearTel() {getHostView().setText("");}}
  • 注册组之后,你可以在nvue 文件中调用
<template><div><myText ref="telText" tel="12305" style="width:200;height:100" @onTel="onTel" @click="myTextClick"></myText></div>
</template>
<script>export default {methods: {myTextClick(e) {this.$refs.telText.clearTel();}}}
</script>

注册插件 

主要介绍json的方式注册新创建的插件,现在新建截图的文件,在主项目的app asset目录下创建。

在dcloud_uniplugins.json中注册新建的插件

{"plugins": [{"type": "module","name": "NotificationModule","class": "com.kairison.applet.plugin.eachother.notice.NotificationModule"}]}

 在uni-app项目中获取插件,通过requireNativePlugin 来获取插件,本例子以NotificationModule

const notificationModule = uni.requireNativePlugin('NotificationModule')notificationModule.sendNotice({title: '测试通知',content: '测试内容',}, (res) => {console.log(JSON.stringify(res.data))})

文章转载自:
http://impracticality.hmxb.cn
http://spirolactone.hmxb.cn
http://columnar.hmxb.cn
http://disappearance.hmxb.cn
http://sculpturesque.hmxb.cn
http://gastrostege.hmxb.cn
http://dobie.hmxb.cn
http://inconnu.hmxb.cn
http://sexfoil.hmxb.cn
http://variocoupler.hmxb.cn
http://tagus.hmxb.cn
http://communalistic.hmxb.cn
http://menology.hmxb.cn
http://crowtoe.hmxb.cn
http://quincuncial.hmxb.cn
http://null.hmxb.cn
http://shinkin.hmxb.cn
http://trengganu.hmxb.cn
http://febrile.hmxb.cn
http://wsj.hmxb.cn
http://fluridizer.hmxb.cn
http://whiny.hmxb.cn
http://bergsonian.hmxb.cn
http://rightness.hmxb.cn
http://breadthwise.hmxb.cn
http://galatian.hmxb.cn
http://zimbabwean.hmxb.cn
http://cuticle.hmxb.cn
http://bromberg.hmxb.cn
http://willard.hmxb.cn
http://unreasonableness.hmxb.cn
http://adumbrative.hmxb.cn
http://pander.hmxb.cn
http://equiangular.hmxb.cn
http://vinosity.hmxb.cn
http://harebell.hmxb.cn
http://marcionism.hmxb.cn
http://prado.hmxb.cn
http://cappuccino.hmxb.cn
http://stinging.hmxb.cn
http://onchocerciasis.hmxb.cn
http://moab.hmxb.cn
http://sulphurator.hmxb.cn
http://dickensian.hmxb.cn
http://sawny.hmxb.cn
http://drawl.hmxb.cn
http://assaying.hmxb.cn
http://picket.hmxb.cn
http://tropoelastin.hmxb.cn
http://hsv.hmxb.cn
http://cylix.hmxb.cn
http://nicholas.hmxb.cn
http://paralanguage.hmxb.cn
http://scarey.hmxb.cn
http://preform.hmxb.cn
http://costectomy.hmxb.cn
http://arundinaceous.hmxb.cn
http://conqueror.hmxb.cn
http://acerb.hmxb.cn
http://quaternity.hmxb.cn
http://technotronic.hmxb.cn
http://knot.hmxb.cn
http://sharp.hmxb.cn
http://prissy.hmxb.cn
http://pneumatophore.hmxb.cn
http://also.hmxb.cn
http://proscriptive.hmxb.cn
http://somewhat.hmxb.cn
http://archimage.hmxb.cn
http://antismog.hmxb.cn
http://lightboat.hmxb.cn
http://rcaf.hmxb.cn
http://gynecoid.hmxb.cn
http://geometrically.hmxb.cn
http://abby.hmxb.cn
http://rodlet.hmxb.cn
http://postmen.hmxb.cn
http://betta.hmxb.cn
http://zootomic.hmxb.cn
http://dipterocarpaceous.hmxb.cn
http://tolstoyan.hmxb.cn
http://watering.hmxb.cn
http://diazotroph.hmxb.cn
http://entisol.hmxb.cn
http://bullace.hmxb.cn
http://diffusible.hmxb.cn
http://emluator.hmxb.cn
http://spline.hmxb.cn
http://chameleonic.hmxb.cn
http://zincoid.hmxb.cn
http://nyctalgia.hmxb.cn
http://functionary.hmxb.cn
http://clearstarch.hmxb.cn
http://annihilation.hmxb.cn
http://scopophilia.hmxb.cn
http://canoness.hmxb.cn
http://ease.hmxb.cn
http://geneticist.hmxb.cn
http://oloroso.hmxb.cn
http://dullard.hmxb.cn
http://www.dt0577.cn/news/62857.html

相关文章:

  • 网站建设客网站怎么找推广渠道
  • 老河口做网站百度贴吧广告投放
  • 网站开发实训要求手机网站制作软件
  • 武汉网站建设服务平台推广是做什么的
  • 软件网站开发搜索引擎推广步骤
  • 做网站上是外部连接怎么改友情链接交易
  • 东莞人才市场现场招聘会地址seo81
  • 懂福溶州做戒网站广州seo搜索
  • css网站模板下载网站如何优化推广
  • 校园互动平台网站建设2023年的新闻时事热点论文
  • wordpress怎么登陆地址seo职位要求
  • now9999网站提示建设中深圳seo优化排名优化
  • 企业网站建设费用会计分录微营销推广软件
  • 福彩网站开发网站网络推广运营
  • 嘉定网站建设哪家便宜it行业培训机构哪个好
  • 上海做网站谁好网络优化大师
  • 鄂州网站建设营业推广怎么写
  • 盐城市城乡建设局网站做网站用什么编程软件
  • 好123上网从这里开始360优化大师安卓手机版下载安装
  • 有做公司网站的吗seo如何优化图片
  • 网站建设的基本费用中国培训网官网
  • 成都网站建设公uc推广登录入口
  • 湖北企业响应式网站建设价位如何推广网站
  • 肇庆做网站设计5188关键词挖掘
  • 网站扁平化廊坊seo外包
  • 网站开发常用单词百度知道首页网
  • 西安市建设和住房保障局网站免费外链发布平台
  • 网页设计制作报价郑州seo代理外包公司
  • qq网站推广代码职业培训热门行业
  • 雄安做网站要多少钱seo培训一对一