以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  往手机推送消息  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=143439)

--  作者:chenjiu6202
--  发布时间:2019/11/25 10:38:00
--  往手机推送消息

利用个推向手机推送消息,以下是官方关于C#的demo:

 

using com.gexin.rp.sdk.dto;

using com.igetui.api.openservice;

using com.igetui.api.openservice.igetui;

using com.igetui.api.openservice.igetui.template;

using com.igetui.api.openservice.payload;

using com.igetui.api.openservice.igetui.template.notify;

using GetuiServerApiSDK.payload;

public TransmissionTemplate TransmissionTemplateDemo(){

TransmissionTemplate template = new TransmissionTemplate();

template.AppId = APPID;

template.AppKey = APPKEY;

//应用启动类型,1:强制应用启动 2:等待应用启动

template.Transmissi;

//透传内容 template.Transmissi;

Notify noti = new Notify();

noti.Title = "请填入通知的标题";

noti.C;

// noti.Type = NotifyInfo.Types.Type._url;

//noti.Url = www.baidu.com;

noti.Type = NotifyInfo.Types.Type._intent;

noti.Intent = "intent:#Intent;launchFlags=0x10000000;package=com.pp.yl;component=你的包名 /com.getui.demo.MainActivity;i.parm1=12;end"; template.set3rdNotifyInfo(noti); return $template;

 

}

 

我引用GetuiServerApiSDK.payload.dll后,改写成:

Public Function TransmissionTemplateDemo(ByVal msgTitle As String,ByVal msgContent As String,ByVal msgPassContent As String) As object
MessageBox.Show("进来了")
\'Dim template As com.igetui.api.openservice.igetui.template.TransmissionTemplate = new com.igetui.api.openservice.igetui.template.TransmissionTemplate()
Dim template = new com.igetui.api.openservice.igetui.template.TransmissionTemplate()
template.AppId = APPID
template.AppKey = APPKEY
MessageBox.Show(template.AppId)
\'//应用启动类型,1:强制应用启动 2:等待应用启动
template.Transmissi
\'//透传内容
template.TransmissionContent = msgPassContent
Dim noti = new com.igetui.api.openservice.igetui.template.notify.Notify()
noti.Title = msgTitle
noti.Content = msgContent
MessageBox.Show(noti.Content)
\'// noti.Type = NotifyInfo.Types.Type._url
\'//noti.Url = "www.baidu.com"
noti.Type = com.gexin.rp.sdk.dto.NotifyInfo.Types.Type._intent
noti.Intent = "intent:#Intent;launchFlags=0x10000000;package=com.pp.yl;component=io.dcloud.H5BCFB6B5/com.getui.demo.MainActivity;i.parm1=12;end"
MessageBox.Show(noti.Type)
MessageBox.Show(noti.Intent)
template.set3rdNotifyInfo(noti)
Return template
End Function

 

结果没有任何反应,请专家老师看看,哪里有问题了

 


--  作者:chenjiu6202
--  发布时间:2019/11/25 10:41:00
--  
template.Transmissi = 2
--  作者:有点蓝
--  发布时间:2019/11/25 11:31:00
--  
看不懂