Cloud Development Kit

Answered

About Android environment integration cloud recognition.

发送   newContentPackager

返回类型确认

发送   {

“ type” “ newContentPart”
“ contentType” “ MATH” “ mimeTypes” :[ “ application / x-latex” “ application / mathml + xml” ] }
发送配置
发送 {

类型“ addStrokes”

笔画[ { “ id” 'pending-1' “ pointerType
'PEN' “×” [ 273 278 281 ],“Y” [ 121 128
133 ],“ t”
[ 3185.7900000000004 3
213.8150000000005 3222.5350000000003 ],“P” [ 1.3 1.3 1.3 ] } ] }
系统返回给我“ 键入错误消息,当前内容无内容  

我想知道Android是否不能使用WebSockets或为什么 



Best Answer

Dear 新 雷,


Thank you for your update.


In the configuration of your code sample, you should make following changes:


  1. The configuration message must be sent before creating the part, else the configuration is not applied to the new part. So you must move your configuration block code before your contentpart block code.
  2. In your configuration json there is a small mistake on the language key name: it must be "lang" (not "language"). So in your code the line "\"language\":\"zh_CN\",\n"+must be replaced by "\"lang\":\"zh_CN\",\n" +



With those updates, the strokes are recognized as 干as you expect.


Regards,

 

Gwenaëlle


SVG patch return type; "APPEND_CHILD"

It has always been this type that has not changed.

Do I need to make some changes in some places?

Dear XiangJue,


I recomment you play with the webDemo and look for the messages in the console: https://webdemo.myscript.com/views/text/index.html


Doing an erasure I had the following message:

{"type":"svgPatch","updates":[
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "SET_ATTRIBUTE", "name": "viewBox", "value": "0 0 1920 100 " },
{ "type": "SET_ATTRIBUTE", "name": "height", "value": "100px" }
],"layer":"BACKGROUND"}


Applying all the SVG patches should normally update properly your background.


Best regards,


Olivier

Login or Signup to post a comment