Open Alarm feature of Android? - java

I have read many questions regarding how to set Alarm through your application. But here I want to open the Alarm built-in function or option of Android through my application. I don't think that Alarm is an application of Android; if it's not so, how can we get access to this feature of Android?

Android OS is providing Alarm Manager component, and all manufacturer provide own way for set Alarm in the device, so all device has different inbuilt Alarm application with different package name, so you can't able to use that package name hardcoded in your own app for open inbuilt app for all the devices.
Here You have to develop your own application with alarm manager component with your own way, Not any options for access device inbuilt setting.

I don't know why but Android does not give access to the some of built in features like Alarm
Developer option etc
check out this one https://developer.android.com/training/scheduling/alarms

Related

Screenshot of the device screen Android from service

I am working on an Android application This application is a parental advisor application and it will be installed on the parents' phone and on the child's phone.
My question is how will the screenshot be taken from the boy's phone without his knowledge?
thats pretty high privilege, which need special permissions. you probably have to create AccessibilityService, but be aware, that Google Play may refuse your app from publish in their store. btw. you can't start this Service from the code, user must enable it in system Settings

Is it possible to access programmatically a default application from my own application?

I am new to android development (using Android Studio) and I decided to create my own application that would access programmatically the default clock application from an android phone (Galaxy s7) in order to set, update or delete alarms from that default clock app.
Is this possible to do or is it better to create an alarm component within my own application?
thank you
There's specific techniques that you can use to talk to another application on Android. Intent and ContentProvider are two examples.
The thing is, for that to work the app that you want to talk to must expose a public interface that you can call either by sending intents, starting activities or binding to services.
For the particular case of clock app i don't think that such public interface exists. You will need to implement your own alarm component.

How to Restrict access to phone's basic features, no one can uninstall my app, complete lock down?

Recently my employer asked me to build an app which is to be deployed on the field (for field workers) having features such as:
-when the phone starts the app should automatically fire up and no one is able to make use of other phone's features such as calling, texting etc.
Also, the app should be as such that it cannot be uninstalled.
Imagine a complete restricted access to phone's features except my app; a total lock down situation?
So, how really can I go about this? Will I need to build a whole new custom ROM loaded with my app? Or will I have to make use of app's "permissions" to lock down the system? Which is better?
Where should I start?
My app has to make use of SQLite, GPS, Wifi/2G/3G network and camera access.
Any advice would be appreciated.
Thanks
U can create an application which will be listening for Activity starting event. When u catch this event u can start your own activity. This activity will suppliant uninstall activity. To catch event - use logcat reading
or
If your are going to launch your own android phone, put your application in the android source, like the other native applications like Myfiles, Gallery. and
modify the source, so that in Settings --> Manage Applications there
is no entry for your application.
First of all I should say such a horrible plan
you can not prevent system to uninstall your application. According to your client's requirement you can only do one thing. That is to launch the application when the phone is started by using BOOT_COMPLETED intent filter

detect when user sets alarm Android

I am trying to execute an action when the device detects that the alarm is set by the user.
Does anyone know how I can go about doing this in code? Would appreciate any advice.
Thanks
There isn't a unified "action" the user performs that will set the alarm. It would probably not even be correct to refer to it as "the alarm", because the alarm is just another application. The user can be using the stock alarm shipping with Android (in the Clock application, I would guess?), the phone manufacturer might have bundled its own alarm app with the phone, or the user might have downloaded a 3rd party alarm application from Android Market.
I would guess that the only thing all those different apps could have in common, is that they in some way could use the AlarmManager class to control when the alarm should go off. But I don't think this is something you can listen to (and it is also lots of other apps other than alarm apps that also use the AlarmManager).

Android: Possible to start any activity of other apps from my own?

This is an Android noob question.
I am trying to start an activity of another apk through my own application. Now I know I can launch any other application and invoke its main activity. In many cases I'm also able to start subactivities, for example display it's settings dialogue.
However with some applications, for example Facebook or Endomondo I would get a FC everytime I try to launch some specific activity of their application.
Now I suspect that this is a permission issue and that the Facebook or Endomondo devs just don't want other applications to get access to their activities. But do I have to find out which activities I can use and which ones I can't use by trial and error every single time?
Plus: Is there any way around this dilemma? Maybe on a rooted device?
Cheers for any pointers.
As you already said you can only use activities of other apps which are designed to be used by others applications. Normally the developer of the other app define a set of intents and actions their app will be able to understand and process.
Using any other app's activity is by default not possible, this is by design of Android as every app runs in it own sandboxed process (there are some exceptions where apps can share a process).
So to use another app's activities you must know the intents it listen on. Normally this can be found in the applications website or documentation or on OpenIntents a dictionary for intents.

Categories