Launching the android stopwatch from my app - android

I want to launch the stopwatch application that comes with android from my app but have no idea how to do this.
I do not want to create a stopwatch on my own since it needs to keep running when I close my app.

Up until Android 4.1 (or maybe 4.2) AOSP Android did not have a stop watch in it, and there is no official SDK support for launching that part of the app. Stopwatches are likely installed by the user or the OEM on the majority of devices.

Related

Ways to intercept recent app (task manager button) on android 12

I have tried intercepting the recent app button using one of the android lifecycle hook (onUserLeaveHint) and it has been working in android 11. After updating to android 12 due to the changes in behavior in launcher application that doesn't work anymore. I noticed that some mobile manager application are able to intercept the recent button.
Anybody can provide any insights on how to update my old launcher application to make it work on android 12.
Additional information: I am using a Samsung test phone, Thank You in advance.

Android 4.4 Locked Task Mode

I'm creating a flutter app that will be installed on a Samsung Galaxy 7-inch Tablet with Android KitKat (v4.4). It will be the only app on the tablet, and will be implemented such that it loads when the device is powered up, and the user will be unable to exit the application.
I've found this on the Android Developer docs, but it only applies for versions 5.0 and over.
https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode#java
I have not been able to find any documentation/tutorials that could possibly assist with this, without using a 3rd party application such as Surelock and Kioware.
Is there a way to implement the above for older Android version (in my case for version 4.4)? Thank you.
As you are targeting an older Android version you will need to implement some workarounds, but luckily there is a very extensive tutorial on how to do just that for Android 4 which you can find here:
http://web.archive.org/web/20201101145703/https://www.andreasschrade.com/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/
As this is very platform specific you will need to develop directly for Android and then connect it to your Dart code with this tutorial.
If you control the devices your software will be installed on, you can also opt for the 'root' way of doing things which is described here:
Enabling KioskMode in Android 4.4.2 with Root

Android App get killed in HUAWEI phone

Few days ago I moved to HUAWEI P9 phone and try to keep developing my app.
My new problem (have not seen it on other devices..) is that my app is getting killed after the screen turns off (not immeditaely but after a minute or too).
To be sure that the issue is not related to my application, I created the simple "hello world" application from the android studio, and the behavior is exactly the same.
I'm running Android 6.0 (API 23) on my device.
Any Idea why even the simplest app is getting killed after the screen is turned off?
Thanks!
Lior
You need to add your app in the 'protect application with battery saver' (under battery's option).
Hope this helps

Tizen Wearable background app

I am wondering if it is possible to run an tizen wearable app in background. I need to run an app in background. I am using several sensors and I need to save these data continuously.
another thing Can we get the sensor in Samsung Gear S2 data such as Heart Rate directly from an android app directly without any widget on the Gear S2.
I appreciate any help or suggestion.
Thanks,
I'm also new on this and I'm starting with Samsung Gear S2.
When I read your post, I thought I read somewhere that Gear S2 would only run web app, yet, I opened the Tizen IDE, used a sample native app, and installed it an ran on Gear S2, so, I would say that you probably can do it. I would just explore the native sample apps for start, you'll have to develop in c/c++ and as you might know, you'll need to instal the Tizen IDE and the Samsung Extension SDK (http://developer.samsung.com/technical-doc/view.do?v=T000000248)
hope it helps.
It wasn't possible in the first Tizen version that supported wearable (2.2) but became possible later (2.3) when native and hybrid apps were added to the wearable profile.
Not sure how running Android apps on Tizen is really implemented, but I'd expect the chances of Anrdoid apps getting access to device information (sensor and other) is fairly unlikely, as those come through Tizen-specific APIs with also Tizen-specific privilege requirements - the mapping would be complex, but who knows, someone may have managed it. You don't need a widget for that though, the same device information API (and more) is available through native apps.
Yes it is possible to create wearable background app but only with Tizen 2.3 & above and only in Native app versions not in Web apps.
If you want to build app in web version then u can write your service in native and UI in web app and make the app as hybrid app.
Follow the guide in link below to pack a hybrid app:
Tizen Hybrid App Packaging guide

Android Air startup at Boot time

Is it possible to get an Android Air app to startup at Boot time.
Doing it in Java seems quite possible (see Android 2.2: How to make an app to run automaticly on startup & how to make an app start another app) but I am not sure how you
do the same thing in AS3.
James

Categories

Resources