Make Phone Calls skipping dialer on Adobe AIR for Android - android

I am creating a android app on adobe air. I have a button in my app, clicking on which I need to call to a number skipping the dialer and once the call finishes I want the control to return to my app and record the call duration in local db. Someone please help me with code/links to the information.
Currently I am using following code to call the number which goes through the dialer,
navigateToURL(new URLRequest("tel:"+telNumber.text));

I do not believe that this is possible. The security model in both Android and iOS is pretty similar: an app cannot spy on another, peek at its data or direct execution. If you could do this, what would stop a malicious application from taking over the phone and doing bizarre things?
Once you leave your app, whether it be to jump to the browser, the maps, or the dialer, you have released control of the screen, and are now in the background with very limited execution capability.
It would be nice if the OS manufacturers opened up their systems more to have a clear API for controlling these fundamental apps. In particular the Apple dialer leaves much to be desired, but Apple bans any app that purports to be a dialer. Frankly the built-in dialers are not that clever, and it would be easy to imagine much better ones. Android is often customized by hardware vendors for this reason, and HTC, Samsung and others have their own dialers.
I don't even believe that the dialer programs agree on their data structures, so you would be on android chasing down 100 dialing programs and 100 different data formats, and for security reasons i don't think you can access the application private data.
I can imagine you would want to do what you are trying to do, but i think you are better off pursuing making your own dialer program, so you don't have to release control of the CPU to an unfriendly 3rd party program. Android won't stop you from making a dialer.

This is definitely 100% possible, I just did it (by using an ANE). Many apps have this functionality it just requires adding the correct permission on Android (to avoid security problems). Here is the ANE I used to skip the dialer and make an immediate call on Android in Adobe AIR: https://github.com/illuzor/Android-Communication-Extension-ANE (though specifically if anyone else tries using it, you must use AIR 21, using later version like 22 and beyond it did not work)

Related

How to provide the functionalities/features of an android app without the user having to explicitly install it

I'm trying to provide certain functionalities for an android phone that could help people in times of emergencies. (These functionalities are dependent on the phone's sensors.) The only/main approach to achieve this seems to be that of developing an app (and I am currently in the process of developing one). But, what concerns me is that the number of people using an application specifically for emergency purposes is quite low. Even if they do install, when "Insufficient Memory" pops up, an emergency app is very likely to be booted out of the phone.
Are there other ways of providing the functionalities/features of an emergency app, without the users having to explicitly install the app? Or should I just stick with the app?
Certain OEMs provide emergency features as part of their settings. Like for example, in a Samsung phone you can toggle to enable the "Send SOS messages", and then, in case of an emergency, press the power button thrice. In what way could I achieve the same?
Any help would be much appreciated...
Thanks in advance!
Without a proper application installed in user device, you cannot provide the functionality you want.
OEM's also have their applications build and packaged with the system image. If you want it, you need to be in contact with them to include your application in new devices.

How can I kill everything on my Android tablet except my app, and keep them all dead?

Please don't tell me what a bad idea this is. I am not using it as an Android tablet. It is the interface for a propitiatory medical system my company is designing. It's only function ever will be to control the system we are building.
That being said, how can I remove everything from the tablet and only run my app until the tablet dies or the standard firmware is reinstalled?
The tablet is being used exclusively as an interface control panel and CPU to my program which controls the medical equipment externally. I don't want anything else on the tablet. I don't want the users to do anything other than run my program on my equipment.
How can I lock the users into only using my program for the life of the tablet?
(I am building a system that happens to use an Android tablet to control it. Basically, I thought it would be easier to use a tablet, rather than design from scratch a system based on one or more microprocessors and which uses a custom designed and built color interface panel. If the doctors want to use an Android tablet for their offices, they are welcome to buy one.)
Thank you in advance.
Thank you all for your advice.
You will have to build your own version of Android if you wish to do this. For several reasons it is not possible to make an application that will do what you want and have it work on consumer devices.
Exactly how you need to go about customizing the OS build is going to depend on your exact hardware. But the simplest modifications will be removing the unneeded apk files from system/app/ and data/app/
AOSP and XDA-Developers are two great resources for learning the ins and outs of building a custom ROM.
If the device has reasonable power to it, you shouldn't need to worry about background processes.
If this is a consumer product, then it probably has the Google Apps suite and other related items, in which case rooting it and not installing those would be the best route. AOSP only runs processes that it needs to run Android out of the box.
Edit: You might just write the apps a Launcher and not allow opening other apps as the best route to accomplishing your goals.
You might need a custom ROM. It really depends on what version of Android your device supports. Check out the last in the list below.
http://www.redmondpie.com/best-most-popular-custom-roms-for-android-and-why-you-should-try-them-out/
I'm facing similar obstacles utilizing my business tablets. I want to restrict all the pre-loaded applications & only allow the tablet to be utilized for certain applications. White listed websites & such. I wonder if a 3rd party service such as ZENPRISE might offer a mobile management system that would take care of this for me?
zenprise

Is it possible to do all these on an Android phone?

I am wondering is it possible to do all these on an Android phone? Example, Samsung Galaxy S phone
To automatically launch a video clip upon phone start up i.e. from off position or phone ‘reboot’/’restart’
To run the video clip while the phone is idling
To launch to a particular wap site when interrupted
To restrict user from going to other portal other than the 3 steps above
To restrict user from running other application on the phone.
1) Yes but it may be hard to completely replace the phone's own screens and animation effects thus giving the smooth experience I think you're looking for. It's also pretty user-hostile.
2) What is 'idling'? If you mean standby, absolutely not. You'd kill the battery in 20 minutes in any case.
3) You can launch a website when the phone comes out of standby but it would be really annoying for the user. As for WAP .. I have no idea if you can view WAP on Android. Probably someone has made a viewer. I wasn't aware WAP was being used by anyone since some time around 2008.
4) Not without making your own custom build of Android and flashing it (very difficult technically). Sounds pretty evil for the user.
5) Again, not without making your own custom build of Android. You're reducing the phone to a brick pretty much with this stuff.
Yes, though it is user-hostile.
I have no idea what you are talking about.
I have no idea what you are talking about.
No, except by making your own firmware. Even by replacing the home screen, the user can boot into the Android equivalent of "safe mode" and bypass a replacement home screen app. You would need to have your home screen be the only one on the device, and your apps be the only one on the device.
See #4.
I will add only to question (1), since all the questions have been already answered. If you talk about replacing the standard boot and shutdown animations, then yes, it is very possible and pretty much any custom ROM for the SGS will let you do that. It's just a matter of assembling the sequence of PNG files you want. There are two image flashes before the animation, one is built-in in the bootloader, the other is hardcoded on the kernel.
Examples: http://forum.xda-developers.com/showthread.php?t=869347
You can do all these things, however you will need to flash a custom image - I assume you want to customise in-house handsets for a specific project, rather than have this as a generic app - I can't imagine normal users installing this kind of lockdown, and it sounds similar to an approach I was looking at for a project needing cheap PDAs with GSM connectivity.
If that's the case, and volumes are low, you might be better off targeting developer handsets, which can be bought through a publisher account on Android Market. I think this limits you to 10 handsets.
Hope this helps,
Phil Lello

Detecting Android Malware using Support Vector Machines (SVM)

I'm trying to develop an application capable to detect malicious application for Android platform using Support Vector Machines (SVM).
I can get many system information from "logcat" and "strace" tools but I don't now how to manage to detect real malicious applications.
Does anyone know how to stablish/record normal behavior use of the device using those tools, I mean, get information from the device and set a behaviour pattern.
Best regards
You will always have trouble determining malicious application behavior: Kymie M.C. Tan, Roy A. Maxion, ""Why 6?" Defining the Operational Limits of Stide, an Anomaly-Based Intrusion Detector," sp, pp.188, 2002 IEEE Symposium on Security and Privacy, 2002
But if you really want to try, perhaps the starting point is here: "Intrusion Detection Using Sequences of System Calls." S. Hofmeyr, S. Forrest, and A. Somayaji Journal of Computer Security Vol. 6, pp. 151-180 (1998)
I wonder, if this is possible ...
How do you want to rate whether a behavior is normal for an application? Do you plan a "learning phase" where everything a certain app does, is recorded (if that's possible without root access in the first place!) and then saved as the "profile" of "normal behavior" of that app?Say you record whatever behavior an application has, e.g. a tool to organize icons on the homescreen. Now say this application also offers the function to call one of your favorite contacts directly, it will need the permission to access your contacts and to make phonecalls. If this feature is hardly used, you would probably not record it during your "learning" period of this app and rate the app as malicious once it tries to make a phone call.And what if an app shows malicious behavior during the "learning phase" where you can't detect it because you haven't determined the "normal behavior" yet?
Sounds like the "normal behavior" has to be saved somewhere to rate an app before you install it and it starts acting weird or performs unwanted actions. But then again: what is anwanted for one user may be perfectly normal for another one ...
I'm interested in whatever fancy solutions people come up with, but I guess this will be a hard one ...
what if you use sets of malicious calls in Android first rather than profiling the normal ones.
Also, take note, if you're using unsupervised classification, it does not know what kind of data that it classifies
For Windows API usually people take a look on the sequence to determine their sets of actions.
You can find papers/researches done on that too for the Android platform.

why does the android os need to have apps running in the backround that are not ever selected

why cant android os be more like apple os on the the ituch/iphone? where the app doesn't run until it is selected. it is also closed; stays closed until it is opened again.
i think this would make the android phones run faster and more efficiently(battery would last longer).
A lot of Android apps (I think most of them) run exactly as you describe it - they have an activity that is closed or suspended as soon as you leave it - a suspended Activity only consumes memory and can be discarded in an instant. (iOS does nearly the same)
Even on the iPhone there are applications that run in the background, the most prominent example being Mobile Safari. The difference is that only Apple can write applications that run in the background without restriction, and that a regular user has no way of monitoring these background apps. (this has led to massive overcharging issues in the case of users leaving Mobile Safari on a page where streaming content was loaded.)
There are legitimate use cases where you need an app to continue running in the background (downloading, uploading, playing music, waiting for a VoIP call) - none of it was possible for a third-party to do it on the iPhone until iOS4, making applications such as Pandora or Skype nearly useless.
For good or ill, Apple consistently restricts what third-party developers are allowed to do on iOS devices (App Store policy, private APIs, specialized APIs for background tasks mentioned in point 3). On the other hand, Google seems to prefer that third-party Android developers have access to the same APIs as Google's Android app developers.
The biggest Android performance problem IMO is responsiveness, the fixing of which is a lot more involved than saying "no Apps in Background thx". (See http://android-developers.blogspot.com/2010/12/new-gingerbread-api-strictmode.html for more information)
An Android developer's blog explains the reasoning behind Android multitasking.
We did not want to require that users close applications when "done" with them.
Mobile devices … have fairly hard limits on memory use.
These competing constraints were a key motivation for Android's design.
The fact that you can see an application's process "running" does not mean the application is running or doing anything.
The articles linked from there also have interesting things to say on the subject
The RadioActive Yak:
When should your app include an exit button? The Short Answer: Never.
Wickenden:
One of the first things the naive but technically inquisitive new android user does is begin to wonder how all the things they are running should be “shut down”.
Google’s android system has been designed for multi-tasking in ways that allow programs to be ready to respond to a changed environmental condition instantly (an alarm to wake you, a notification that you have arrived at your destination and so forth) as well as actually “running” and consuming resources when needed. Additionally the android system itself is smart about how it deals with low memory conditions and is capable of completely blowing away applications in such a way that their state is remembered and can be restored when there is more memory.
Task Killers (whose behavior is radically clipped in Android 2.2 “Froyo”) actually can cause harm by destroying a process that other apps need to function correctly.

Categories

Resources