[Samsung Galaxy Gear] pacosal:
Thank you all for your comments.

As I said before, m2d manager is the core for communicating between devices, and other developers can use it for adding new functionalities.

In case of notifications there are 2 modules.

- First one is an old App Called Voice for Notifications that send intents to m2d manager and this one send them again to the other App

- M2d Notifications Receiver: This one can be changed for another one and, for instance, create a new one with big icons like gear does.

Here you can see the main code for the last one:

Manifest:

<receiver android:name="com.pacosal.m2d.notificationsreceiver.ExternReceiver" >

<intent-filter>

<action android:name="com.pacosal.m2d.NOTIFICATION" />

</intent-filter>

</receiver>

ExternReceiver

package com.pacosal.m2d.notificationsreceiver;

import java.io.IOException;

import android.app.Service;

import android.content.BroadcastReceiver;

import android.content.Context;

import android.content.Intent;

import android.media.AudioManager;

import android.media.MediaPlayer;

import android.media.MediaPlayer.OnCompletionListener;

import android.media.RingtoneManager;

import android.net.Uri;

import android.os.Vibrator;

public class ExternReceiver extends BroadcastReceiver {

public void onReceive(Context context, Intent intent) {

Util.logDebug("Extern receiver m2d.notificationsReceiver");

try {

String data = intent.getStringExtra("data");

if (data.equals("")) {

Util.logDebug("data vacia");

return;

}

Util.logDebug("data: " + data);

String s = data;

String quien = s.substring(0, s.indexOf("-")); // What App sends the notification

s = s.substring(s.indexOf("-")+1);

String mensaje = s; // notification

Vibrator v = (Vibrator) context.getSystemService(Service.VIBRATOR_SERVICE);

v.cancel();

long[] pattern = {0, 500, 200, 500, 200};

v.vibrate(pattern, -1);

sonido(context);

Dialogo d = new Dialogo(mensaje, quien);

Util.dialogos.add(d);

Intent i = new Intent(context, MainActivity.class);

i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);

i.putExtra("Notification", true);

i.putExtra("quien", quien);

i.putExtra("mensaje", mensaje);

context.startActivity(i);

} catch (Exception e) {

Util.logDebug("Exception extern: " + e.getMessage());

}

}

private void sonido(Context context) {

Uri defaultRingtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);

MediaPlayer mediaPlayer = new MediaPlayer();

try {

mediaPlayer.setDataSource(context, defaultRingtoneUri);

mediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);

mediaPlayer.prepare();

mediaPlayer.setOnCompletionListener(new OnCompletionListener() {

[MENTION=439709]override[/MENTION]

public void onCompletion(MediaPlayer mp)

{

mp.release();

}

});

mediaPlayer.start();

} catch (IllegalArgumentException e) {

e.printStackTrace();

} catch (SecurityException e) {

e.printStackTrace();

} catch (IllegalStateException e) {

e.printStackTrace();

} catch (IOException e) {

e.printStackTrace();

}

}

}

That's the main part.

You have the Extern Receiver declared in your manifest.

You have the Extern Receiver code that receives the notification in a String with App-Message format and add it to an arraylist to show it later in a List.

With this code and yours you can develop a new Receiver exclusive for your Gear.

If you have any problems, email me.

Thanks