jelly bean search key - android

In my Android app I enable my specific app-search to be triggered via the search key in a number of my activities using this mechanism from the manifest
<meta-data
android:name="android.app.default_searchable"
android:value=".Search.SearchActivity" />
with the appropriate search activity. This all worked fine until recently.
With the Jelly Bean update the Search Key now always starts Google NOW search functionality.
On this site: http://www.android.com/about/jelly-bean/ I found in the "Google Search" section this statement:
"For devices with a hardware search key, you can tap it to launch Google Search."
Has Google taken over all use of this key completely, or is there a way to recover it?
If I can't recover it, then it's UI design changes in almost all activities to add a Search menu option or action button....

This has been done specifically to circumvent patent issue. This has been mostly done only in USA, where apple recently got an injunction on galaxy nexus. So all Android phones in USA will show this behavior from now on. So most of the apps in jelly bean have a on screen search button.

If you have a cyanogenmod based phone (e.g. jellytime for HTC DHD like me), the old behaviour is only a setting away:
Menu/Systemsettings/System/Hardware keys/Search/In-App-Search
But this change wasted quite some of my time for debugging my app and researching to find this solution. Needless to say I hate patents, especially ridiculous ones: obvious behaviour like an OS sending a hardware key event to an application can be patented???

Related

Some Samsung phones with Android 6 or higher don't have android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS

My app needs to allow users to disable doze mode for my app, so for that the app needs to open android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS but I get android.content.ActivityNotFoundException when trying to open that intent on some Samsung phones like the Galaxy A5.
Is there an equivalent on those phones? What about other phones?
Thanks.
Edit: I just want to be clear, I'm trying to find what the actual setting screen is on Samsung Phones like the A5, not just how to open settings. I need to direct the users to the right location.
Edit: To clarify further, we have no found the setting on that Samsung phone to make isIgnoringBatteryOptimizations() return true. That is my main question, what setting needs to change on that phone for that to become true.
The Samsung Galaxy A5 ran on three OSs:
Android 6.0.1, Android 7.0, Android 8.0.0 (GFX Bench)
The android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS activity was added in API 23. It was not removed afterwards. For some reason, this bug was never addressed by Samsung. The only solution is to bring the user to the system settings screen. See the following solution:
https://github.com/kontalk/androidclient/commit/be78119687940545d3613ae0d4280f4068125f6a
EDIT
After misunderstanding the question and with the clarification of the OP, I've added a potential solution to address which power setting needs to be accessed.
If you haven't already, make sure you are using android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS. Be sure that you add REQUEST_IGNORE_BATTERY_OPTIMIZATIONS in your manifest prior to using this activity.
Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, put them on the whitelist of apps shown by ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS). For an app to use this, it also must hold the Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission.
This should bring the user to the exact option necessary.
If you have one of these phones (maybe virtual from some online services) you can run the adb command to find the running activities, this way you can check the intent and maybe you are allowed to call it:
adb shell dumpsys activity activities

Can't enter settings menus on 'Google Home' purchased in USA

I'm Canadian and was recently gifted a Google Home, from an American.
It works great with standard tasks like music, reminders, etc, and I've been playing with customization ITTT, which so far works fine, including features like SMS and callings.
The problem is that I can't access certain settings in the Android app — tapping them does nothing. For example, I can't :
Set up voice match (although it recognizes my voice)
Manage news sources (although it plays local news when commanded)
Setup Shopping List (although the feature works fine)
I can't help but think this is related to the fact that this unit wasn't made for my country (although they are available here too).
Does anyone know if there's a way around this either programmatically, or maybe a setting I haven't seen, or some other workaround?
Related:
AndroidCentral : Top 8 things to know about Google Home in Canada
Wikipedia: Google Home

How to enable logcat output on Huawei MediaPad M3

The MediaPad M3 does not log anything related to the app I am developing (compared to other Android devices). I understand that the log level usually can be set on Huawei devices via a hidden menu.
I came across these instructions many times while searching for the solution: https://gist.github.com/Shallong11/8403487
However, this is a tabled and it doesn't have GSM support and a Dialer / Phone application. So I fail at step one: dial ##2846579##.
Update #1: I've tried everything listed here: https://android.stackexchange.com/questions/59259/typing-dialer-secret-codes-in-devices-other-than-phones
Nothing works. The only reaction I've gotten: startActivity call with Intent.ACTION_DIAL is handled by Contacts app. Quite strange that there's a Contacts app but no Dialer...
It's probably meaningful to add that debug logs are displayed but stack traces of app crashes are not.
Update #2: I've also tried with some of these secret codes; nothing works: http://mobilespecs.net/phone/codes/Huawei/Huawei_MediaPad_M2.html
Because there is no dialer on the tablet, open calculator in landscape mode and enter
"()()2846579()()=" and the hidden menu should appear.
Here's a video demonstration.
Also please note that you'd need to restart the device afterwards in order for the changes to be applied.

How can I remove the new do-nothing "settings" control from my Marmalade Android app on HTC One (Credo only?)?

I'm working on my first (C++/IwNUI) Marmalade app, which so far works fine, but on Monday one of my devices (an HTC One Android phone, Credo Mobile) had a system update, after which my app, and only my app, now shows what seems to be a "settings" control on top of my app, which can be moved around, but does nothing but clock taps to the app where it is. It's a grey circle with three dots in it, which appears immediately when my app starts to load. Another Android test machine (Samsung Galaxy) does not show this control on my app.
Has anyone else seen this? How might I get it not to appear?
I have asked on the Marmalade forums with no response, and searched here and on the web but I haven't seen any reference to it, so I assume it may be limited to some combination of Marmalade apps, HTC One, and/or Credo Mobile Android phones.
Update: This control appears (on this phone only) on all of the Marmalade example apps I have built too, including IwUI, IwNUI, and plain demos like IwHTTPExample.
Even though this is very specific, I wonder if anyone knows a programmatic way in Marmalade C++ for me to at least get such a settings control to hide or go away?
I found a way to make it go away: "Add android:targetSdkVersion="11" (or higher) to your element." in the settings file which in my Marmalade project is called AndroidManifest.xml.
It seems like this may be a bug where it thinks there is an "overflow" of a title/menu-bar which isn't even there in these apps. By targeting a later version, it uses a newer "holo" menu, which doesn't do this.
If someone has a better explanation, I'll wait to mark that as the accepted answer.
In case it may help future people confused by all this, here's how I found this. Jared's answer led me to study my Marmalade config files, and the Android developer site where I found some general somewhat relevant info about what this is, and to search some different terms on the Marmalade forums, which got me to a relevant question I had missed on the Marmalade community answer pages, which led me to this page which had the suggestion which has the desired effect.
I am guessing you created a new project. Are you seeing this "settings"?
This is automatically added in every new app. Check your res -> menu folder. You can remove the "fake" options menu if you like.
Samsung will show this menu if you hit the menu button on the bottom left of the device.
HTC devices will show the options menu in the ActionBar/ToolBar.

How do I set up HTC Sense and Samsung Touchwiz app icon badges?

Stock Android doesn't support 'badges' (e.g. unread count on a messaging app) that overlay the app icon like on the iPhone. There are a number of questions here on Stackoverflow which confirm this and suggest using a widget.
Whilst widgets are lovely things, they require too much interaction from the user to get in place (all that searching, long pressing etc.) and don't actually change the app icon. So no, that is not an option.
I accept that Android doesn't have app icon badges. However, HTC Sense and Samsung TouchWiz do. I'm looking at my Galaxy S right now, and the app launcher Messaging icon has a badge with the number of unread SMS messages.
Does anyone know how to access this badge functionality individually for Sense and TouchWiz devices? (I expect there are two APIs).
I don't know about HTC but I've written up how to do this on Samsung phones here How to interface with the BadgeProvider on Samsung phones to add a count to the app icon?
Does anyone know how to access this badge functionality individually for Sense and TouchWiz devices? (I expect there are two APIs).
Become an employee of HTC or Samsung, respectively.
HTC might start offering an API for stuff like this through Open Sense. Samsung might start offering an API for stuff like this through their developer site. I am not aware that either are at present and I wouldn't count on it becoming available.
What you are seeing is a feature of those home screens. You are, of course, welcome to write your own home screen where you have this functionality, perhaps even exposing an API for third-party developers to use.
Still no positive answer to this?
It's very strange that they (HTC and Samsung) haven't come up with a way for third-party apps to update their widgets! So we end up with users of third-party sms apps to complain about the sms counter not updating when it should. This is very sad, especially on the Android world where app integration has been made so easy by the framework! Such implementations should be negatively judged by Android community and the Android Alliance!
If anyone has found a work-around for force updating the widgets of the vendor specific sms apps (HTC and Samsung), so the unread sms counters correctly update, and would like to share this knowledge, you are more than welcome!

Categories

Resources