I'm actually working on an android wear project and I need a communication between the handheld and the wear module. For this task, I use the DataLayerApi and the MessageApi.
The problem is that the 2 modules (handheld/wear) don't seem to communicate. I've checked the ApplicationId and the package names to see if they were equal, and I don't see a difference.
Does someone know if there's a way to debug it?
PS: I also have a warning from the WearSignatureVerifier saying "No package com.google.android.wearable.app.cn". I don't really understand why I would have a chinese package on my app, so if someone knows more about it, I would be glad to know more about it
DataLayerApi is working on accessing the wearable data layer.
And MessageApi is working on sending/receiving messages.
So of course, they can't work together directly.
You should call the data first, translate it into data item then handle it to MessageApi.
Please take a look at Transferring Assets.
Try to use old google services sdk which is used on your wearables. I mean, 7.8 or similar.
Related
I'm trying to develop own Android application using ANT+ sensors.
My app is based on (developer's Sampler code and SDK).
However I found the strange thing during tests. I mean when I start to searching devices I immediately receive a message:
W/AntPluginPcc: BBD30600: RequestAccess failed: OTHER_FAILURE
At first I suppose that a reason of this problem is that I have a phone with Marshmallow OS (instead my wife's phone is based on Lollipop OS and all works fine). I tried to find anything in documentation related this but didn't find anything interesting. I add to Manifest some permissions (I mean com.dsi.ant.permission.ANT, android.permission.BLUETOOTH etc.) and set the permissions in code, but it doesn't help to me to solve my issue.
May be anybody received this problem and may be somebody solve it. Could you please share your solution to me?
P.S. I install the ANT+ Plugin services, ANT Radio Service. in App I use the ANT+ SDK from github. May be I should use also the ANT SDK? (I want to connect to HRM and cycle devices which use ANT+ protocol)
If you have the same problem as I you need to realize the AntRadioServiceConnection class.
I found it here.
And you should be sure that you have all services and plugins installed on your phone.
I'm trying to use the CapabilityApi to find my standalone wear2 app from my phone, but it only seems to work if both the wear-app and the mobile-app share the same package id.
I follow the instructions at https://developer.android.com/wear/preview/features/standalone-apps.html for "Detecting your app on another device". I see no errors and I can se the Nodes as normal using the NodeApi I just wont get anything from the CapabilityApi unless both apps have the same package id. This feels like a throwback to wear1 with no standalone apps.
(the sample app at https://github.com/googlesamples/android-WearVerifyRemoteApp also stops working if you change the package id)
How would that would that work if I have more than one mobile-app that wants to talk to the same wear-app using CapabilityApi?
Does anyone know if this is the expected behaviour or am I doing something wrong?
Finally after a lot of hassle I released my first Android application after migrating from C# to Java :-)
But now I get duplicated notifications on devices where I've debugged my application before finishing coding.
All other users who installed my application after its release get the push notifications properly without any duplication or any kind of problem.
"After googling & searching I found out that this problem only exists on older Parse.com SDK, but it's weird since I'm using the latest one!"
I've been wondering about two things:
Will other users face the same problem after I release an update? ( Version code will be updated - And I'm not using any store, I maintain the updates on a private server & got my own code to do the update process ).
How can I solve this problem? I was thinking about creating a new application entry on my Parse.com account for every single new update ( If I'm sure that there isn't any solution ).
Any help would be appreciated.
After extensive testing & checking ..
I found a proper solution, may be good for some, but a lot will not like it.
It's a bug in Parse's SDK itself as I guess, when you delete the application from a device, it won't delete its record from the database. So, when the app is installed again, the same device will have two different records. So it gets 2 duplicates .. The number grows as much as you uninstall/install!
My solution is to increase the version code and change the version, so it'll be considered as a new application by Parse with new records!
I write an App and I'd like to get some informations about the Android devices my users are using.
I'd like to know
manufactor
the Android version
and some kind of unique ID
Is that possible without any special permissions? What is the API?
Take a look at the Build object. It will give you some details about the Android build.
Information about the Android version can be found in Build.VERSION
Hope that helps.
I'd like to know the manufactor, the Android version and some kind of
unique ID. Is that possible without any special permissions?
If you wrote 'permission' word in terms of manifest permission then you dont need any special permission for that , because its not something from user must be aware about application access of that data .
and if you would like to know about Build information then brianestey's answer is much clear to that .
recently, I've started the developing of a new app, and this app is in need of constant update. I know I can do it with alarms, but I think that a better way is to add my app to android automatic sync service (the one that is added gmail app and whatsapp for example).
I've looked for that topic, but couldn't find any answer about how to interact with that service. Can anybody provide me an example of how to accomplish it?
Thank you so much,
Vyrphan
Check out the SampleSyncAdapter code under the SDK samples. It will be in a directory akin to;
C:/Program
Files/Android/android-sdk/samples/android-10/SampleSyncAdapter/
Maybe this can help you http://developer.android.com/training/cloudsync/index.html