Android Wear: getDataItems returns 0 items - android

Here is a big problem that i simply don't know whats going on...
I have an app that stores Data in data API. The mobile app is aroudn the play store for some time and I decided to make a app for wearable.
My problem is: when the user install the wearable app for the first time (via Google Play), it need to load the data from the DataApi. But it simple returns 0 itens!
DataItemBuffer dataItems = Wearable.DataApi.getDataItems(mGoogleApiClient).await();
Observations:
GoogleApiClient IS CONNECTED
The Wearable receives the onDataChanged from WearableListenerService and this part is working fine.
I've already tested with .setResultCallback but results still the same.
I have two copmuter for developments, one is one my work and another is on my home.
In my tests, I DELETE the emulator and create a new one, to simulate a "new device beeing connected for the first time".
DataAPI says that the data is synchronzed to all devices but is seems not be working like that. How to solves this? Any workaround? SOMEONE HELP =(

It seems i found the solution for this problem. As I mentioned i have two computers for development, so, 2 development keys.
My mobile app was installed using the "A" computer's key and the wearable was using the "B" one. So, to solve this problem, when start developing always remember to re-run the mobile and wearable app from the same computer to your devices.

Related

Smsgateway.me API - REST Mod disabled on V4

I've updated everything for their new API v4 and also the new Android application (the old one was removed from the Play Store).
Now I'm having a problem with the messages in application running android 5.0, I've to press "Check Server Now" everytime to check for new messages (which are sent to API correctly but gets the status Pending until I press in the app manually).
Someone tolds us to install the previous version of the .apk to solve this issue but I don't know how to get it.
Yes that is correct since May 12 I did need to update my php version it took a while but when I finally get it my phone did not need to download the app again now I see that play on my favor, I did use the app with no problems, I also saw that the sending process was not even aligned with the every minute I configure on my old samsung.
Today sadly 9/2/2018 my cell stop to work better said the app claimed for internet to be able to connect, of course I had WiFi and 4G but looks like something happened a 6 am pacific time.
I was expecting it was a problem with server so I wait patiently until 2 PM, and I asked my son to see the app on his phone Samsung J7 and the app was asking for user and password
I knew that the J7 was not able to configure the asking time to server looking for pending sms's but I thought will be enough for today sending messages every 5 minutes thinking was the default time. But did not work unless we click the manual form in the app or at least having the app on the screen swivel and will update sending sms's as mentioned leaving the status on pending and some times sent.
I did something stupid delete my old version of the app from my old samsung and guess what, I could not download the new version for incompatibility with my phone, I still not sure if my old version will start to work later on the day or tomorrow, but certainly I lost the opportunity to know.
I used https://apkpure.com/es/sms-gateway-api/networked.solutions.sms.gateway.api go get the older version an installed again on my SGH-M919V Samsung Android 4.4.2 not compatible anymore so the option of configure the refresh is not there any more, J7 was not able to do that,
Sep 3 2018 team upload new version since the notification process to send the sms did not work, the new version suppose to ask server every 2 min not working on my J7 Samsung. so at this point I have to send the messages clicking manually to search on the server for sms pending to send.

Google CloudPrint printing infinite copies (Android)

I have been using Google CloudPrint since December, and suddenly (sometimes, mostly when the networks is slow) when printing, it keeps printing.
I am using this configuration: Android Phone, my App creates a print job with ticket via Google CloudPrint, the android notification center displays the print job "Printing" (as in sending...), the Google CloudPrint receives the task, and prints it with the printer associated, then, normally, it removes the print job from the notification center. and thats all.
Now, it stays in the notification center... for ever, even if you cancel, it already sent a lot of print jobs (they are slow to appear on the GoogleCloud panel).
Is there a bug with Google CloudPrint or is a problem with my (probably outdated now) code?
I know is Beta, and that, but i neither find documentation, known bugs, or anything at all.
If you can guide me in solving this problem...
(This is the code i use to send the intent)
PrintHelper photoPrinter = new PrintHelper(Context);
photoPrinter.setScaleMode(PrintHelper.SCALE_MODE_FIT);
photoPrinter.printBitmap("print job", bitmap);
I had the same issue on a Samsung Galaxy Tab 4. I uninstalled Cloud Print and then reinstalled. Fixed the issue.

Google Tag Manager for Android

I implement Google Tag Manager on my project .When i work on emulator all events come faster in Google anlyatics account shown which page open,but problem is that when i use in real device its taking more time to show the events,its taking around 2-5 mins.
I am using like that can any tell me why its not working in real device.
& also can any one help me out how to implement E commerce tracking in android app.
DataLayer dataLayer = TagManager.getInstance(context).getDataLayer();
dataLayer.push(DataLayer.mapOf("event", "openScreen",
"screenName", "Home Screen"));
GoogleAnalytics.getInstance(context).setLocalDispatchPeriod(5);
I'm not entirely sure, since I don't develop your Android, but for iOS using Google Tag Manager (and Google Analytics for that matter) the mobile platform is not pushing events in realtime, but they batch the data and send them every other minute or so. For me the emulator in iOS does the same, i.e. it sends data every other minute and the same on device. Maybe the emulator in Android is different in this regard, but I believe that mobiles do not send data in realtime at all, but batches a chunk of data and send it at the same time.
I don't think there is any way to go around this. Correct me if I'm wrong though, but that's what I read somewhere in the documentation. Can't seem to find the reference though.

Unregister android client from aerogear unified push server

I´m facing a problem on handling the register-unregister my activities/services or whatever I use from an aerogear installation.
If I register from a service onCreate() and unregister in onDestroy(), when I uninstall the application, the device keeps registered on server side... If I install the application again, it registers the device again and you can repeat this until you get tired. And, of course, sending a push to the alias given by the user, the messages will arrive once per registration.
Also, each time the application registers to aerogear, the deviceToken is different, meaning that it´s got more to do with a generated hash for each installation than for a unique identifier for the pair (app, device).
So, now the question, how to handle the whole cycle? and I mean, the daily run and the issue about if the user decides to uninstall the app, it gets killed and could not unregister and one month later decides he liked it so much that ends up reinstalling the thing again.
thx.
update
The problem grows as I go testing my application. If I log with two different users in the same device, then I get both user messages and I've got to twist a little bit more the client implementation.
update with aerogear database data
here´s the installation log for two devices with three reinstalls:
id alias deviceToken deviceType enabled operatingSystem osVersion platform variantID
0dd99505-bba9-45e9-bfbf-38621bd41c3d 568b347a5df69915000pig#gmail.com APA91bG9XSPpwbFenw0UETFLRxr2XoFw-HlH5yZpPgoCIVZLnv0QSqCx5iKqqhJ-tWF5CRISbydv6ItWZKxklD8OPtfxvuq1ekQEI3XkbFajsmGIJ3yjUIC0MGw3v2ITVd6byVtZLsI9uTfiDXyeNrXTxprzVxr9ng ANDROID 1 android 4.4.4 android 4ae83272-5db7-41f6-879d-c907a39bd3fc
0ee3619f-0eb4-4139-b1fa-fe3403eb380c 1c24c6e05b58738f000edu#gmail.com APA91bFrNknt7d57dFR5DagE4Nf1bCVyB93Jl1xU5_qELwYn5JmjYUpXrLE10yC6beZdUgae0ZgtKXgLI4LI-E_ROAFEI4xi-ZPhuE8UZB6K05L_mIWSk7kt32D7S9G2clw3WG51zvcQmaeg8xsG_VW-rnwfKZQVcg ANDROID 1 android 4.4.4 android 4ae83272-5db7-41f6-879d-c907a39bd3fc
107d4dac-fbcf-4f82-9135-702b83d06f7f 568b347a5df69915000pig#gmail.com APA91bEaN4AMJPZgML931rO4AdrMudfTmGVmYPqqARVLX1RxIfyYB46fGxlSK0w7g3qnU2d_cVOBi907TFIMoxBaOe3bvKI8DqsacrXMmT-DjhFoFRS2z4QCec9u0aRPm-EB9UwhfMrE3RrctdxDdNCQ0douuppYVQ ANDROID 1 android 4.4.4 android 4ae83272-5db7-41f6-879d-c907a39bd3fc
161474b6-067d-4b54-a750-e21a9896814e 1c24c6e05b58738f000edu#gmail.com APA91bGFE6cxLcxPDoRmv-HEIpA2jQndccrCryuR3q5BN4PG3EyHxISFoMCIwaPPXX8BIinrJOvNCbwpIrVOKw_mSv5TcLZnSgonR1grpiRkJ0mmwbFCme2CrwoMpkLkVUP7ZjwnYsr0HR3MKzmJLakrnlN-eMKr-g ANDROID 1 android 4.4.4 android 4ae83272-5db7-41f6-879d-c907a39bd3fc
a5cddabe-1c00-4369-b4cc-f6c5da8f8740 568b347a5df69915000pig#gmail.com APA91bGmFT7NCpfb1q4WHFK2wmQCQdMtW9ulQLiZYwrt9oyU4mqv9gCBN959pCw_wKy2zHw-JBU0p5SCzdpKN5l8i7uqPWk24ORHKE1Vf6rRUINkIRJheKVT6V6Wk38WQ7Rw1AgrqYXZN7WUImVSgd5cqq_p8lLISg ANDROID 1 android 4.4.4 android 4ae83272-5db7-41f6-879d-c907a39bd3fc
f7514716-68d9-4d00-837a-f1f9da503151 1c24c6e05b58738f000edu#gmail.com APA91bHTFJE7-nz_KB4aa2RUcEnFTVB0IzQZ-ZffPTujLWgi60xTMUeAet6YoUZJnXKnhBOSdAPgoaLDW18PWnwKXtc2MXxKjMYQQENNDdOxKQIV4fnMrAFWfwD_VT6x5XOJUWdQovGUwXiMX9SshCDvZJ4QnM1x_w ANDROID 1 android 4.4.4 android 4ae83272-5db7-41f6-879d-c907a39bd3fc
I think the first problem was a UnifiedPush server bug, but it's already fixed.
About your update when you register a device on UPS the UPS don't know about your users, so you will need to send some information with your message and control it on your client.

Android Sqlite Data lost when Application Hangs/Freeze and restarted

Recently my users are complaining that application hangs while using it and the data stored getting lost when the reboot the mobile.
Its not happening everytime too.
Can some one please tell me for what are all the reasons sqlite data will get lost.?
Also for what are the reasons android application freeze?
Background : My application perform sqlite operation from all the screens. The device
Model Number: Samsung GT-18160 , Android Version:2.3.6 , Kernel
Version:2.6.35.7-1219296 dpi#DELL210#2
You can assume no data should be lost. But you may want to nail down crash culprit first - luckily your user is on 2.x so tell him to use tools like aLogCat and grab the logs after your app crash. Then check what's there and fix. That should solve your "data lost" issue as whatever it is, it occurs after your app crashed. If it stop crashing then it should not trigger the snowball....

Categories

Resources