Wear app only work on debug - android

I'm developing a application to wearable devices, and I had all working perfectly while i'm in debug mode using Android Studio and Wear emulator and also a real Wear device.
I can comunicate Wear->Handheld and Handheld->Wear, send data, messages and all, i can package the two apk's in one and both apk's gets installed on each device.
The problem is that only works while debuging, if I stop debuging and open the app on Wear the app seems to start but it remains thinking and 1 minute later appears the clock screen and all went to normal.
I think that it has to be something about the comunication about wear->handheld, but i don't understand how can work on debugg and not on release.
Someone had those kind of problems or know the differences about debug and release regarding the comunication between devices?

Related

Debugging a third party app on an android smartphone

Since a few days an installed app on my smartphone is crashing. Now I am wondering if there is a way to debug an app on my smartphone not created by me. I just have the apk file, not the actual code so I guess I'm not able to run it from android studio on my device. (The debuggable flag is not set so it is false if that is important). I know I can install the apk on emulator devices but the app is running on them without problems so I need to now the problem with my smartphone in particular.
Or maybe it's possible to get at least a log file with more information to the crash from my smartphone? I already found some apps that claimed they could do but that didn't work. Does anybody have a device to my situation?

Xamarin mobile app deployment to phone not working outside of debug

I created a simple Xamarin ANDROID App. I set up my phone to development mode and deployed my app to the phone via USB.
The app continues to work on the phone as a regular app.
I then created a Xamarin MOBILE App which was more complex. I deployed it to my android phone via Visual Studio debug mode as with my previous app and it ran perfectly. But when I attempt to run the app directly from my phone, it won’t run. The first screen partially loads without anything on it and then disappears. My phone puts a message up saying that my app keeps stopping and would I like to close the app. I make use of a file placed in Assets. Might this be an issue when not debugging from the computer?
Might there be a difference between deploying a xamarin android app and a xamarin mobile app.
A minor thing is that it has added the name ‘.droid’ to the name of my app which I would like to get rid of.
I am new to deploying apps to a phone
I have solved it thanks to your helpful prompts.
I looked at the error logs and the error was ‘FATAL’ in a mono dll. This was indirectly helpful in that I knew it wasn’t the logic in my code.
I also made the discovery that running my app directly in the emulator also failed in the same manner as on my phone. I also ruled out that it might be an issue with transferring an asset -a file the my app uses- as I bypassed using the asset.
(Running my app via visual studio in both the emulator and my phone worked perfectly.)
I then decided to re-house my forms and classes in a new template as I suspected it was corruption in some xml configuration setting that didn’t bother Visual Studio. This worked great and the app now runs stand alone on the phone (and emulator).

Unable to run sample Android Wear app on physical device

I am trying to figure out the Android Wear APIs. I've imported the sample WatchFace app provided in the SDK. I've set up my phone AND Moto 360 physical watch for debugging. They both show up in adb devices, and I'm able to select both when running the application. I followed the instructions from here.
However, when I go to my phone (and check the android wear app) to find the watchfaces included in the sample app, they are nowhere to be found. If I check the watch, they are also nowhere to be found.
As a side issue, I had initially had Compatible = No, missing uses-feature watch, when trying to run on my 360. Notably, that permission was not in the manifest of the sample app, once I added it to the manifest, Compatible = Yes for the wearable module on my 360.
I am now going to try to make it work on the emulator to see if that's the issue.
Edit: Able to get it to work on emulator.
I have gotten it to work, but I'm not sure what was the issue for it not working. If you are seeing this problem, this is what I would do to make sure you're setup properly:
Ensure your watch is paired with your phone in Android Wear.
Ensure both watch and phone have debugging enabled.
You can follow the instructions here for how to setup bluetooth debugging. Make sure that your device shows up when you run adb devices.
If you have both a Wearable module and Mobile module, make sure that if they are not set up to be launched via a launcher, that your run configurations are set to "Do not launch activity."
Run your Mobile module on your device first.
Then run your Wearable module on your wearable (it should show up as a device if you did everything right).
Your app should show up on both the watch and the device now. You can push changes to one or the other from now on (depending on which one you modified, or both if necessary). If you run into issues, just run the mobile module first and then wearable module.
Note that even though compatibility may say "No, missing feature WATCH" for your mobile device (e.g. phone) when you run your Mobile module, it should still work!

Deploying Android Wearable Apps on Moto 360 for Debug Purposes

I'm trying to write a wearable app with custom layout notifications, however my emulator is not displaying custom wearable notifications properly. (I just get a card with a black box... it even happens on the sample app notifications).
I have a Moto 360 but since it doesn't have a USB port, I don't know how to deploy a debugable app on there using Android Studio.
Any thoughts? (Trying to not create and package and app / publish to the store to debug as that would be a huge waste of time if there is a way to directly package apps and ship them to the moto 360).
You can deploy your app on your smartphone connected via BT to your 360.
Follow this link
Android Wear BT debugging

Debugging android wear watch and handset at same time

Is it possible to debug both an android wear watch app and an android handset app at the same time?
I'm trying to debug sending data back and forth between a handheld device and an android wear watch app and it'd be nice to be able to attach the debugger to both apps at the same time.
I'm running on a physical nexus 4 device and using the android wear emulator on my computer.
That's possible of course. In Android Studio you can switch between the connected devices in the Debug Monitor. See the following screenshot:
Note: It may take a second or two until the messages will appear

Categories

Resources