描述插件安装包的方法及移动终端技术

技术编号:19008933 阅读:39 留言:0更新日期:2018-09-22 08:50
本申请是201410758987.3的分案申请,公开了一种描述插件安装包的方法及移动终端,通过根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序;在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息。本发明专利技术还公开了一种移动终端,从而规范描述插件安卓包APK的身份信息的程序,有简单方便、格式统一等优点。

Method for describing plug-in installation package and mobile terminal

This application is a case-by-case application for 201410758987.3, which discloses a method for describing plug-in package installation and a mobile terminal, creating a program for describing the identity of plug-in Android package APK in the plug-in Android package APK according to pre-set rules, and the main camera APK in communication with the plug-in Android package APK. APK parses the program and gets the identity information of the plug-in Android package APK. The invention also discloses a mobile terminal, thereby standardizing the program for describing the identity information of the plug-in Android package APK, which has the advantages of simplicity, convenience and uniform format.

【技术实现步骤摘要】
描述插件安装包的方法及移动终端本申请是分案申请,原申请的申请号为201410758987.3,申请日为2014年12月10日,专利技术名称为“描述插件安装包的方法及移动终端”。
本专利技术涉及移动终端领域,尤其涉及一种描述插件安装包的方法及移动终端。
技术介绍
目前,随着移动终端各种新的插件的应用软件的相继推出,为了能搭载和扩展各式功能的新插件,移动终端的主相机需要获知上述各种新的插件安卓包APK的身份信息,因此,在设计插件安卓包(AndroidPackage,APK)时,需要一种程序描述上述各种新的插件的APK的身份信息,使得上述移动终端的主相机能获知该插件安卓包APK的身份信息。
技术实现思路
本专利技术提供一种描述插件安装包的方法及移动终端,主要目的在于解决如何使得移动终端获取插件安卓包APK的身份信息的技术问题。为实现上述目的,本专利技术提供的一种描述插件安装包的方法,所述描述插件安装包的方法包括:根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序;在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息。优选地,所述根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序之后,还包括:将所述程序存储在预先设置的所述插件安卓包APK的目录下。优选地,所述身份信息至少包括所述插件的名称、所述描述插件的程序的类的名称、移动终端的前置摄像头是否支持所述插件的应用程序的标识、所述移动终端是否安装所述插件的应用程序的标识中至少一个或者两个以上。优选地,所述根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序,包括:在插件安卓包APK的asserts目录下创建”plugin.xml”的程序;"plugin.xml"为:<plugin-features><packagename="A1"></package><classname="A2">common</class><mode-supporeted-front>true</mode-supporeted-front><mode-supporeted-local>true</mode-supporeted-local></plugin-features>其中,"A1"为所述插件的名称;"A2"为所述插件的程序的类的名称,“mode-supporeted-front>true</mode-supporeted-front>”表示前置摄像头支持所述插件,“<mode-supporeted-local>true</mode-supporeted-local>”表示所述移动终端安装所述插件的应用程序。优选地,所述在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息,包括:InputStreampluginXmlInput=pluginContext.getAssets().open("plugin.xml");其中,"plugin.xml"为:<plugin-features><packagename="A1"></package><classname="A2">common</class><mode-supporeted-front>true</mode-supporeted-front><mode-supporeted-local>true</mode-supporeted-local></plugin-features>;pluginContext.getAssets().open(”plugin.xml”)为解析所述插件安卓包APK的asserts目录下创建的所述”plugin.xml”的程序。此外,为实现上述目的,本专利技术还提供一种移动终端,所述移动终端包括:创建单元,用于根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序;获取单元,用于在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息。优选地,所述移动终端还包括:存储单元,用于将所述程序存储在预先设置的所述插件安卓包APK的目录下。优选地,所述身份信息至少包括所述插件的名称、所述描述插件的程序的类的名称、移动终端的前置摄像头是否支持所述插件的应用程序的标识、所述移动终端是否安装所述插件的应用程序的标识中至少一个或者两个以上。优选地,所述创建单元,包括:在插件安卓包APK的asserts目录下创建”plugin.xml”的程序;"plugin.xml"为<plugin-features><packagename="A1"></package><classname="A2">common</class><mode-supporeted-front>true</mode-supporeted-front><mode-supporeted-local>true</mode-supporeted-local></plugin-features>其中,"A1"为所述插件的名称;"A2"为所述插件的程序的类的名称,“mode-supporeted-front>true</mode-supporeted-front>”表示前置摄像头支持所述插件,“<mode-supporeted-local>true</mode-supporeted-local>”表示所述移动终端安装所述插件的应用程序。优选地,所述获取单元,包括:InputStreampluginXmlInput=pluginContext.getAssets().open("plugin.xml");其中,"plugin.xml"为:<plugin-features><packagename="A1">&本文档来自技高网...
描述插件安装包的方法及移动终端

【技术保护点】
1.一种描述插件安装包的方法,其特征在于,所述描述插件安装包的方法包括:根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序;在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息。

【技术特征摘要】
1.一种描述插件安装包的方法,其特征在于,所述描述插件安装包的方法包括:根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序;在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息。2.根据权利要求1所述的方法,其特征在于,所述根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序之后,还包括:将所述程序存储在预先设置的所述插件安卓包APK的目录下。3.根据权利要求1所述的方法,其特征在于,所述身份信息至少包括所述插件的名称、所述描述插件的程序的类的名称、移动终端的前置摄像头是否支持所述插件的应用程序的标识、所述移动终端是否安装所述插件的应用程序的标识中一个或者两个以上。4.根据权利要求1至3任意一项所述的方法,其特征在于,所述根据预先设置的规则在插件安卓包APK中创建描述插件安卓包APK的身份信息的程序,包括:在插件安卓包APK的asserts目录下创建"plugin.xml"的程序;"plugin.xml"为:<plugin-features><packagename="A1"></package><classname="A2">common</class><mode-supporeted-front>true</mode-supporeted-front><mode-supporeted-local>true</mode-supporeted-local></plugin-features>其中,"A1"为所述插件的名称;"A2"为所述插件的程序的类的名称,“mode-supporeted-front>true</mode-supporeted-front>”表示前置摄像头支持所述插件,“<mode-supporeted-local>true</mode-supporeted-local>”表示所述移动终端安装所述插件的应用程序。5.根据权利要求4所述的方法,其特征在于,所述在主相机APK与所述插件安卓包APK相互通信的情况下,主相机APK解析所述程序,并获取所述插件安卓包APK的身份信息,包括:InputStreampluginXmlInput=pluginContext.getAssets().open("plugin.xml");其中,"plugin.xml"为:<plugin-features><packagename="A1"></package><classname="A2">common</class><mode-supporeted-front>true</mode-supporeted-front><mode-supporeted-local>true</mode-supporeted-local></plugin-features>;pluginContext.getAssets().open("...

【专利技术属性】
技术研发人员:李小朋李陈
申请(专利权)人:OPPO广东移动通信有限公司
类型:发明
国别省市:广东,44

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1