Hello Team Backendless,
I am facing problem while sending a push notification. Here attached is my code snippet in which I have written the code push notification. Kindly guide me so that I can come out of this project. Thanks in advance.
This code is written in button’s click listener so I have not copied that code here.
if(getValuesInStrings())
{
String userKey = Session_.emaill();
userKey = userKey.replace(’.’,’,’);
String uniqueKey = myRefUsers.child(userKey).child(“sentQuotes”).push().getKey();
Map<String, String> timeStamp = ServerValue.TIMESTAMP;
String tStamp = timeStamp.toString();
// String tStamp = “hammad”;
Is the problem with the error you have in the subject line?
Which line reports the error?
What version of the SDK do you use?
What version of the backend do you use?
Answers:
1: Yes the error is what written in subject line.
2: This line reports the error “Backendless.Messaging.publish((Object) “kch bhe”, publishOptions, deliveryOptions,new AsyncCallback<MessageStatus>”
3: complied SKD is 25 and Build tool version is “25.0.2”
4: compile ‘com.backendless:android:3.0.25’
Problem still exists I have tried by changing the version.
Actually backendless is sending push notifications perfectly in my project but when I try to send notification in my this class (code attached above) then backendless throughs exception.
Sorry, we do not review developer’s code. I copied your code into my project and it works. Try creating a separate project with the same code for the sanity check. It must be a problem with your project environment.
I have tried each and everything…
But, problem still exists…
Can you guide me in which scenarios we get this exception “java.util.HashMap cannot be cast to com.backendless.services.messaging”
In “QuoteRequest.java” I am using Map for dates. and I am using google places API for google maps. Do you think any of these two things conflict with backendless services?
You have two projects, a working one and non-working one. I think by following the method of elimination, you should be able to arrive at the differences between them,