hiding the lower system bar on +3.0 android - java

well I'm trying to hide the lower system bar on +3.0 version of android i found this, Hiding Systembar in android 3.0(honeycomb).
Well this tread was pretty old and 4.0 is even out now so i was hoping there is a way to do this now that don't require the user to root the device.

This is not supported. Users need to be able to access the HOME and BACK buttons when they are not available by the device off-screen.
Some Android devices that are running 2.x will get upgraded to 4.0. My understanding is that those devices will not have the bottom system bar, as those devices will have off-screen HOME and BACK buttons. Whether the top portion of the system bar (time, signal strength, notifications) will be removable via things like Theme.NoTitleBar.Fullscreen remains to be seen -- we will know more once the Nexus S and similar devices get upgraded.

Related

Get the number of "tap" on a locked smartwatch screen

I'm doing a school project as a team, but none of us have never developed or even worn smartwatches.
We want to get the number of "tap" on a smartwatch's locked screen but we don't find out if that's possible.
Do you know a way to get the number of "tap" on a locked smartwatch screen?
If this is not possible, can we display a constant notification and retrieve the number of "tap" on this notification?
I'm using a Moto 360 with Android 6.0.1 and Android Wear 1.4.0.
Thank you in advance.
I would advise everyone on the team get a chance to the use watch just to understand the user experience. Watches are very battery limited devices and will always try to go into low power mode as often as possible.
Do you know a way to get the number of "tap" on a locked smartwatch screen?
Tapping normally wakes up watch, either from full screen off or lower power ambient mode. If you want to capture taps/button press you can create a watch app which when active will receive taps/button presses. I'm not quite sure if watch face can capture taps, and if it did it my guess would be after the watch face is fully on, but that would be another place to look.
If this is not possible, can we display a constant notification and retrieve the number of "tap" on this notification?
Custom watch face can allow display of custom content. Alternatively as a watch app you can show what you want.
Additional Comments
The Moto 360 came out in 2014 and was one of first Android Wear watches available. The latest code samples & codelabs from Google are for Wear OS 2.0. You can look back in the commit history for old versions of samples which may be more compatible with Android Wear 1.4
Also from this Android Wear Notice May 2015 always on apps became possible so that might work for your project/use case.

Success in using Android to control an external monitor via HDMI

just wondering if anyone has managed physically to use an Android tablet to control an external screen via and HDMI cable. The Android tablet should have the Presentation APIs, so a version > 4.2m and an HDMI (or mini HDMI) port.
https://developer.android.com/reference/android/app/Presentation.html
So far we have tested with a tablet that has Android v5.1.1 and a mini HDMI port, but as soon as we connect the external monitor, the tablet monitor shuts off (but it is still responsive to touch) and all the output goes to the external monitor.
The tablet is a HannsPad Titan2 13.3 inches.
So we are still stuck on the physical setup. It this does not work at least with mirroring, how can we be expected to start tinkering with the presentation API?
So we are looking for confirmation from other coders that the setup is at least physically been done and tested at least once..
Thanks
W
as soon as we connect the external monitor, the tablet monitor shuts off (but it is still responsive to touch) and all the output goes to the external monitor
That was an incompatible and unfortunate choice made by your device manufacturer. The screen should remain on. You might rummage through Settings to see if there is a way to configure this behavior, or contact the device manufacturer for support.
The tablet is a HannsPad Titan2 13.3 inches.
Buy a better brand next time.
It this does not work at least with mirroring, how can we be expected to start tinkering with the presentation API?
Buy a different tablet. Note that (micro-)HDMI connectors seem to be less common, though some tablets might also support MHL or SlimPort.
Or, in Settings > Developer options, choose "Simulate secondary display" to give yourself a floating window that serves as a fake external display that Presentation can drive (except perhaps on Android O). For development purposes, this works for light testing.
So we are looking for confirmation from other coders that the setup is at least physically been done and tested at least once.
I have never used that tablet. However, the Presentation APIs work just fine. For example, I was just updating my CWAC-Presentation library yesterday, and part of that testing included trying my demo app on a Nexus 10 connected to a micro-projector via its micro-HDMI connector.

How to make an app unclosable?

After a user opens my application I don't want them to be able to get out. So when they press the home or back button it doesn't let them exit the app. I know there are ways using a service to keep the app always running in the background, but I don't even want them to even exit.
Is this even possible, if so how? Without having to hack the kernel.
I know this sounds odd, but it is not for a commercial app, but for my lab, it will never be on GooglePlay. The tablets will be given to little kids and they will take a test on it, so I can't have them using youtube or anything else.
Related post: Android, How to make the task of the app unclosable? Only closable by task killing
The answer by CommonWare seems to indicate that kernel hacking is the only way, but is it?
Also I am using Android L.
there is no official support yet - there will be support with android L via the Task locking API
The L Developer Preview introduces a new task locking API that lets
you temporarily restrict users from leaving your app or being
interrupted by notifications. This could be used, for example, if you
are developing an education app to support high stakes assessment
requirements on Android. Once your app activates this mode, users will
not be able to see notifications, access other apps, or return to the
Home screen, until your app exits the mode.
https://developer.android.com/preview/api-overview.html
EDIT: as you said you use L this got obsolete - but I leave it here as a hint for others
said that - you are also able to get this kind of work without root today if you have to ( e.g. kiosk mode app on a certain hardware ). It is not simple - and no solution that works for all devices - but if you need it you can get it work with tricks like:
- reacting on home-screen intent ( and setting it as default )
- when you go to background - bring your self foreground again
- ..
It seems google has some thing called COSU for setting up single-purpose devices
Android 5.0 Lollipop introduced two new ways to configure Android
devices for a single purpose:
With app pinning, the device user can temporarily pin specific apps to the screen.
With lock task mode, a user can’t escape the app and the Home and Recents buttons are hidden. Additionally, lock task mode gives the IT
administrator a more robust way to manage COSU devices, as discussed
below.
and
As an IT administrator, you can configure Android 6.0 Marshmallow and
later devices as corporate-owned, single-use (COSU) devices. These are
Android devices used for a single purpose, such as digital signage,
ticket printing, point of sale, or inventory management. To use
Android devices as COSU devices, you need to develop Android apps that
your customers can manage.
from here
and there is a code lab for it here
for earlier versions of android here i founded How-To Create a Working Kiosk Mode in Android which shows some hacks for disabling buttons and restarting the application after boot and lock. note that most of these hacks, don't work on android 6 and later

Access Fastlane

I am currently developing a Launcher for Nokia X. How do I integrate the FastLane feature of Nokia X onto it. I already do have a base for the Launcher, and already had been tested against Android 4.1.2 (16). By the way I've already checked here.
Basically your link is to Asha platform, so its not valid with Nokia X.
With Nokia X, you don't really have any dedicated API for Fastlane, however, if you check the Notifications part is Design library, it says that "Notification drawer in Android shows contracted notifications that can be expanded. The Nokia X Fastlane collects all notifications and other recent activities. If the app has defined an expanded notification, it will only show on Fastlane; Lock screen will show the contracted version.", thus you indeed can make notifications which would open the app.
Take a look of Accessibility framework and focus on AccessibilityEvents with type "TYPE_NOTIFICATION_STATE_CHANGED"

How are notification badges implemented in Android launchers? Can I do this in my application?

As far as I understand, there is no way to dynamically change application icon in Android. There are a lot of posts in SO about it. Nevertheless, on my stock Nexus 4 with vanilla Android, I have Go launcher installed and it can set badges above the app icon. So can Nova Launcher: https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher
I'm interested how can this be achieved in Android? Some hacks? Private Api?
As anyone who has installed those apps knows, those are replacement home screens. A home screen can do whatever the home screen wants:
If those home screens want to display badges over icons for well-known apps using their own code (e.g., Gmail), they can do so
If those home screens want to expose some API that app developers can use to enable badges for their apps, they can do so
For example, Nova Launcher does the former, as people who read the Play Store listing can tell:
Unread count badges for SMS, Missed calls, Gmail, Email, Google Voice and more. Counts show in the dock, desktop, drawer and folders.
Beyond that, the only way I know of for an app to try to affect its launcher icon is by changing the enabled LAUNCHER component, disabling the old one and enabling a different one with a different icon. This is going to be unreliable, though, as not all home screens will necessarily change the icon dynamically, perhaps not doing so until a device reboot.

Categories

Resources