Is it possible to debug an app via the plugin (Google Assistant test) or can someone tell me how to do it via Android Studio. Normal apps can be debugged, but what about the integration of Google Assistant.
The current version must always be uploaded to the Play console, even though I'm only testing. In addition, the version number must always be changed. Is there an easier way?
About the app: I really just want to start an action with a shortcut.xml that is given a few parameters that are evaluated in the app. (Ok Google, set the clock in the kitchen to 3 o'clock, in myapp) Everything else is handled internally, so as simple as possible. No ad or anything. I can't get it. The examples are all too complex. Can anyone help me?
Related
The Android TV (ATV) app I'm working on has voice control capabilities. Basically, when the user presses the microphone button on a remote controller, the key event (identified by KeyEvent.KEYCODE_SEARCH) is handled by the app, speech recognition starts (using android.speech.SpeechRecognizer), the results (parsed speech) are obtained and parsed further by the app logic (e.g. showing the user search results or performing some in-app action).
Everything has been working as intended and described above, until, quite recently, Google Assistant (GA) was introduced to ATV platforms (the first one being Nvidia Shield box). Now, when the RCU mic button is pressed, the GA overlay appears and the mic key event doesn't even reach the app.
For the last few days I've done some extensive research (documentation, internet, forums, stackoverflow etc.) and experimented with some potential workarounds, but nothing's worked so far and I haven't been able to find any definite information on the topic (probably due to the ATV+GA combination being rather new on the scene, and the ATV ecosystem not being as large as the Android one).
The best hint I got so far is what's been done with the Spotify app for Android TV. When it's run on an ATV device with no GA, it basically behaves as I described above; but when GA is present, the GA overlay appears, receives the parsed speech and shows the search results, with results from Spotify in the first line - so, the Spotify app is integrated with GA, and this integration replaces the in-app voice control mechanism. This suggests that either there is no way to ignore/disable GA inside your app in order to receive the mic key event and proceed with voice control as usual, or at least this is the preferred way of handling voice commands now. It also shows that there are apps for ATV that approach voice control the way I described, so maybe someone here has already encountered similar problem.
My question(s):
is it possible to prevent Google Assistant from taking over RCU mic button signal?
is it ok to do so? (by "not ok" I would mean - are there any official guidelines that discourage such behavior - or at least are there valid reasons not to do so?)
if so, can it be done?
if not, is there a resource documenting how to integrate with GA (the way Spotify for ATV app does)?
Starting with your last question:
if not, is there a resource documenting how to integrate with GA (the way Spotify for ATV app does)?
I wrote about how to integrate on the Android Developer's Blog. Spotify has onboarded their content catalog to Google's services which is why the Google Assistant is able to work so well. You can achieve similar results if you make your app searchable (covered in the blog).
is it possible to prevent Google Assistant from taking over RCU mic button signal?
No, not at this time. The Google Assistant is a system app that takes control over the mic to give a uniform experience across all apps.
is it ok to do so? (by "not ok" I would mean - are there any official guidelines that discourage such behavior - or at least are there valid reasons not to do so?)
if so, can it be done?
You can still have an in-app search experience. There is an example in the leanback sample. You will need to set a listener on a BrowseFragment and implement a SearchFragment. We know this can be confusing, have in-app search and Google Assistant search competing, but we are working on how to improve this.
I have very old Siemens CX70 in working state and just don't want to throw it out. My idea is to use its math power and peripherals (GSM module, USB, Camera and screen) to build some simple applications for home use (multichannel termometer, timer and cheap security system - for examples).
I know I should use Java ME and IDE (I love Netbeans, for example). Can you tell me what I need more to start developing? I know Java well, I just need to make an environment to developing, debug and deploy. Mobile library documentation will be very helpful too.
Thanks.
There are so many online tutorials about this topic that the only right thing to do is to refer you to google.com
Search after "getting started with j2me".
However, there's something else you should know upfront before getting too excited.
The security model in JavaME will prevent you from doing much useful stuff, in relation to some of the things you mention.
Every time you try to access certain things in the phone, like e.g. the camera, or send SMS, or read/write a file on SD card, etc etc - the phone will show a popup "This app is trying to access camera. Allow this?". And the app will only continue after a manual click on Yes.
As you can imagine, this of course renders a lot of ideas useless.
In order to prevent these popups, you can sign your app with a certificate you buy from Thawte or Verisign. But as that'll cost you $300 a year, it's not the way most sparetime hobby developers chooses.
Personally, I found another way, but it requires you to use a phone from Sony Ericsson.
Because the old Sony Ericsson phones can be patched in order to remove the Java security. After doing this on one of my old phones, I've been having fun making apps like the ones you mention. For example, an app that keeps an eye on my home when we're out, by taking a picture every second. If it detects a difference in the picture, it sends me an MMS with the picture. :-)
I have searched a long time for patching options for other brands, but I just can't find anything useful. Nokia should supposedly also be patchable, but I just can't find anything useful about it.
So in short: If you'd like to make some sparetime hobby apps on a phone like that, you should either find a Sony Ericsson phone and patch it - or go dig up an old used Android device.
Good luck.
I've worked with Android in the past, but haven't done anything super-advanced or what I'm about to describe so need some guidelines as to what the best approach/method is to do this before I proceed.
I'm not entirely sure how to google this, so it's best to explain.
I want to build an Android library project preferably with the source undisclosed. I read this can be done as follows: Create another jar that the Android library project references. However, not sure if all of the source code can be private. If anyone can point me somewhere, that would be great.
Asides from that, the library needs to expose an API for any Android app to use, and some sort of event mechanism to broadcast an event when certain events happen (e.g when the app is in foreground etc).
A scenario would be:
1) User loads the app which has the library embedded
2) The embedded library detects that the app has loaded and 'sends an event' to the app
3) The app captures the event and does some stuff specific to the app + an API call to the library
I guess what I'm interested mostly is figuring out what the best ways are to capture the callbacks by the app, once the library has sent some event to the app and to reduce the burden on the developer having to spend too much time implementing what needs to be done when certain events are captured.
Hope this makes sense.
i'm adding facebook post button to my app (phonegap 1.0), it seems that the only method to have this working is using the plugin here:
https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook
But it's not working for me, first i saw in the log PluginManager not found, reading the docs it seems plugins are not being loaded like that anymore.
But the intent and dialog of facebook appear when calling
window.plugins.facebook.authorize(appID, function(res){...})
I can see the facebook page being loaded but just after it finished the page automatically goes back with no response.
Anyboy has used succesfully this plugin??. actually the whole phonegap-plugin system seems to be very buggy... but i can't change the framework right now all the rest of the app is working.
At the end i managed to have it working by changing the Facebook authentication option in the java file, not using single sign on.
By the way i do NOT recommend phonegap... it seems to me the library is still full of bugs
I've only ever had very minor issues working with PhoneGap and iOS. Most we were able to find quick workarounds to resolve.
The issue is Android itself. I'm trying to avoid supporting it until Google steps in and enforces standards on every phone device manufacturer. Otherwise, you're guaranteeing yourself a swiss cheese codebase to deal with workarounds on every single device out there.
I have been looking at the android source and developing some apps. However for my next app, I need information about the cell phone. Similar to what you see when you go into "Field Test" mode. However I have not been successful to get RadioInfo.java to work. Is there a way to hack RadioInfo.java so that I can use it in my app OR is there a way to get the data that is displayed in "Field Test" Mode. I have looked at the telephony api include the telephony.internal but so far they do not provide as much grained information as I would want.
I have been asking around on the net but so far I can't find this information.
You will not get very far I am afraid as the underlying file is attempting to interact with the baseband chip through an internal api that you will not get access to for an application.