Webapp based Android keyboard - android

I am programming an Android keyboard. Right now I reached the point where I have to rewrite the KeyboardView and I'm asking myself why not to switch to an Webapp instead of a native Android app. Thereby I could later easily deploy the application for other platforms whithout the need of rewriting.
My approach would be to use the Android App as an container for my web app probaply in combination with GWT. I am also considering using PhoneGap.
The problem is that so far I haven't found anything about people using webapps for an InputMethod. Now I'm wondering if it's reasonable or even possible to use webapps for this task or if they are only suitable for normal activities.
Has anyone tried doing this before or some hints why or why not it is possible?

Related

Is it possible to develop mobile keyboard app in react native

we want to develop mobile keyboard app - (Third party keyboard) that have some unique features (such translate on the keyboard).
We would like to know if there is a way to developed it once both for IOS and Android, with React native, or any other solution?
Thank !
Short answer: no, it can only be developed in native code (java/android, Objective-C or Swift/iOS)
Long answer: React Native would be an overkill in this case since it would bring a lot of features which cannot be used by a custom keyboard. For example, all the List components or Navigation which are quite heavy.
If you want to build a custom keyboard I would recommend to read the tutorials for iOS and Android about this matters:
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/CustomKeyboard.html
https://developer.android.com/guide/topics/text/creating-input-method.html
This pieces of functionality are really simple to develop so not a lot needs to be learned, plus having to maintain two codebases is not going to be a big overhead

Application requirements to write a home manager in PhoneGap

Is there anything (plugin, library etc.), that would allow me to write a start up application / home screen manager for Android, using PhoneGap? If yes, then what particular circumstances must such application met?
Or, as I assume, this isn't possible and a native, Java-based, application for Android must be written to accomplish this?
Hello I'm sorry to tell you, but my opinion is that
it's IMPOSSIBLE to achieve such goal using Cordova/PhoneGap.
Hybrid applications are using smartphone's native WebView , thus you cannot invoke/reach the WebView from the Home/Launcher of the phone.
In order to get such WebView you must be in some sort of application (e.g. hybrid app written by you). The Home/Launcher CAN'T SERVE as WebView therefore you can't make such things with Cordova/PhoneGap
Sorry for killing the hope :D

Using a webview and TTS regardless of TalkBack

I'm developing an Android webapp (an app built with Android Studio mainly based on a single webview which loads remote content) that is meant to be used by visually impaired people.
Standard accessibility features, such as those provided by Android itself and Talkback, are completely useless for my use case, because this app is meant to be used in a completely non standard way, by using the headset button as the only input, and spoken text as the output.
The webapp is NOT meant to be used by people who are not visually impaired alike. We already have a completely different version of the webapp for that. However, I do want the spoken texts to be displayed on screen, mainly for testing/debugging purposes.
So, I don't need nor want to take advantage of Google Talkback, and my webapp, built from scratch using native TTS called from JavaScript (and TTS events, such as ending of utterances, triggering JavaScript code), already works fine when TalkBack is disabled.
However, my app is going to be used mostly on phones whose users DO have accessibility and TalkBack enabled (or perhaps other accessibility extensions - hopefully not, given the nearly nonexistent standardization of the framework for accessibility features).
So I need to prevent it from interfering with my own calls to the TTS engine.
Which is complicated as hell.
Also, I need it to be compatible with Android 2.x through 4.x.
On older Android versions, the problem is relatively small, as TalkBack doesn't inject scripts into the webview, and the webview is almost opaque, its contents being "invisible" to Talkback.
On newer versions, it's a nightmare.
Android doesn't provide a way to simply disable accessibility features from the app, which is ridiculous.
The AccessibilityManager.interrupt() method doesn't seem to do the trick, and it's practically undocumented, so I can hardly figure out in which ways I could try to use it.
There doesn't seem to be any documentation about how the injected scripts work and how I could try to interact with them.
And to screw things further, I'm reading that since 4.4.something, the scripts formerly injected by TalkBack are now replaced by something else, integrated into the very web engine, or something like that. So maybe even any hack I can figure out for TalkBack injected scripts may not work with the most recent versions.
Is there some workaround/hack to completely disable TalkBack from my app, for my app, when my app is running?
Is there a way to prevent the injection of javascript code from TalkBack (when the script injection is enabled systemwise)? (obviously without disabling javascript altogether in my webview, since I do use my own javascript)
Is there at least some documentation of those scripts available? Or their code? So that I could at least try to "fool" them?
Is there a way I can make some parts of the webview's content "invisible" to TalkBack?
Or any other suggestion in order to be able to have my app do its own call to TTS while avoiding Talkback to interfere with them, and render text on screen while preventing TalkBack from interacting with it?
I've been working with TalkBack and Android for about a month now and find the same frustrations you have - little to no documentation other than reading thousands of lines of source code. In 4.4 the WebView component changed to use the Chromium engine, which is from what I can tell the reason the scripts injected aren't exactly the same. Both still seem to be using ChromeVox. There are no public APIs for disabling TalkBack, it can be done with reflection if you're included to deal with the headaches that come with that. You're best bet is to disable ChromeVox (it's injected into your WebView automatically on 4.4+ and on lower 4.x assuming the web accessibility setting is enabled) from the JS side.
I can only test on 4.4 now, but this does the trick for me:
cvox.ChromeVox.host.activateOrDeactivateChromeVox(false);
https://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/chromevox/injected/init_document.js?r=193

how to implement a transparent backgound webapp among process

all
I like to implement a webapp for realtime debugging like "android->developer options->show touch data" or "android->developer options->show CPU usage".
But, I can't found any proper method for this with HTML5(and some of hybrid framework)
I also understand this overlay scheme is highly depend on underlying platform(like android, tizen, firefox-os).
is there any way or idea to implement a transparent background webapp among process?
my first target platform is android.
thanks
For firefoxOS it's been done in system so it's not possible.
For android there's Tooleap SDK that allow you to develop float window app, but I have no idea if it support writing in HTML5.

mobile multiplatform development with native UI

i have developed an app, running on iphone and android, using phonegap and jquery mobile.
The combination of them is really great.
To support multi platform, I have also evaluated some other platforms too, but the problem that i have is that the UI does not feel native (and although not a problem for most apps performance cannot be compared with native).
The only solution so far giving acces to native UI seems to be monotouch.
Do you have any suggestions on platforms offering native ui at least on iphone and android, regardless of language used?
Thanks.
The only way to have native UI response is to write native apps.
The native UI is a puzzle indeed. You need read HIG firstly, cook UI with color and images to get close with system default ones. But if you are using PhoneGap thing, why do you even worry about it? Just rely on framework to get close the look and feel. Get your app really useful is more attractive than looking accustomed for user.
But it is important to adjust interactive design to avoid conflict. For example iOS navigation bar has return button in left most part, don't put it at right. And Android user will get disappoint if there is no response for long pressing or context menu key pressing.
for now i will go with a mixed on js based on phonegap and native controls plugin which i will extend as needed.

Categories

Resources