How to have a translation service in android app - android

How can a translation service be called in an Android app? Can we have an app that can translate multiple languages into another?

Edit - Google have deprecated the Translation API due to "misuse". Apertium is a possible alternative.
You asked:
How can a translation service be called in an Android app?
Google Translate would seem to be the obvious service to use in an Android App.
There is an unofficial Java client API you could use in your application to make the calls to Google Translate.
If you use this, make sure you give your application the INTERNET permission so it can make the appropriate network connections.
Can we have an app that can translate multiple languages into another?
It's definitely possible to create an Android app to do this because Google already have made a Google Translate application, as have lots of other people.

considering the fact that this answer I am posting is quite late,but it could help other.
first thing google has deprecated translater api version 1,and the version 2 it has launched comes under paid service.here is a link from bing which is totally free and has given complete steps to use it in your application.http://www.microsoft.com/web/post/using-the-free-bing-translation-apis

I wrote a class to easily translate text based on google-api-translate. All you have to do is get the device's locale and you can easily translate any text to the devices current language setting. See android-translate-api

Related

how can i use azure face api in android?

I am trying to implement Microsoft Azure Cognitive Service Face Api for face recognition. Followed by https://go.microsoft.com/fwlink/?linkid=2184104 i created .NET Core console application and everything works fine. Now i would like to use this code in android app, but i am pretty stuck. Should i create rest api from existing C# code? Or there is android library that allows me to use face api directly like in console app?
Since Cognitive Services are already APIs, you could talk to the API directly and process the response right inside your Android code.
Please keep in mind that this does leave a potential security issue if the application is meant to go into the store / public. Users could look at the traffic or decompile your app, find your access keys and use your Cognitive Service for their own applications. In that case it could be interesting to wrap it in your own API and have some security checks in place there like rate limiting or call quota. Of course you need to make sure to use your access key inside of your own API to hide it from being seen externally.
Still, this leaves room for abuse. You now implemented a public API that, again, anybody could talk to. There are quite a few interesting discussions found on this, like this question right here on Stack Overflow: Restrict API requests to only my own mobile app.

How to use custom Google Assistant commands without "Let's talk to" and without IFTTT

I know this is broad question but I've spent counless hours searching for the right solution. Google provides at least 15 different types of Google Assistant connections all of them are different and I don't know which one to use for my project. The project is pretty simple - I would like to call dynamic url with parameters (webhook to my home server) from mobile Google Assistant.Example - I would say to my Android mobile phone
> Ok, Google set the TV volume to 50
and the assistant would call
GET "https://192.168.1.12/tv/volume/50
or
GET "https://192.168.1.12/?device=tv&action=volume&value=50
where 'tv', 'volume' and '50' are the dynamic parameters (not static) so I could also call
> Ok, Google set the TV channel to 132
I just want a link or a name of the Google dev console that I can use. I don't want to waste another several hours just to find out that another Google package is not suitable for my project. Have anyone done something similar?
PS
I know that I could achieve something similar with "Ok, Google let's talk to ...." but that is not my case.
also I CAN'T USE IFTTT
There's no one-click mechanism to do this directly in Assistant. The smart home platform allows you to configure a service that would capture commands such as Channel and Volume and let you handle those commands in the way you want, using a cloud backend and optionally the Local Home SDK.
This may be a bit more work than you want, and you may want to consider existing smart home platforms which may handle some of the backend work such as https://homeassistant.io which does have an Assistant integration already, though I'm less sure of whether it may work in your use case.
It's hard to answer your question without knowing your constraints. Are you a developer? Are you looking to make a commercial app? For non-commercial use you can use the Google Assistant Service to create custom commands that do whatever you want (including call your API). As a benefit, you don't have to say "hey Google" before your command.
Also, it would help to know why you can't use IFTTT, given that it seems to do exactly what you're asking for.

Is using text to speech api allowed in android app?

the following link gives me speech in Arabic by using google translate server side api , some website descripe that using this is illegal is this true or not ? because I want to added it to my android application.
P.S : android os does not support Arabic speech
http://translate.google.com/translate_tts?tl=ar&q=%D9%85%D8%B1%D8%AD%D8%A8%D8%A7
http://code.tutsplus.com/tutorials/use-text-to-speech-on-android-to-read-out-incoming-messages--cms-22524
Please Google "text to speech android tutorial" you'll get many.
Edit: Sorry , I understood you question wrong.
I believe it is. But if you are really concerned, please contact Google or ask on their forums, I dont think you'll get an answer to that here. Good luck!
As described in the Terms of Service in Google Translate API:
1. Prohibitions
You will not knowingly use the API to create, train, or improve (directly or
indirectly) a substantially similar product or service, including any other machine translation engine.
That means, for my understanding, that if You plan something like this, it is not allowed if it is Your own implementation of a translate engine. For example, You are calling Your app "Hussamabd´s great Translation Engine" and this app is really for translate words into other languages, then it is not allowed. BUT, there is another part in the API:
Introduction
This document is intended for developers who want to write applications that can interact with the Google Translate API. Google Translate is a tool that automatically translates text from one language to another language (e.g. French to English). You can use the Google Translate API to programmatically translate text in your webpages or apps.
This means to me, if You create an app, which intention is not to translate words, but You need this translation for any other reason, for example making Your app in every language, it will be ok.
Also, You have to pay some fees for using this API. But to get really sure, You should contact Google or a lawyer, because I am not and I can´t give You any law confirmed statement!

Is it possible to create Android live wallpapers using cocoonjs?

As per the question title, is there a way to implement an Android live wallpaper using CocoonJS? Either as a standalone app or as an additional service of an existing app, it doesn't matter. I can't seem to find any evidence at all that this is possible, although there doesn't seem to be any technical reason for it.
I've been developing games with cocoonjs and I do not know of any API call to set a wallpaper.
Here you can see what you can do with the cocoonjs javascript API:
http://doc.ludei.com/3.0.5/
At the moment you can not add any more functionality than this API provides.
Nevertheless, there are plans for the future to make it possible to write own plugins :)
Regards

Google Play Game Services on a desktop game

I created a game in Java using Libgdx framework. Now I would like to know if it is possible to use Google Play Game Services in a desktop (java/.jar) game, or is it meant just for mobile devices?
As I am faced with the same question, I do not have a complete answer, but I think the short answer is yes, you can.
But you'll have to use the rest API instead of a nice java API, and some features are not available (such as the real-time online multiplayer support). You can see the reference here:
https://developers.google.com/games/services/web/api/index
As you can see, the major stuff like anchievements, leaderboards, and turn-based multiplayer services should be available (and you can even see there is stuff like joining rooms, but they are marked as "For internal use by the Games SDK only."), so I guess the REST API covers the major needs.
I have yet to test this on a desktop aplication and for sure you'll want some support library to help with the quirks of the HTTP-REST protocol, but I think it is feasible.
EDIT: Since this API is meant for the web, you may still need some kind of initial JavaScript interaction with the user (using google's JavaScript libraries) in order to authenticate the user first, but the rest of the interaction can be done "server-side" (and in any language you want). Read this for more details:
https://developers.google.com/games/services/web/serverlogin

Categories

Resources