1

I'm working in a project that uses Xtify, and I'am trying with the getting started example, but I have problems. The example doesn't work. I get this in the LogCat: error opening trace file: No such file or directory(2)

This is my AndroidManifiest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.projects.xtifyproject"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

    <permission android:name="com.projects.xtifyproject.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
    <uses-permission android:name="com.projects.xtifyproject.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <provider
            android:name="com.xtify.sdk.db.Provider"
            android:authorities="com.projects.xtifyproject.XTIFY_PROVIDER"
            android:exported="false" />
        <receiver android:name="com.xtify.sdk.c2dm.C2DMBroadcastReceiver" >
            <intent-filter android:permission="com.google.android.c2dm.permission.SEND" >
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="com.projects.xtifyproject" />
            </intent-filter>
            <intent-filter android:permission="com.google.android.c2dm.permission.SEND" >
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="com.projects.xtifyproject" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.xtify.sdk.NotifActionReceiver" />
        <receiver android:name="com.xtify.sdk.wi.AlarmReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <service android:name="com.xtify.sdk.location.LocationUpdateService" />
        <service android:name="com.xtify.sdk.c2dm.C2DMIntentService" />
        <service android:name="com.xtify.sdk.alarm.MetricsIntentService" />
        <service android:name="com.xtify.sdk.alarm.TagIntentService" />
        <service android:name="com.xtify.sdk.alarm.RegistrationIntentService" />
        <service android:name="com.xtify.sdk.alarm.LocationIntentService" />

    </application>
</manifest>

And my MainActitivy.xml:

package com.projects.xtifyproject;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

import com.projects.xtifyproject.R;
import com.xtify.sdk.api.XtifySDK;

public class MainActivity extends Activity {
    final String XTIFY_APP_KEY = "aaaa0505-aa00-000a-0a0a-000000a0a000";
    final String SENDER_ID = "123412341234"; // This is the Google Project ID

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        XtifySDK.start(getApplicationContext(), XTIFY_APP_KEY, SENDER_ID);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}

and finally, my AVD:

enter image description here

Greetings!

Raúl Omaña
  • 883
  • 6
  • 10
  • Do you have the xtify jar in your java build path? right click on your project folder > Properties > Java Build Path > Libraries – Michael Bordash Nov 14 '12 at 05:50
  • Yes, I added the jar file to my java build path, so, that's no the problem – Raúl Omaña Nov 14 '12 at 21:22
  • I can't see the problem in your files. I opened up the sample project included in the SDK in eclipse, entered my GCM project/sender ID and xtify AppKey, built, ran and sent a push. Perhaps look at the sample project for guidance, it works out of the box. – Michael Bordash Nov 16 '12 at 14:11
  • Can you upload it? your Eclipse project, in order to see the differences between your project and my project – Raúl Omaña Nov 17 '12 at 15:33

1 Answers1

0

Xtify SDK uses Google GCM service. I recommend using an actual device for testing. if its not available you could create emulator with Google API level 8 or higher, when you run the emulator make sure to go to the setting screen and add a valid google account (needed for GCM service in order to work on the device).

You could also take a look at Xtify Notifier which have onError method that will get called when an error happens in the SDK.

Feras Alnatsheh
  • 547
  • 3
  • 9