Can't receive a push notification from pushwoosh.com - android

1. I download: Sample Project from this link
2. Import in my eclipce this project
pushwoosh-sdk-samples-master.zip\pushwoosh-sdk-samples-master\Native\Android\
3.
On website is info that
PW_APPID – Pushwoosh Application ID
(MY: Application Code: 8CD4F-FXXXX)
PW_PROJECT_ID – Project Number you receive from Google GCM
(MY: Project ID: eternal-psyche-777 Project Number: 520518000000)
So i replace this info in manifest to mine
meta-data
android:name="PW_APPID"
android:value="8CD4F-FXXXX"
meta-data
android:name="PW_PROJECT_ID"
android:value="520518000000"
4. Also I add Google Cloud Messaging API Key to Application on pushwoosh.com
But after sending a push notification, nothing happens...What is wrong?
UPDATED:
Found
where PW_APPID – Pushwoosh Application ID, PW_PROJECT_ID – Project Number you receive from Google GCM, Project ID is a number but make sure you prefix it with the letter “A”
but I still can't receive a push-notification...

Related

Titanium: Android device token without Cloudpush

Is there anyway to get device tokens without using Cloudpush modules. All I'm interested in is getting tokens and store onto my server and then I can push notification to registered devices.
I have tried to use it Cloudpush module from this link
http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.CloudPush
I followed these steps:
1) First Step :
Open this link https://developers.google.com/console/
than login with you account. Create a new project
i) "Creating a Google API Project",
ii)"Enabling the GCM Service"
iii)"Obtaining an API Key"
Image snap link : http://1.bp.blogspot.com/-AKAcUDtW0gg/UlK8rcpqUQI/AAAAAAAACuI/aq89OFZc2C4/s1600/all_steps.png
2) Second Step :
Click on this link https://cloud.google.com/console#/project
You can found you project that you already created.
Just Click on that and you found the Example: Project Number: 91060sdsdgsd
3) Third Step :
Now next step open this url https://my.appcelerator.com/apps
Login with your appcelerator account where you want to configure this vcm.
Click on your project than at the top side there are two option (Production/Development).
Click on Development. Now the main menu box will open in that there is 2nd (Second) tab click on that.
Now you found in that page Android Push Configuration
please fill this both fields
i) Google Cloud Messaging(GCM) API Key:
ii)Google Cloud Messaging (GCM) sender ID:
However all I'm getting is Failed receiving GCM SenderId.
As you already know the process to get keys/etc, so I wont rewrite it.
You asked to fetch the device token without Cloudpush , yes it can be done and you have to use a GCM module for this process.
Following info will be helpful in using module :
You can view the module's info at GCM Titanium.
The zip file of module is at in dist folder ( use latest version of zip ).
Example to use module is under example folder.
Hope it helps.

How to send an Android Push Message using Intels App-Framework?

I'm looking for a solution to send a Push Message from PHP in Intels App-Framework, but I can't find any good solution. I have found this:
https://gist.github.com/prime31/5675017
But how can I get the DEVICE_REGISTRATION_ID? It's very difficult to find some code or solution.
Ive found the Solution. I have forgott to type the IP 0.0.0.0/0 into the Google API Console. And i added the Google API Key and Projectnumber by the Push Category on Build Window.
Then i copy paste the code from http://docs.appmobi.com/index.php/push-messages/ into index_user_scripts.js (only number 2 and 3). Number 1 goes to index.html on the header section. Now it works fine, i can send messages from the Services Tab.

Rich push in Urbanairship in android

I am implementing Push Notification for Android in my project. I am implementing urbanairship GCM push Notification.While i gone through the urbanairship site, i camr to notice that under the messages tab, there is an option for "TEST RICH PUSH". I have already done tested simple push by sending push messages from "TEST PUSH" under the tab messsages. Now my question is in "TEST RICH PUSH", there are two new fields "USER" and "ALIAS". Is Rich push is used for sending push notification only to a particualar user currently using an App. or it has got any other purpose. Also please let me know how to enable "RICH PUSH" in their new website.(Earlier it is staright forward. Now i looked in their whole website, But i couldn't find a clue). Any help in this is highly appreciated.`
Thanks InAdvance
Rich Push is automatically apart of the Urban Airship library (at least since 3.0.0 version, probably before then as well but I'm not sure which version number). There are just a few things in code you have to do to get it up and started.
In your airshipconfig.properties file add the line "richPushEnabled = true" (without quotes).
In your manifest file add a service with the name "com.urbanairship.richpush.RichPushUpdateService" along with the PushService/PushWorkerService, etc.
And you should be good to go! If not let me know I may have forgotten something.
To send a push you have to use the curl command found here (Under Rich Push -> Rich Push broadcast): https://support.urbanairship.com/customer/portal/articles/1069013-helpful-curl-examples under audience instead of doing "all", spit out this value to the logs somewhere once UA is initialized: RichPushManager.shared().getRichPushUser().getId() (import com.urbanairship.richpush.*;) and make sure the MasterSecret parameter is NOT your api secret but the master secret found in your API keys on your UA developer dashboard.
I wrote everything out because Urban Airship's documentation DNE for android Rich Pushes, it's absolutely horrible. They have a sample project but that's it.

Getting INVALID_SENDER on one device while its working with another GCM android

I am following Android Push Notifications using Google Cloud Messaging (GCM) to implement GCM with my application it was working fine on single device (Galaxy S) when i tried to test it with another device( Galaxy Tab 7') its generating error.
handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null
here is the Log which i am getting
V/GCMRegistrar(5649): Registering app my_maypackage of senders APA91bHvzZbO_nyYvaA_QRGDaV-wRAYKjt0qJSQmzPUi2unqG7j0OGuyhVY1A3zh-ZfnA0XT0ffgyKypVJ_5owLZvZBNGARpTBkBg9ED8gVVCDejaIpShghq_tXGhMnFQEufwdCL1ibm
V/GCMRegistrar(5649): Setting registeredOnServer status as true until 2013-04-02 11:02:07.847
V/GCMBroadcastReceiver(5649): onReceive: com.google.android.c2dm.intent.REGISTRATION
V/GCMBroadcastReceiver(5649): GCM IntentService class: my_maypackage.GCMIntentService
V/GCMBaseIntentService(5649): Acquiring wakelock
V/GCMBaseIntentService(5649): Intent service name: GCMIntentService-980172650021-7
D/GCMBaseIntentService(5649): handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null
D/GCMBaseIntentService(5649): Registration error: INVALID_SENDER
I/GCMIntentService(5649): Received error: INVALID_SENDER
V/GCMBaseIntentService(5649): Releasing wakelock
Note: both devices are configured with same gmail account.
Log is showing incorrect sender ID. it should be taken from Google api project url. e.g
https://code.google.com/apis/console/b/0/#project:65464654646546
then 65464654646546 is sender ID.
For me what did it was enabling the "Google Cloud Messaging for Android" from the Console's API section:
[Adding to #spanjeta's answer:]
The problem is that it’s not trivial to get the project number, due to Google ever going modifications of the developer console. While Google was kind enough to give developers the possibility to declare a friendly/textual id for their projects, they didn't update the GCM documentation in that this cannot replace project ID in a GCM client.
When you do that (give the project a textual name/ID ) - you cannot use it, because you will get an INVALID_SENDER error.
You must get the pure numerical project ID somehow.
So how do you get the project number? You need to get somehow to the old developer console.
The following way works (for now):
Yo go to The developer console → Your Project → APIS → Google Cloud Messaging for Android → Quota
Then a new, old google devloper console tab will be opened with the following URL:
https://code.google.com/apis/console/b/0/?noredirect#project:YOUR_PROJECT_NUMBER:quotas
Then, use YOUR_PROJECT_NUMBER as the GCM SENDER_ID in your app.
I just wanted to share with you that I ran into this same problem just now.
GCM push worked perfectly fine before, nothing's got changed, and all of the sudden our users flushed back with complaints about not getting push notifications.
So I did check out all the StackOverflow thread re. this issue and still couldn't figure things out (had the app id / keys all correctly input, code's perfectly fine, even tried out on the Google demo and blah blah blah)
So in an act of desperate I went to the dev console and disabled GCM, then re-enabled it... everything just worked!
There is a project ID and the Project Number shown on the top of the Project Dashboard.
Project ID: aaaa-bbb-000000 Project Number: 00000111112
You have to use the numeric Project Number as SENDER_ID.
maybe you need change the GOOGLE_PROJ_ID
First
Second
Good Luck!!

Android GCM SENDER_ID, how to get it?

I try to migrate to GCM and I have an issue with the SENDER_ID I need to provide. I use the demo project from google. In this project I need, if I understand this well, to provide a SENDER_ID to the application in the CommonUtilities.java file.
The SENDER_ID I provided is the API key I registered on https://code.google.com/apis/console/ and has this form: AIzaSyAxxxxxxx_xxxxxxxxxxxnoGZw (total 40 chars).
Using this string as SENDER_ID I get on "BroadcastReceiver mHandleMessageReceiver" an error message: From GCM: error (INVALID_SENDER)..
Where is the mistake? The string I provide is not the SENDER_ID?
Thank you.
No, the SENDER_ID is the project ID you signed up at Google API console, it should a numeric string. e.g. on your browser URI, you should see this:
https://code.google.com/apis/console/#project:4815162342
The Sender ID is 4815162342
Updated Answer:
Google has not updated its docs completely. The above answer is old and its based on this documentation and it seems that its still not updated.
According to updated Google docs, it seems that Project Number on Google API Console is used as SENDER ID
I have done for Latest Google API Console.
How to get SenderId:
Steps:
Open Google api console
Create project
Click on Left hand side menu icon
Click on Google cloud Platform
You would get SenderId form there
Reference:
Hope this will help you.
Go to your Google APIs Console page. Select the project you use from the drop down menu on the left. Select Overview and now you can see you project number. It is the SENDER_ID you have to use
Another way to get your project number is to get the value of "project" from your url. Your url has to be like this: "https://code.google.com/apis/console/b/0/#project:886025556782". Here the project number is "886025556782". this number is SENDER_ID
An updated answer as of Nov 2014 IF YOU'VE CREATED AN API PROJECT RECENTLY.
First of all, correct, you should absolutely go to the Google Developers Console and find the Project that you have GCM enabled on. When looking at the Overview section (left-hand nav panel), you'll see Project ID and Project Number listed on the right hand side. Project ID was failing for me (which is what led me here), but when I tried the Project Number, I'm able to register my clients correctly now.
Note that this is different because Google modified how they assign project IDs recently. In October I made a project and was given an all numerical Project ID, which I assume would work fine. But the one I created today was given a two-word and a number id (like Hamster-Party-420) and a numeric Project Number. The URL to my project contains Hamster-Party-420, and the Project Number is only visible on the Overview screen.
Yet another updated answer with little more explanation for the confused(..like I was).(with due credit to #azgolfer, #PankajAndroid and #Adam)
1- If you create a project at https://console.developers.google.com, you can see two things "PROJECT ID" and "PROJECT NUMBER" in project overview. Project Id is no longer numeric but alpha numeric like master-xxxxx-1234. Project number is a 11 digit number like 123456789100.
2- Even when you inspect the browser link you can find it as:
https://console.developers.google.com/project/master-xxxxx-1234
So is master-xxxxx-1234 is the SENDER_ID (at some places referred as PROJECT ID)? NO.
You have to use the project number as project id in GCM.
3- Where can you cross check that project id is being used as project id?
On API Dashbaord. (url: https://code.google.com/apis/console/b/0/?noredirect#project:12345678900 - where 12345678900 is your project number on project dashboard.
SUMMARY: Project Id in Project Dashboard and API Dashboard are different. The project number in project dashbaord is used as project id in API Dashboard and Project Id in project dashbaord as Project name in API Dashboard. So the project number shown in the Project Dashboard when we create project in developer console is used as SENDER_ID in GCM.
Go to "Dashboard" in the latest version of the developers console, click the drop down arrow under "Project: Turtle Power" and you can see the Project number right there! Use that as your SENDER_ID
(fake project so don't even try it =P)
Maybe you haven't activated Google Cloud Messaging for Android in API COnsole.
Here is the instructions:
http://developer.android.com/google/gcm/gs.html
We spent hours trying to figure this out. The problem was that our android manifest did not include the sender id!
If you came here because you are doing web push, Android push, or the like, there is a different answer.
Source: https://firebase.google.com/docs/cloud-messaging/js/client
the SENDER_ID you are using is nothing but the authorization key.
you can find the SENDER_ID at your projects Google APIs Console pages URL
https://code.google.com/apis/console/#project:8543162367
here 8543162367 will be your SENDER_ID ,
and also the Project Id is no longer numeric its alpha-numeric or only numeric or only alphabetic anything but its position is same as shown by me

Categories

Resources