A
A
Aladdin2018-06-24 23:19:59
API
Aladdin, 2018-06-24 23:19:59

How to embed the Yandex translator api in your mobile application?

Added api translator to the site, everything works. I tried to make an application from the html page using phonegap. I downloaded the apk, installed it, but the translation does not work, although if the same html file is opened before assembly, it works. I don’t know what’s the matter, maybe it’s the Content Security Policy, or maybe Yandex restricts the use of api in applications, that’s why I’m asking.
Tried only on android

Here is the Content Security Policy that I provided
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-inline' https://*.gstatic.com https://*.yandex.net https://*.fontawesome.com https://*.yandex.ru https://yastatic.net https://*.yandex.*; connect-src 'self' https://*.yandex.net; style-src 'self' 'unsafe-inline'; media-src *;">
Link to apk

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-06-29
@dimonchik2013

generally restricts by IP, too,
well, there is a server response - what does he say?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question