There is an android application I am planning to write, that will be used as an "always on" application (kiosk-mode) used on Android tablets running restaurant menu. Today, I already have a rudimentary application, but it is not quite what might qualify as kiosk-mode, since sometimes users close the application.
I wanted to see if there is a way to monitor the application remotely (or on device itself) and automatically restart it, s.t. it comes the foreground application ?
Of course, I'd prefer to remotely monitor for some remote customer service. It is not exactly essential to view (in remote desktop / vnc sense), but gather information like application health (running in foreground or not), get it's logs etc. Now I understand that on an unrooted device an applications log is not visible to other applications. So I was wondering if I could design my application to create light logs or status information, in a non-standard way, that could be shared by my other monitoring application.
While I get a feel that I am reinventing the wheel, since requirements like these seem far-from-unique, but in my search haven't found much beyond the standard 'screen cast' / 'screen share' applications... most of which either don't work too well (especially without root), or need one to jump through hoops to get them working.
There are ways to monitor activities of your application. There are utilities available to help you keep logs of events carried out by the users of the application. Like getting statistical information. They are typically Mobile Analytics tools.
Check this for instance: https://mixpanel.com/
This for example can help to keep track of events fired by the application. You can even send mails and notification to the users. There are similar tools available. For instance Google Analytics for Mobile Apps
The other possibility is to use Google Cloud Messaging. I believe this is even more powerful, which may help us to control our application to some extent. You may find this of help: http://hmkcode.com/android-google-cloud-messaging-tutorial/
Related
I am working on an Android enterprise application that targets limited mobile devices which help owner to track the user/device status (like GPS, Calls logs) remotely. I managed to implement these basics features to my application. Challenge that I'm facing now is the end users who traveling away with the device can force stop the application or can revoke some permissions(above Marshmallow) to prevent them self from being tracked remotely by the owner.
First of all is it possible to make such an application?
If yes, what are APIs given for such applications development?
Note - All the targeted devices are rooted anything I can get advantage of that.
Is there are any special APIs available for developments of those applications which work only on Rooted devices?
According to your requirement i will suggest you to look deep into the android Service.
As You might also have a look on the persistent service,
You can only make your service persistent if you are developing system apps. This service is basically unkillable.
Here is some write up for persistent service
Hopefully this might help you.
But for non-system applications, startForeground is your best option.
I am new to android development. I came to know that Intent and Intent filters can be used to share data among applications but I wonder if it is possible to design an android application which can extract some specific information from other applications while running in the background. For example, if the user is using whatsapp it may get know the call drop rate or if a video is being played at user terminal in YouTube, Facebook or Netflix, it will get buffer playtime, video bitrate etc. I will be very grateful if answer to this question is provided with an example.
No, mostly no.
However, as wrote Tim Castelijns, if the 'target' app allows it, like via a content provider, its possible.
On a rooted device, after long hours of reverse engineering the targeted apps, it MAY also be possible to get some info. Only from rooted devices too.
Other case is you write several app and design that they can communicate together, like via intents, content providers.
There is also possible to get the list of running apps (user must permit it)
In Android, each application is running on its own "sandbox" that is supposed to be isolated from the rest of the applications running on the device.
In order for an application to communicate with other applications, the Android framework supplies several mechanisms to send/receive data to/from other applications: Intents, IPC (AIDL), Content Providers etc...
Each application that wants to expose its data to other applications on the device needs to implement an interface using one or more of the mechanisms described above.
That means that if an application doesn't implement an interface to expose its data or inner workings, it won't be possible for another application to access this information.
Keep in mind that some applications choose to save some of their data on publicly available disk spaces (i.e. a camera that takes pictures might save them on the SDcard that is accessible by all applications). In that case, if you know what to look for, you can tell certain things about certain applications.
In addition, the Android operation system exposes the states of several global settings such as: Device's connectivity state, Battery state, currently opened Bluetooth interfaces, running applications, last executed apps etc...
This configurations might give you an overall idea of what is happening on the device.
As indicated in other answers, you're mostly limited to what apps will explicitly make available to you; in fact, well-engineered apps will generally try to prevent "information leakage" beyond what they actually want to make available.
Some other people mentioned Content Providers but the one other construct to look into is Broadcasts. If an app broadcasts an intent locally (i.e. is using the Local Broadcast Manager) you won't be able to see it but if they're using a "system-wide" broadcast or receiving another "system-wide" broadcast you can receive the same event.
In Android, I want to know if I can receive the event whenever I open Android Message Application?
I tried get task in foreground but that didn't work in service as for that service has to continuously poll
Kindly guide
The only way you can achieve this is by polling. No other way :(
I can receive the event whenever I open Android Message Application?
No.
First, there are thousands of Android device models, spanning hundreds of manufacturers. There are dozens upon dozens of "Android Message Application" pre-installed across the device models, as manufacturers often provide their own. There are also hundreds of "Android Message Applications" available on the Play Store and elsewhere. You have no great way to know what apps are and are not "Android Messaging Applications", though you could try to examine <intent-filter> structures and deduce which ones might meet your requirements.
Second, there are no events posted to ordinary Android SDK apps when other apps or their activities start. Even some of the polling techniques that you mention will not work on Android 5.0+, and any that still do work represent bugs that should get fixed. Google is locking down this information for privacy and security reasons, such as to help prevent OAuth hijacking attacks like this one.
I'm new to the Android platform. Apple requires every iOS app to ask for and confirm push notifications, but I have not noticed any apps that I've downloaded on my new Android phone prompting me if I want to receive push notifications. It just automatically registers me for them. Is this normal Android convention, to automatically register users for push notifications, assuming they can disable them later?
In my own Android application, should I be prompting users and asking if they want them before I register them? Obviously it would be the polite thing to do to ask permission before signing them up for push notifications, but if that's not common practice I see no reason to potentially lose some receivers of them.
Making decisions for the user is actually a strong Android guideline. Here is a list of the "Android Design Principles", written by Google. As you can see "Decide for me, but let me have the final say" fits the behavior that you've mentioned.
Some things to keep in mind when discussing Android notifications:
Users can disable your app's notifications in their OS settings. If they really don't want to hear from your app, they'll disable notification's there.
User context. You don't know what context the user is installing your app in. Users who are on a crowded train, relaxing on their day off, hanging out at a friend's place, or maybe waiting for a flight, all want different things out of your app at the time of installation. The guy on a crowded train is going to want your app to work immediately, with very minimal setup, while the guy relaxing at home may not mind a long setup process.
Your setup process can have a significant impact on your user retention. This Forbes article briefly discusses intrusive setup forums and their impact on app uninstalls.
At the end of the day however, it all depends on the needs of your audience. If you're targeting professionals, then they might be willing to put in some extra time up-front if they believe your app could help make their job easier. If you're targeting a casual gamer, you'll want them to get in and rolling as fast as possible. It's up to you to decide how best to serve your audience.
Here's a video from Google I/O 2013 that discusses the Android Design Principals in greater detail.
Hope I was able to provide some insight.
Sadly, it does not appear to be a very common practice. I've installed several Android applications that will randomly give me a notification in the middle of the night. I've recently made a new habit of disabling notifications for every new app that I install unless I really want notifications from it. I think your application would result in a much better user experience if you prompted them for notifications. You could also offer configurations for which notifications they wish to receive. If other apps were like this I might choose to receive some notifications instead of globally turning them off.
I would like to know if there is a way to lock (prevent) an application from starting.
And i also would like to know if there is a way to prevent a service(application) from starting at boot of the device
...i would like to know because i would like to create an anti-malware app.
I know this question is old, but for others stumbling over it:
Autostarts is an application that can disable apps from starting at boot time. It's the best I've found to do that (it isn't resident and doesn't kill processes like a task manager, it actually parses apk packages and reads registered actions and blocks the actions you tell it to). BUT it needs root and hasn't been updated for a while (december 2011). It works on Android 2.3 on which I tested it. Because it was discontinued, I don't know if it works on newer OS versions.
It's commercial now, but that's not the point, you need a peek at the source code.
If you search a bit, you'll be able to find the source code for an older version and see how it implements the blocking system.
I would be very interested in an application that could block certain services. NOT kill, but prevent them from starting in the first place. And the list is quite big: Facebook (OrcaService, MqttPushService, MediaUploadService, BackgroundDetectionService), Twitter, Maps (NetworkInitiatedService), Yahoo Mail Sync, etc. I don't use the features that the services provide, I even disabled some of them in the app interface where possible, but they still pop up and remain resident after exiting the application.
I would like to know if there is a way to lock (prevent) an application from starting.
Not in any supported fashion. Anything that does this is malware, and the techniques for doing it are security holes.
And i also would like to know if there is a way to prevent a service(application) from
starting at boot of the device
The user can boot their phone in safe mode (I forget the exact process, but it's something like holding down the HOME key while turning the phone on).