Hi all,
I really need an example how to access/call google translate api in j2me midlet
Thank you all
Hi all,
I really need an example how to access/call google translate api in j2me midlet
Thank you all
Hi vozmen,
There are a couple of things that you need to go through in order to create a J2ME application that uses google translate.
1) You need a License Key in order to use Google API v2. The API is only offered as a paid service as of 1st of December 2011:
http://code.google.com/apis/language.../overview.html
2) Then you need to create a REST request to Google's server, which is basically a secure http request with some parameters. In order to find out how to pass those parameters via a get method, you need to check this link:
http://code.google.com/apis/language...g_started.html
3) In order to create the request to the server from your J2ME application, you need to use the HttpsConnection Interface:
http://library.developer.nokia.com/t...onnection.html
Now, the issue here is that https requests, require that your application is signed. That means you need to add the
following permissions to your JAD file:
MIDlet-Permissions: javax.microedition.io.Connector.https
You can find more about permissions and protected API calls for MIDP2.0 here:
http://library.developer.nokia.com/t...69%73%73%22%20
and then, you need to sign your MIDlet by a Certificate Authority according to the information here:
http://library.developer.nokia.com/t...69%67%6e%22%20
Thank you skalogir,
This is really informative response.
And I have a question:
- I have done it via HttpConnection (not HttpsConnection) and have not signed my jar and have not added any permissions - and it works from Nokia.
Can it be?
Thank you.
Your duplicate thread where you already have a couple of suggestions how to handle issues with Samsung phone models:
http://www.developer.nokia.com/Commu...-translate-API
Yes, thank you all guys...
I've posted a question to a Samsung forum.
You have provided me with a lot of info, thank you again