1

I'm making an Android app that is used as POS in some business. In order to gain attraction the app is given with the phone, an Internet line and the app. I want to restrict phone calls, whatsapp, SMS and so other. I want the phone to boot directly in my app.

I was looking into Cyanogenmod but couldn't find any information on how to do this.

I mean, isn't it my hardware?

EDIT I'm open to use other OS.

My device is a Samsung Trend initially.

I've read that you can replace an .apk and start your own app instead of the android menu (I know the user can then change the .apk, so still, it seems the better solution, anyway I couldn't find any information on how to do this)

user1532587
  • 993
  • 1
  • 14
  • 39

1 Answers1

1

I'm not 100% clear what you're asking for (you're giving away an entire phone with your app!?) and you didn't mention the phone model or Android version you are using, but there are apps out there which allow you to restrict a phone's ability to run or access certain features. (To find more, just search the Google Play Store for "kiosk".)

Android 4.2 on tablets introduced multiple user accounts, which were expanded in Android 5 Lollipop to phones with "profile accounts", which can be used to restrict access to apps and services. Screen pinning is another feature you can use to lock a particular app to the screen so that it can't be removed without entering a password.

It is your hardware, and as such you can also take more extreme measures by modifying the Android frameworks directly to restrict functionality, by say, removing the dialer. But if you're actually giving away phones with your app, there's always a possibility the new owner will restore the functionality and/or replace the ROM completely.

fattire
  • 6,823
  • 3
  • 25
  • 38
  • modifying the Android frameworks directly? do you have any information about that? – user1532587 Jan 26 '15 at 20:58
  • If you are using CyanogenMod (or any open source AOSP-based Android rom), you have access to the frameworks code, such as the CM code [here](https://github.com/cyanogenmod). You can clone this code to your computer, build Android, then make whatever modifications to the framework you wish. Also, projects such as [xposed](http://repo.xposed.info/) have pre-manufactured modules to enhance (or restrict?) default functionality. But again, if you are giving away free phones, which I don't quite understand, there is the risk that your users will modify the phone to restore disabled functionality. – fattire Jan 29 '15 at 01:36
  • Reading your edited question regarding replacing the (launcher?) .apk-- yes you can do that, but your users will be able to download an alternative launcher or put the .apk back in /system.. I still feel as though you're not fully explaining the situation so that we can best propose solutions. What kind of app comes with a free phone? What is the kind of scenario are you talking about in practice? – fattire Jan 29 '15 at 01:41
  • I'm making an app that is used as POS in some business. In order to gain attraction the app is given with the phone, an Internet line and the app. I want to restrict phone calls, whatsapp, SMS and so other. I want the phone to boot directly in my app. – user1532587 Jan 29 '15 at 14:55
  • I see. Well if the phone is being truly given away (as opposed to rented or something) and there is nothing contractual to keep them from doing whatever they want, it's going to be very difficult to restrict them from "freeing" the phone if they physically own it. You can make your app to run at boot and make it difficult for them to use the phone for non-sanctioned purposes by using built-in-Android controls or via more radical changes to the framework itself. But if *you* were able to change the device, and they own it now and are technically sophisticated enough, they can change it too. – fattire Jan 30 '15 at 23:19
  • Also, I believe Uber drivers use free/cheap phones which can (theoretically) be used only for the Uber Driver app, yet people are [hacking](http://sfist.com/2014/07/30/uber_still_illegally_working_sfo_al.php) the app to put them at [an advantage](http://uberpeople.net/threads/i-hacked-the-uber-phone.3439/). Android is largely open, so unless you sign the bootloader/kernel/OS, AND have perfect security to stop rooting and/or flashing modifications, it may be difficult to do what you're asking. iOS has this issue with jailbreaking too. Which is fine cuz after all, isn't it their hardware (now)? – fattire Jan 30 '15 at 23:30
  • Ok, so I'm just borrowing the hardware, it is still mine. I don't care if they flash / root / whatever. That would be the worst case scenario. I just need my app to boot instead of the normal Android menu. Do you understand what I'm trying to do? – user1532587 Jan 31 '15 at 00:43
  • 1
    If you mean you want to replace the launcher with your app (or with another "menu," meaning another launcher), you might add [android.intent.category.HOME](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_HOME) to the intent-filter in your AndroidManfiest.xml file. And to compare your app with a complete launcher, check out CyanogenMod's launcher replacement for stock, [Trebuchet](https://github.com/CyanogenMod/android_packages_apps_Trebuchet). Good luck! – fattire Jan 31 '15 at 07:47