This is gonna be a long op, I dunno where to start...
Sooooo... a while ago a friend (@tdunham) asked if we could share a settings app we made for our rom(s) (future rom(s).... as we are lazy bums). Since we mostly aimlessly wander around xda and help other devs instead of releasing our stuff, we figured... what the hell, we might as well make it into a source code project in a java-unexpirienced-dev format. So here we go!
About the project:
- This app has a main function of coordinating content resolver entries between user end (your rom control app) and mods end (when you use content resolver to reitrieve settings storage database entry keys in various modded system apps).
- Basically, you create a preference item, such as switch preference f.e, and when the user switches it, an entry is being overwritten in Settings.System. From there, your modded apps, according to your mods, can read the value and do some stuff...
- Needless to say that this app requires, among many other things, your ability to mod system apps to use content resolver. If this doesn't mean anything to you, you're in a wrong place.
If you wish to learn more about modding smali using content resolver, you need to first get introduced to 2 amazing threads:
1. Creating and Understanding smali mods by @Goldie - if you are not fluent in that thread, you will not need this app.
2. Galaxy s5 unified mods and guides thread by @tdunham - not all guides there are using content resolver, but lately more and more are. In any case it's a great place to ask questions, learn and contribute.
Nuff said about modding, now to the project
- The project is a source code project. Meaning we are not providing an application and you will not be using it by decompiling it with apktool. There are so many reasons for that that I don't know where to start. Mainly - it's bad enough samsung has made hackers out of all of us and we need to decompile and backdoor their system apps to mod them. What we can provide in source code - we will. We strongly believe in the freedom of code and we share it unconditionally (almost).
- Now what is that "almost? part? Simple... You do NOT need to credit us in any of your work, you do NOT need to thank us, you do NOT need to ask permission to use this project in your rom, you also do NOT need to donate to us (you also can't, we don't have a donate button). YOU DO NEED TO RESPECT THE FREEDOM OF CODE! That means that this code is given to you under the GNU GPL (General Public License). You can review it fully here.
The most relevant part to our discussion is as following:
...For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights...
Thread rules and disclaimaers:
- The code is 100% original and written by us (myself and @wuby986) for this specific project. All the classes imported from public open source repositories are annotated with original developer signature and our modifications are annotated and dated as well.
- To answer most asked question so far - we don't know how it is different from a custom settings app by ficeto. We have never used it in our roms and we have nerver seen it's code (neither have you). Both apps share the same idea of integrating preferences into settings db using content resolver. You are free to use any app you like. We are not saying which app is better or worse. This is seriously not a competition.
- This project requires extensive knowledge in android development. As mentioned above, if you don't know how to mod system, this app is of no use to you. We will not be answering questions about smali mods.
- This project requires basic knowledge in operating android studio. You need to have it installed and operational in order to work with the code. You need to have android sdk and all the support libraries updated.
- This project requires SOME coding expirience or AT LEAST an open mind to getting a crash course. You will not be required to do heavy java lifting to use this app, but it would help if you knew alittle bit.
- We cannot teach you how to use android studio, debug problems related to it and so on. We will provide basic instructions as to how to add items to the navigation drawer list, how to add preference fragments with ease, we will explain the idea of out code and different preferences to you. Beyond that - it's on you. We cannot and will not teach you to be a programmer. If you want to know more - the web is wide and google is your friend.
- We cannot debug your code problems. This thread is for development discussion related to the project itself. If you need some requests, questions regarding exsisting code, remarks, improvements, you're more than welcome to join a github project and commit your code for everyone's benefit.
Nuff said about rules, moving forward:
- Github source for the Rom Control application is here
- Github source for the template to add preference fragment for this specific app is here
- Download and install Android Studio and android sdk for your platform. Make sure all are updated
- Go to the preference fragment repository and download the master as zip. Extract the zip contents into /your android adt directory/android-studio/plugins/android/lib/templates/other/
- Reopen android studio
- File > New > Project from Version Control > Git
- The git repository is https://github.com/daxgirl/CustomSettingsForDevs.git
- Specify your parent directory and directory to contain the project (will be suggested by studio)
- Clone from git
- Done you have the project on your pc. Wait for it to sync and build gradle.
The next couple of posts will explain extensively how to operate the app and create customize it to your rom's needs.
[App][Code project][5.0+]Rom Control app for devs, App for all devices (see above for details)
Current Stable Version: 1.0
Last Updated 2016-04-12