KinveyProvider no Delphi XE 7

Android

Delphi

14/06/2015

Alguém pode me ajudar com mensagens via KinveyProvider?

Vi alguns vídeos no youtube, encontrei alguns sites sobre o assunto no google porém segui os passos e não deu certo. Não aparece mensagem de errro, porém não exibe as mensagens envidas pelo servidor KinveyProvider.

Segui os passos do link: https://www.devmedia.com.br/google-cloud-messaging-introducao/29776

Segue abaixo a configuração que estou usando:

[img:descricao=Configurações do componente]http://arquivo.devmedia.com.br/forum/imagem/244149-20150614-135517.jpg[/img]

[img:descricao=Após envio da mensagem]http://arquivo.devmedia.com.br/forum/imagem/244149-20150614-135630.jpg[/img]
No PushEvents1 liguei ao KinveyProvider1 e implementei o seguinte:

DeviceRegistered
ShowMessage('Cel registrou');


DeviceTokenRequestFailed
ShowMessage('ERRO: '+AErrorMessage);


PushReceived
ShowMessage(AData.Message);


No arquivo AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="%package%"
        android:versionCode="%versionCode%"
        android:versionName="%versionName%">

    <!-- This is the platform API where NativeActivity was introduced. -->
    <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" />
<%uses-permission%>
<!-- GCM connects to Google Services. -->
    <uses-permission android:name="android.permission.INTERNET" />

    <!-- GCM requires a Google account. -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

    <!-- Keeps the processor from sleeping when a message is received. -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <!--
     Creates a custom permission so only this app can receive its messages.

     NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
     where PACKAGE is the application's package name.
    -->
    <permission android:name="%package%.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
    <uses-permission android:name="%package%.permission.C2D_MESSAGE" />

    <!-- This app has permission to register and receive data message. -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <application android:persistent="%persistent%" 
        android:restoreAnyVersion="%restoreAnyVersion%" 
        android:label="%label%" 
        android:installLocation="%installLocation%" 
        android:debuggable="%debuggable%" 
        android:largeHeap="%largeHeap%"
        android:icon="%icon%"
        android:theme="%theme%"
        android:hardwareAccelerated="%hardwareAccelerated%">

        <!--
            Implementado para recebimento de PUSH Notification
            com uso do Kinvey e o Google GCM.
        -->
        <receiver
      android:name="com.embarcadero.gcm.notifications.GCMNotification"
      android:exported="true"
      android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
          <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          <category android:name="%package%" />
        </intent-filter>
      </receiver>
      <service android:name="com.embarcadero.gcm.notifications.GCMIntentService" />
      <!-- Até aqui é o GCM -->

        <!-- Our activity is a subclass of the built-in NativeActivity framework class.
             This will take care of integrating with our NDK code. -->
        <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
                android:label="%activityLabel%"
                android:configChanges="orientation|keyboardHidden"
                android:launchMode="singleTask">
            <!-- Tell NativeActivity the name of our .so -->
            <meta-data android:name="android.app.lib_name"
                android:value="%libNameValue%" />
            <intent-filter>  
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter> 
        </activity>
        <%activity%>
        <receiver android:name="com.embarcadero.firemonkey.notifications.FMXNotificationAlarm" />
        <%receivers%>
    </application>
</manifest>
<!-- END_INCLUDE(manifest) -->
Paulo Andrade

Paulo Andrade

Curtidas 0
POSTAR