I have downloaded Android 4.0.1_r1 source code to my local system. I'm working to understand building own custom Android ROM and modify it according to my requirements.
I went through a number of web based tutorials on how to build custom ROMs for Android and I am clear with the overall process. What I'm essentially looking for is a well defined structured way of removing packages that are downloaded along with the source code but not needed for my own version of the build.
Additionally, it would be helpful if someone can provide me links pointing to building android source (guides,books or tutorials) as most of the available resources are based on creating Android APPs using Android SDK and the application framework. Its difficult to find any decent indepth tutorial explaining the entire architecture , source tree and different build guidelines for platform level developers.
This is a good book, but it's not officially out yet (you can get the first few chapters only).
There is no real documentation, but if you hang out with CyanogenMod forums/IRC long enough you can get some insights. You can also ask questions on the official Google Groups, android-porting and android-platform should be helpful. Reading XDA can be helpful too, if you can filter out all the noise.
Generally, the whole thing is quite complicated, and there are parts that are device specific. The only thing that you can remove more or less safely without modifying things (much) are the bundled user-level apps (Calculator, etc). Even some of those may provide some system-level services, so you should watch out.
In short, buy the book, read the groups and ask more specific questions, like 'how do I modify X in order to do Y. I tried Z and it didn't quite work.
In addition to the answer, this is the closest I got to find a suitable information for modifying packages in the source code before building. It also has a decent information for memory optimization.
http://processors.wiki.ti.com/index.php/TI-Android-ICS-MemoryOptimization
For removing packages please refer to the section
Run Time-Volatile Memory Customization
subsection - Customizing Android Product Package
The article pertains to Froyo , but the concepts are pretty much the same Android 4 ICS.
I have added this for anyone seeking reference material on the same.
Related
I am very new to React-Native and love it so far. Really great technology and very impressive tooling. I would like to propose it for use in my company.
However ... react-native examples demoing code-sharing btw Android and IOS platform are simply nowhere to find??? All I have found after 3-4 weeks looking into it is few excellent but only IOS examples. Below, are just few examples of articles lacking this. Although some of them claim in their title to cover both, they cover only IOS:
https://www.raywenderlich.com/165140/react-native-tutorial-building-ios-android-apps-javascript
https://mentormate.com/blog/react-native-components/
http://www.andevcon.com/news/take-a-crack-at-react-native-with-kyle-banks
https://appendto.com/2016/11/build-a-coffee-finder-app-with-react-native-and-the-yelp-api/
https://reactjs.co/react-native-convention/
https://www.lullabot.com/articles/build-native-ios-and-android-apps-with-react-native
https://code.facebook.com/posts/1189117404435352/react-native-for-android-how-we-built-the-first-cross-platform-react-native-app/
https://medium.com/#MentorMate/best-practices-for-building-an-app-with-react-native-components-7dee3b2b010f
https://code.tutsplus.com/tutorials/creating-a-dictionary-app-using-react-native-for-android--cms-24969
http://facebook.github.io/react-native/docs/tutorial.html
... , this list could continue on and on but it should be enough to demonstrate the lack of good resources I'm talking about.
I understand react-native is cross platform in terms that you can write code for both Android and IOS, that is all clear and great.
But is it sharing the code? In other words, is it DRY? From what I see, it is write once for each platform rather than write once for all platforms. Again, I understand some Views (but not all) are platform specific but again, there is no example to show even that on both Android and IOS in the same project.
Where is a non-hello-world (real life) example to clearly demonstrates and teaches how to do that? React native used to have it in version 0.20 or so but it was removed and replaced with a HelloWorld example? Seriously #Facebook???
As per links above, lots of React-Native articles out-there are titled to cover both platforms but then they only talk about IOS without even mentioning any other platform? Very few talk about Android only, again, not even touching other platform in the same project. ... and lots of them are outdated!
I understand that the technology is very new (and very good from what I have seen so far, I really love it).
But assuming I have to propose React-Native as a next-gen platform to a company, I do not see any convincing cross-platform, code-sharing examples demoing this for both Android, IOS (UWP??) that I could help me learn, understand, build, and demo an example for that proposal.
I am not looking for chatty comments or links to courses but rather examples to show how to do this in more than just CRNA generated HelloWorld app.
Found the answer here https://www.codementor.io/vijayst/build-react-native-retrofitting-ios-app-to-android-gsf5uyl1q in the very 1st paragraph and it is exactly what I have been trying to get RN/Facebook answer but they ignored the question all the time.
Very disappointing!
So, ReactNative is not "build-once-use-everywhere" but rather "learn-once-use-everywhere" meaning lots of code duplication. And by everywhere, they mostly mean Android and IOS although the examples out-there are mainly IOS. If they cover both platforms, then it is with almost no code sharing but lots of code-duplication.
Although, RN claims they can achieve up to 90% of code sharing, that is not demonstrated anywhere that I could find. Documentation is very shallow in touching anything let alone topic of code-sharing and the tutorial provided by RN is a HelloWorld, ... yes, seriously. Sad! Although they used to have a better tutorial in older version (like 0.20 or so).
In terms of recommending RN to a company as a next-gen platform, I see few issues
concerning patent license, no answers no explanations, very obscure and concerning for a company that would consider moving to this, I'd rather say open-source under quotation marks. Hopefully this will change as I see it as a mayor showstopper for anyone considering adapting this technology. I would say this is no more applicable as FB made react-native licensed using MIT as per https://github.com/facebook/react-native/issues/16079
documentation that is very basic without giving depth of explanation. For example, this is react-native site with demo sample to demonstrate code-sharing cross-platform nature (I warn you, it is a HelloWorld example) https://facebook.github.io/react-native/docs/tutorial.html
React Native Community facebook page which is the page where you are supposed to find help and ask question as per react-native site will simply block you if you bring this topic on and will not let you in
even here on SO, questions like this (after extremely thorough and time consuming research) will earn you only downgrades and zero answers or even attempts
examples lack clarity and depth of explanation, it seem like whole community follow one pattern, copy / paste demonstrating code-duplication rather than code-sharing
Most examples cover (to most basic extent) only IOS although most claim cross-platform nature on both Android and IOS with Android being mentioned in the title only and the body covering only IOS
Impossible to ask for help on react-native site
Impossible to suggest improvement on react-native site other than create pull request. In other words, they want you to work for them for free
The framework is cross-platform, that is great but it is more of a copy/paste (copy from IOS into Android, then modify what needs modification) rather than code-sharing strategy. Every example I was able to find and it took me a month, was a violation of DRY principle in its best form
Although I mentioned things that bothered me at most during my research, I have to say that I hope this technology will thrive and become clear open source platform in future. I really like it and hope someone at #Facebook / #ReactNative will consider these suggestions, or at least provide improvements in the documentation, examples, access to community, place to ask questions and get help, clear licensing, ... all of which I was not able to get after spending a month researching RN.
Perhaps the technology is still not mature enough, which makes sense, it is very new.
Would I recommend it?
To developers yes, definitely. I really like it myself and will spend more time studying it.
To a company? Not really for the reason explained above.
UPDATES - Getting Better :):
... and to add my 2c to anyone who faced the same problem and contribute to community (at least in terms of finding tutorials that talk about both IOS and Android), I will keep posting links I have managed to find so far:
https://differential.com/insights/sharing-code-between-android-and-ios-in-react-native/ is very basic example. Not really code sharing but rather code duplication but at least something
https://www.codementor.io/vijayst/build-react-native-retrofitting-ios-app-to-android-gsf5uyl1q, also more of a code copying rather than code sharing but hey... going somewhere
https://hackernoon.com/getting-started-with-react-navigation-the-navigation-solution-for-react-native-ea3f4bd786a4 another good one
This document explains that RN philosophy is "learn once, write anywhere" rather than "write once, run anywhere" http://makeitopen.com/tutorials/building-the-f8-app/design/
I found this Image on the web and want to use a such list in android. Do you have an idea where I can find a such List in Android Studio?
There are certain lists that others have provided as free source code to be used within your applications. What you have discovered is not a built-in feature of Android (the IDE has not relevance on this).
You can however find resources to use a wheel such as those. One of which used in the past has been from the android-wheel code. Most will demonstrate examples and provide useful tips on going forward with implementation. But you can find others if you look hard enough.
I am new to Android but not to programming. I have taken C++ in school and we have been taught how to create objects, but not how to build robust programs using multiple objects. So you can see that using java to build Android apps leaves me with questions.....
thinking like an object oriented programmer, do i just shop through a list of classes until i find ones that i think would suite my app
is there a definite method of choosing the best classes for your project
do i find an app similar to the one i am trying to create and try to find what classes they used
any thoughts appreciated!!!!!!
The best way to learn (for me, at least) is by making small incremental changes to an example so I can how all the various elements of it work.
Download the examples (listed here) - but accessible from your AVD and SDK manager tool from within Eclipse (Window -> Android SDK and AVD Manager).
Start by modifying those examples. They are the best possible examples you can get for much of what you will want to do.
I'd recommend you start with Tutorials and also read about Application Fundamentals - they should get you started. Also browsing Classes is useful if you like wading through lots of technical docs (I do). Those three links are definitely worth looking at.
Well first when building Android applications you need to:
Figure out what your application will be, and how it would work.
Next you would need to find out how you will implement the android classes.
i would recommend first reading a book on Android development. One that really helped me and made me an advance developer was CommonsWare
You should really get these books. When you finish you will be well on your way.
New to Android. Trying to find docs that show what Android classes expect to elicit changes. For example, to make a keyboard always visible, I could find some info searching Google, but not directly in the docs of the SDK. Is there a source for more comprehensive docs on how Android works not just from the individual class level, but how it boots up and what to do to make small tweaks for an app.
I don't know if this would be what you're looking for, but here's some information on packages and classes
http://developer.android.com/reference/android/inputmethodservice/package-summary.html
I've been teaching myself Android for about a month now and the best reference I've found so far is the Android Developer site, especially under the References and Resources pages.
Hopefully that helps a little bit. Sorry I couldn't be of more help.
This might sound like a stupid question, but google didn't help me.
Is there a JRE available for Android? If so which version is it? Are there any major features missing?
If not does that mean all java apps need to be recompiled for Dalvik to work on the Android?
Update; Will there ever be JRE available for the Android?
No, there is not. Google did create a completely different runtime for Android, where the base classes are completely different ( albeit compatible )
It uses Java as the language ( syntax ) but not the Java platform.
You can learn about the Android platform here.
From that page:
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.
Read in bold "most".
So, although they look similar, they are not the same.
The closest I've found is http://www.apogee.com/products/cjre-a
Unfortunately as stated on that page:
Note that Apogee temporarily suspended further development of CJREs+A
in June, 2012, because of insufficient demand for them. Please,
contact Apogee if you are interested in a CJRE+A targeted at a an
Android-running device of your choice for "volume" distribution to
your customers and/or other third parties.
...and a download/demo is nowhere to be found.
Taken from their products page http://www.apogee.com/products it does sound like it would have been a great thing to have:
CJRE+A - The “CJRE for Android” is suitable for devices running
Android v4.x or higher, which need to execute the Java SE 5 and SE 6
applications in addition to executing the Android applications.
We can still dream. I have not contacted them. I am aware of many companies that are looking for this functionality. I can't imagine it will dwindle all too fast (or let's say slower than flash)?
I have not reached out to Apogee, might be worth a try...If anyone ever finds a solution, please keep us updated! Thanks.