Я просто попробовал код примера, предоставленный oracle maf для push-уведомлений. Я могу зарегистрироваться через него, но когда я передаю сообщение, я не получил никакого сообщения. это код сервера. Могут нам плз объяснить, как зарегистрироваться в gcm.I зарегистрировано там, но я сомневаюсь в том, что также и есть ли способ, чтобы увидеть сообщение получили деталь в GCMКак реализовать push-уведомление с использованием oracle maf
<af:commandButton actionListener="#{bindings.Execute.execute}"
text="Refresh"
disabled="#{!bindings.Execute.enabled}"
id="ctb1" immediate="true"/>
<af:table value="#{bindings.RegistrationsView1.collectionModel}"
var="row"
rows="#{bindings.RegistrationsView1.rangeSize}"
emptyText="#{bindings.RegistrationsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.RegistrationsView1.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.RegistrationsView1.collectionModel.selectedRow}"
selectionListener="#{bindings.RegistrationsView1.collectionModel.makeCurrent}"
rowSelection="single" id="t1"
partialTriggers="::ctb1" width="633" inlineStyle="height:189px;">
<af:column sortProperty="DeviceToken" sortable="false"
headerText="Device Token" id="c1" width="100">
<af:outputText value="#{row.DeviceToken}" id="ot5"/>
</af:column>
<af:column sortProperty="DeviceModel" sortable="false"
headerText="Device Model" id="c3" width="100">
<af:outputText value="#{row.DeviceModel}" id="ot4"/>
</af:column>
<af:column sortProperty="ApplicationId" sortable="false"
headerText="Application" id="c5" width="205">
<af:outputText value="#{row.ApplicationId}" id="ot1"/>
</af:column>
<af:column sortProperty="UserId" sortable="false"
headerText="User Id" id="c2" width="-5">
<af:outputText value="#{row.UserId}" id="ot3"/>
</af:column>
<af:column sortProperty="SenderId" sortable="false"
headerText="Sender Id" id="c4" width="100">
<af:outputText value="#{row.SenderId}" id="ot2"/>
</af:column>
</af:table>
</af:panelGroupLayout>
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl1">
<af:panelFormLayout id="pfl1" partialTriggers="t1">
<af:panelLabelAndMessage label="#{bindings.DeviceToken.hints.label}"
id="plam4">
<af:outputText value="#{bindings.DeviceToken.inputValue}"
id="ot7"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.DeviceModel.hints.label}"
id="plam2">
<af:outputText value="#{bindings.DeviceModel.inputValue}"
id="ot6"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.UserId.hints.label}"
id="plam1">
<af:outputText value="#{bindings.UserId.inputValue}"
id="ot9"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.ApplicationId.hints.label}"
id="plam3">
<af:outputText value="#{bindings.ApplicationId.inputValue}"
id="ot8"/>
</af:panelLabelAndMessage>
<af:inputText label="Message" id="it1"
value="#{MessageBean.message}"/>
</af:panelFormLayout>
<af:commandButton text="Push Message" id="cb1"
actionListener="#{MessageBean.pushMessage}"/>
</af:panelGroupLayout>
Внести соответствующий код в вопрос. –
Вы добавили код ADF, что связано с push и MAF? – User404
Расширение MAF 2.1.1 предоставляет два примера приложений - PushDemo, который демонстрирует, как получать push-уведомления в приложении MAF и PushServer, который демонстрирует, как отправлять push-уведомления в приложение MAF. Вышеприведенный код - это код push-сервера – CodeWriter