I want to implement serial-number notification for google checkout as I do not have a domain name but a static ip. I have gone through Implementing the Notification XML API of google checkout and what I have understood is that there are two ways to get notifications:
1.) Have a SSL certificate on server and provide a URL in google checkout account and google will send either XML or HTML notifications on that URL.
2.) Google sends serial-number notification to our application and then that serial-number is used to get other notifications from google.
Now my question is that in case 2 above we do not need a SSL certificate to get serial-number notification. But when application uses serial-number to get other notifications using Notification History API then at that time also server do not need to have SSL certificate or will it be necessary to have a SSL certificateget to get other notifications.
Also can you please provide me some links or sample codes to implement serial number notification in java.
Correct on (1) and (2) - these are you 2 options.
You do not need SSL certificate for your handler if you implement Serial Number Notification.
Another difference between (1) and (2) is that Google will not send Basic Authentication headers to your handler in Serial Number Notification (they do for XML and name/value).
The latter part of your question, JAVA code sample isn't something I can help you with (am .Net). Perhaps this tutorial can help - it also mentions their Java SDK.
Related
I need a good design to read the location from a user1 iOS and send it to user2 iOS.
How I should send this to the backend, using rest APIs?
The location data pushed to server should be at 20sec interval or more?
Once the location info is with backend how it should push that to user2, badges or a poll from the app?
Please suggest.
Of course, first step is to send the information to the backend, in that case you only need a rest api exposed with a method that can receive the POST.
Second step is send the information to the second device. Here you can implement in two ways:
Push notification, you can use tools from the iOS libraries to send the information to the second device and the application will use this information.
Read more about this here: https://medium.com/ios-os-x-development/learn-master-%EF%B8%8F-ios-remote-push-notifications-in-2018-in-under-10-minutes-825ca6bee092
Second option, it is to implement a websocket, your second device will be connected with a web protocol to receive information from the server. This is a solution for real time systems, every thing you need to send will be received by the target in milliseconds.
I am currently developing Java web services that run on WebLogic on a server. There is a requirement that I need to send push notifications to mobile devices running on iOS. I do know what is required for developing GCM/FCM for sending notifications to Andriod devices. For iOS, I know there is APNS, but what Java library can I use to send the notifications?
Also, what are the required things (registration ID, etc) needed in order to send via APNS?
Any example codes?
I have googled and found out about java-apns and javapns, but I am not even sure if they are obsolete already.
Thanks in advance.
I can help you with what all are the things which are must to implement APNS. Please note that with the introduction of new HTTP/2.0 APNS API, a lot of things have changed which used to be before. (Good news is : Things have really become easy & simple now)
Would advise you to go through the below link:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/Introduction.html
APNS Prerequisites:
1) APNS SSL Certificate, Key (Same for sandbox & production now, previously used to be different for production/development/voip etc. This is the most important step, as most of the issues related to APNS are due to the wrong certificate generation)
2) device token (specific to per iOS app running on an iOS device, your iOS client app needs to register with APNS to get this device token. Also device token is normally different for development & production environments. So please make sure your using the right token)
Once you have above mentioned certificate,key & device token for your iOS App, you can send APNS notifications from your application provider using APNS interface.
Please note that, device token can change anytime (normally during iOS software upgrade), so its always advisable to obtain fresh device token every time your app is launched.
On your query related to java library for apns, please note new APNS interface has a dependency on HTTP/2.0 . Both open source as well as enterprise versions (like AWS, Urban airship etc) are available which you can select based on your needs. Not sure if AWS supports new HTTP/2.0 interface. However its always advisable to use the latest APNS interface as per Apple guidelines.
Optionally, you can also use GCM as well to implement APNS.
https://developers.google.com/cloud-messaging/ios/start
However, your iOS app may need to register to GCM as well for the same. Basically the iOS device token will be mapped to GCM device token. However, you would still need to generate certificate,key as well as device token as I have mentioned.
I hope it answers your query.
_Ayush
We developed a Hotel Menu Order project in android. Now We have created the project successfully. We are using java, Jax-rs for web service, Mysql for database and Rest for communication.
Now we want to add some more features in our app. When the customer conforms their order that order should show to kitchen and admin. When we google for some example we found one way. That is Google Cloud Messaging. But this is online sevice. We can not use this service.
Because we are using in offline services. We use one centralized server in the hotel and all the devices will connect with WiFi. There is no internet connection.
In this case how to notify the user a row is updated in Database. Please let us know how to achieve this.
Via SMS, what you can do is that you can send the sms to the devices using thrid party services like twilio, on client side i.e. device end you can get the sms broadcast validate the number and the sms content, read the content and update the application DB and the UI accordingly.
Or if one device has internet then what you can do is send GCM notification to that device, and from that device you can update the other devices through wifi direct. But wifi direct has some limitation, I think using SMS is a better option.
u can use Google Cloud Messenger services, by which google provide free message service to your client. http://hmkcode.com/android-google-cloud-messaging-tutorial/ this example will help u to understand better.
I have a little question about an android app with a function "remote" use via internet.
So I have these ideas:
Create a webservice using php on the server, and refresh the client app all x time like 4-5 sec
Or make a java server (so I don't know how I can do that)
I just want make a remote connected via user/password to the server and the other app connect to the server and refresh his status.
Do you know the best way for do that?
Thanks
The question is not very precise, but as far as I understand it, both your ideas implement the 'pull' concept, that is the client app checking the status of the server every now and then.
If you want the app to be instantly notified of the server status change, I would suggest push notifications with GCM (Google Clound Messaging). You can find some basic descriptions and examples at: http://developer.android.com/google/gcm/index.html
Sending a server-to-client notification is simple regardless of the platform you use server side. E.g. for PHP integration with GCM, check out this thread: GCM with PHP (Google Cloud Messaging)
I’ve built an app for a client that basically sends a standard pre written SMS to the client of my client’s phone asking for them to get in contact. Now the client would like to be able to send a pre recorded voice message to an answering service with the touch of a button, can this be done, firstly from an Android phone.
I’m guessing it can be done because when I search for an answer all I can find are apps that someone else has written that do just that.
Sometimes development tutorials can be hard to find when it comes to apps as you just get a long list of people trying to sell their apps…lol.
Does anyone know of such a tutorial?r
This is not an answer but maybe could help
I once wrote an application like that for a particular answering service for a particular provider in my country. To leave a message on their device I was basically required to compose an e-mail with a message recorded as an mp3 file and included as an attachment to the mail. I then send such mail to a specific mail address of their answering service. I had to supply credentials for the mail to be accepted. Such credentials (login/password) I obtained first by sending a specific port SMS to their service.
For composing mails with attachment I used an opensource IMAP client for Android (as a jar library added to my project). Don't rememeber which client it was but can find out.
I guess there's no common standard for that but basically all the answering services should do something similar.
Sorry if this info is too vague, I was just given the protocol of how that particular answering service was working and implemented accordingly.