I have several identical apps that just differ on the data they show and package name. I've decided to give Android wear a try and my main goal was to develop a single Android Wear app to show data for every one of my phone apps (maybe with a 2d slider, one row per each app).
Imagine I have 2 apps:
Free "com.company.appfree"
Pro "com.company.apppro"
And the wear app
It turns out I was unable to get the DataItems or Messages sent by my phone apps on the Wear app, unless its package was identical to one of the phone apps packages ("com.company.appfree" or "com.company.apppro")
I'd like for someone to tell me if there's a way I could achieve this communication without the need for the apps to have the same package. I really need a single wear app, not multiple ones.
Thank you for your help!
As far as I know there is no way to send data to an app with a different package. Moreover your app will be installed to a wearable device only if the containing app has the same package, so in your case only one app will be able to contain the common wearable part.
I think the only way to make two apps to communicate with a single watch app is to implement the watch app and the corresponding handheld part as a separate app (this app and the watch app will share the package name and will be able to communicate to each other). Your other apps on phone can communicate with this one to send data to a watch. This communication can be implemented via broadcasts or service bindings. So you will have the following structure:
com.company.wearservice
and the corresponding watch app with the same package.com.company.app1
and com.company.app2
send data to com.company.wearservice
, which sends they to the wearable part.