Unable to Understand Message GCM - java

I'm dealing with Eclipse Luna to build the web app (jsp,java) while dealing with Eclipse Juno to build the android app. Plus, i'm referring to this link as my tutorial http://javapapers.com/android/google-cloud-messaging-gcm-for-android-and-push-notifications/
Registration id generated successfully in android device.
This what appears when the message is push respectively in the GCM
[ messageId=0:1407227521756362%31e4cc17f9fd7ecd ]
What does it mean? How to fix it since i should have a message received at the Emulator and im not getting it.....?
Thank you.

As it seems that my comment helped solve the problem, I'm posting it as an answer :
If your device is connected to the internet with WiFi, you have to make sure ports 5228,5229,5230 are not blocked (usually 5228 is enough).

Related

Recent Android Studio cannot connect to firebase?

I tried creating multiple new projects and made sure that all codes in several files are correct. I'm quite new to this and have never encountered this problem previously. After using the assistant to connect to firebase, it opens up the browser, asks me to login and ask for permission. After clicking the accept, a new window opens up with "localhost:55842/" and what happens to Android Studio, it will be giving a response "Firebase: Received a request from an invalid host firebase". Is there any way I can fix this? I have tried using previous version of IDEs but the only difference is that the connection succeeds but it can't receive or save data into the firebase.
Please make sure you turn off any antivirus and firewall temporary to enable firebase assistant connect flow running.
Android Studio choose random listening port each time we try to connecto to firebase web console, so we can't simply just allow one port in firewall/antivirus for android studio, completely disable is the only option
In my case, Avira antivirus is the cause, disable real time scan and then firebase connect flow running as expected (tried on Android Studio 3.6.1)
Hi I am not sure if you have solved this problem. I was facing the same issue. So it's the problem with the JSON file since android studio stores everything in the build it might have few older files conflicting with new file so I went ahead and deleted the old build file and restarted my android studio with the project and everything was working fine after.

Debugging app from the device without USB and WIFI

Since my app runs on the emulator and crashes on my device. I would like to see log report of my app directly from the device. So that it might lead to better way of debugging. But I have following problems
My device is connected to the PC via LAN.
My device doesn't have USB connection (no slave port).
I am using android studio as IDE. I have seen couple of examples which could be used if the device is connected to same wifi network like Debugging over wifi network but this doesn't help.
There is an official documentation with wifi official documentation for wifi still it needs USB connection in step 3.
Does Android Studio provide any type of solution?
if your app is firebase configured maybe you can use DebugView from firebase site.
To get the crash reports from any android device you can use crashlytics..
This is very nice library which provides you very details logs of crash along with many other details like android device name, ram size, memory, orientation etc..
Good thing is that this crashlytics was different library previously, which is now part of Firebase .
To get started you can know about crashlytics from here you can follow the documentation from here
Actually, firebase helps you get the crashlytics. The error message will be stated in the dashboard once the app crashes. This is a life saver but I found out that, we can simply connect the device to IDE without USB. Just the PC and your device should be connected via LAN
Using ADB tool. Run the adb.exe file as admin. Connect using tcp. Just address and Port is necessary.
You can simply debug from the IDE, In my case android studio.

Mobile app emulation able to connect to online application service but not working on actual device

I'm currently trying to solve an issue with a mobile application that is throwing a "Error communicating with application service' alert upon being launched.
The error occurs on both ios and android versions of the app across
multiple device's, wifi, 4G etc.
An emulation of the application using Android Studios DOES work. The
app successfully communicates with the sites API. I can see all of
this information on the logcat within Android Studio.
The mobile application has not been updated recently, the local version i'm
running the emulation with is identical to the live version. The app
hasn't been updated prior to the error occurring.
The domain/URL that the application is connecting to has recently had
a Certificate Signup Request generated for the SSL certificate that expires
in a few months. I'm not sure if this is relevant however I have read
that a emulated device handles https differently to an actual device.
To further diagnose the issue on an actual device I'm looking into "tcpdump" as it can potentially show everything that is happening on the device. I've tried using LogcatExtreme but it doesn't show a more verbose detailing of the error that is occurring.
Here is a link to the application that you can download right now. If anyone believes this is a security risk, please let me know and I will take it down. https://play.google.com/store/apps/details?id=au.com.silkhospitality.Silk
Even though I haven't exhausted all avenues of diagnosis I wanted to ask the community before I potentially end up in a culdesac.
Both the Android and iOS version of the application in question were redeployed to their respective app stores in order to solve this. The real reason for them failing to connect to the application was never discovered. These applications were both 5+ years old and needed some minor environmental changes to be made but none of the core programming was changed/altered in order to successfully redeploy.

Internal error while connecting to google play services

I`m trying to connect to Google Play Services as is stated in developer documentation, but it does not connect and I got connect Result code 8 that means that An internal error occurred. Retrying should resolve the problem.
Why this problem happened and what is an internal error? How to resolve that?
Ok, I recolved my problem easily.
it was a VPN problem that confused android studio. I turned it off and problem solved.

Can't receive notification from server to android device using gcm

I have posted this question.
I thought that downloading the newest version of gcm will work, but I was wrong. I have downloaded latest version of gcm but still I can't receive notification. I have a GOOGLE API KEY and a sender ID.
Everything is fine when I register the ID - it works fine and it shows in database, but when I try to send a message from the server to my android device, I am not getting the message from the server.
Can any one help me? I have tried some examples as well, but they aren't working. Does anyone have working example, or is my API key is not valid?
Please check your server code whether it access the registration ID of registered android device.
The following link has exact explanation of GCM with simple client side code and server side code.
http://avilyne.com/?p=267

Categories

Resources