Native C# Android? - Android Q&A, Help & Troubleshooting

Has anyone seen this?
http://blog.xamarin.com/2012/05/01/android-in-c-sharp/
This could be the bomb... coding in C# for Android natively!! Even maybe some of the good developers here at XDA could make a C# native Android ROM with a Dalvik machine for compatibility with non-C# market apps??
They have made tests and it seems that C# ROMs run like 5-8 times faster and leech much less power ...
Cheers!!!

Java and C# is brother actually. Both have virtual machines, both came from C++. But creating a new variation of one of these is so unreliable. Dalvik is Basically Java's clone but not very succesful clone. Mono is C#'s VM's clone and very reliable. Linux, Mac and Windows has Mono Ports (actually windows has .net framework) Mono is great but you know microsoft doesn't like UNIX like systems especially linux based ones. Thus C# programming could be harder for people. Also C# for phones could be awesome. Since 2000's We already have javaVMs on phones. Why Not C#. (python is good too but google wants a new language called GO)

Repeal said:
...Mono is great but you know microsoft doesn't like UNIX like systems especially linux based ones...
Click to expand...
Click to collapse
I think the problem is much greater with Google since they won't want a M$ programming language in their OS ... and that's a reason for which I'm sure they won't never support C# Android, but another thing are community ROMs.
Let time judge it.. but I think its good stuff...

Not only they do not 'want', they probably are not allowed as c# has patents. Look what is happening to google with java now owned by oracle..

Related

Best Books/online classes

Any thoughts on the best books and/or online classes to learn Java and Android developing.
There is one Android class at a UC school by me but it is $650 for like 6 meetings.
Thanks
1) Best source to get started with Java: http://java.sun.com/docs/books/tutorial/
2) For Android, check out "Busy Coder's Guide To Android"
It's not free, but it's not expensive either ($40 for 1 year subscription and updates).
You get 3 books: basic & advanced Android, together with a tutorial.
If found these books very informative and it helped me alot during my first Android application.
Covers up to Android 2.1 API.
Big Java by Cay Horstman is an excellent book and the one my university recommends for our Software Workshop 1 (Java) module.
We're ranked 5th in the UK for computer science so we can't be that wrong
http://www.anddev.org/
Lots and lots of tutorials.
finally a forum dedicated to this...**** yes im excited. now i know what imma be doing in my spare time at school hahahah. i already was on the forums 24/7....
So, is it alright to step directly to android?
Or is it Java first??
I would say Java first...
Another good book: Professional Android Application Development
And don't forget the tutorials and sample code at http://developer.android.com/resources/samples/get.html
RationalGaze said:
I would say Java first...
Another good book: Professional Android Application Development
And don't forget the tutorials and sample code at http://developer.android.com/resources/samples/get.html
Click to expand...
Click to collapse
The first book above is now into it's second edition which is obviously the one, of the two, to go for given the rate at which Android is changing. I've just bought that & the last edition of Thinking in Java.
Two more great books, they are very good, from the basics up to professional. They are updated with Android version 2 so relatively new:
Apress' Beginning Android 2
http://apress.com/book/view/1430226293
Apress' Pro Android 2
http://apress.com/book/view/1430226595
Oh and Java books are not so mandatory because Android is not REALLY Java, it's Google's own implementation, the basics are Java, but almost
everything is possible without knowing Java and reading these books.
Chapell said:
Oh and Java books are not so mandatory because Android is not REALLY Java, it's Google's own implementation, the basics are Java, but almost
everything is possible without knowing Java and reading these books.
Click to expand...
Click to collapse
The principal programming language for Android is Java. What you mean perhaps is that Android doesn't use the common Java class libraries such as AWT & Swing, but rather its own.
To code effectively you must understand OOP, the Java language & Android's class libraries. There's no way around that.
cauli said:
The principal programming language for Android is Java. What you mean perhaps is that Android doesn't use the common Java class libraries such as AWT & Swing, but rather its own.
To code effectively you must understand OOP, the Java language & Android's class libraries. There's no way around that.
Click to expand...
Click to collapse
Yeah, I know that the programming language is Java. What I mean is if someone has knowledge about OOP and has experience with other programming languages (C++, C#, etc) there is no need to buy a book about Java. Just learn the syntax in 1-2 hour(s). During Android programming you'll be using the Android's classes almost all the time, so it's not the same like really programming some java app from the beginning.
Here is a good set of video tutorials targeted towards programmers that provides a quick down and dirty intro to Android programming and concepts.
http://android.voxisland.com/
I find the biggest challenge having never really learned Java much is learning the Android API. Coming from C the syntax is very familiar.
I am looking to start learning on my own and got this link form Andrew Web.
http://oreilly.com/catalog/0636920001690
Anyone have or heard anything about these videos?

[Q] Wine-like iOS emulation?

Hello All,
My question is whether the reverse-engineering of iOS's API is being looked at as an option any time soon. I would be interested in something similar to Wine (Wine Is Not an Emulator), which is a reverse engineering of the Win32API and allows you to run Windows .exe files natively in Linux or Mac OS. I am aware of iEmu (and it's unfortunate suspension).
However, my interest is not in getting iOS itself running on my phone, but instead I would like to run the apps themselves. I'm pretty sure there isn't currently a project on this. If there is, can you inform me of it?
If there is not, I would like to discuss the difficulty of implementing this. I could definitely be an aid in starting a project of ths nature.
Here are some things about iOS's apps I am unfamiliar with (I am aware that this specific section of the post may be more fit for the iOS forum):
Does the Obj-C code compiled for iOS resemble native ARM code (the iPhone chips are ARM to the best of my knowledge), like how C++ would be compiled, or does it resemble something more like C# or Java, compiled into bytecode that is executed by a library?
Compared to the size of the .NET framework or Win32API, how big is the iOS library?
Has a successful program been created that can run Obj-C code?
Would this have to be worked from the ground up (figuring out how Obj-C compiles in the first place), or has there been some effort already mounted similar to this?
I am aware of the extreme difficulty in implementing this. However, I'm sure this was thought while planning Wine or Mono. I'm not even suggesting this be made, but I'm simply asking on your opinion on the general difficulty (can it be done).
Thank you,
- κυριακος
kupiakos42 said:
Hello All,
My question is whether the reverse-engineering of iOS's API is being looked at as an option any time soon. I would be interested in something similar to Wine (Wine Is Not an Emulator), which is a reverse engineering of the Win32API and allows you to run Windows .exe files natively in Linux or Mac OS. I am aware of iEmu (and it's unfortunate suspension).
However, my interest is not in getting iOS itself running on my phone, but instead I would like to run the apps themselves. I'm pretty sure there isn't currently a project on this. If there is, can you inform me of it?
If there is not, I would like to discuss the difficulty of implementing this. I could definitely be an aid in starting a project of ths nature.
Here are some things about iOS's apps I am unfamiliar with (I am aware that this specific section of the post may be more fit for the iOS forum):
Does the Obj-C code compiled for iOS resemble native ARM code (the iPhone chips are ARM to the best of my knowledge), like how C++ would be compiled, or does it resemble something more like C# or Java, compiled into bytecode that is executed by a library?
Compared to the size of the .NET framework or Win32API, how big is the iOS library?
Has a successful program been created that can run Obj-C code?
Would this have to be worked from the ground up (figuring out how Obj-C compiles in the first place), or has there been some effort already mounted similar to this?
I am aware of the extreme difficulty in implementing this. However, I'm sure this was thought while planning Wine or Mono. I'm not even suggesting this be made, but I'm simply asking on your opinion on the general difficulty (can it be done).
Thank you,
- κυριακος
Click to expand...
Click to collapse
Hey and welcome to the forum's I would like to know this as well but I do not know any project and any that gets started and gains popularity gets chased down by Apple's legal team quite quickly. I have my doubts that this could happen (I would be glad if someone could prove me wrong) because iOS and its apps work on 12 devices and Android has hundreds of devices, most with different hardware. Windows apps are built for variable hardware, likewise with Linux and now Mac OS X. Sorry but as much of a pessimist as I seem I do not think it's possible but I'd love to be proven wrong. (Can someone at least make a frigging Windows Mobile runtime)

[Q] [Discussion] If Android was Written in C# Over Java

If Android was Written in C# Over Java
what was the benefits would it much faster ? could it have taken over iOS
would love to see you guys debate
xZain69 said:
If Android was Written in C# Over Java
what was the benefits would it much faster ? could it have taken over iOS
would love to see you guys debate
Click to expand...
Click to collapse
Afaik you need a .NET environment to run C#. I'm not a Linux expert, so maybe my statement isn't correct: I know that Linux's mono framework also supports C# code, bu tI can't say whethere there's such a framework for Android. Neither do I know whether such a framework wouldn't slow down everything just by itself.
It would be
As it turns out, the guys of Xamarin created an C# ported clone called "XobotOS".
I played a lot with the thought of compiling/patching it (it has been based on Android 2.3), but the definite downside would be, that no Apps whatsoever could be installed if not compiled.
As long as I do not have the time to investigate, whether it is possible to decompile apks and rearrange them with .NET IL code, this is no option for me.
Why would it be faster? Obviously the VM is a lot more mature than the Dalvik VM.
Google confirms that.
Greetings

Coding languages

Hi guys, can anyone explain to me why you can have different coding languages? I am going to try and explain it the best way possible. Pretty much I want to know why some people use other coding languages instead of others? Are some better for particular activities? Like I know cross compatibility like you can't use html to code a game online you need to use Flash or Javascript etc.
tl;d why use one language over another?
Every programming language has advantages and disadvantages. For example Java is portable but slower then, let's say, C++. C++ is less portable and needs to be compiled seperately for every OS but it's faster. Python is very easy and very portable but it's slower then Java. Html, Javascript and Go are for websites. PHP is designed for the use with databases. Prolog uses a completely different approach and is good for logical stuff.
You see, (almost) every language has its own field of application. Additionally, everyone has a favorite language for whatever reasons (e.g. because he thinks the code is pretty). So it's a matter of taste as well.
nikwen said:
Every programming language has advantages and disadvantages. For example Java is portable but slower then, let's say, C++. C++ is less portable and needs to be compiled seperately for every OS but it's faster. Python is very easy and very portable but it's slower then Java. Html, Javascript and Go are for websites. PHP is designed for the use with databases. Prolog uses a completely different approach and is good for logical stuff.
You see, (almost) every language has its own field of application. Additionally, everyone has a favorite language for whatever reasons (e.g. because he thinks the code is pretty). So it's a matter of taste as well.
Click to expand...
Click to collapse
Thanks for the high quality response.
As a beginner, someone who wants to start developing android applications..What coding language do you think I should start with? I understand android is basically Java?
Blakebn2012 said:
Thanks for the high quality response.
As a beginner, someone who wants to start developing android applications..What coding language do you think I should start with? I understand android is basically Java?
Click to expand...
Click to collapse
Well, it's Java with some extra stuff. That's why I would recommend starting with Java. It's portable, object oriented and you'll need it for Android later anyway.
When I learned Java, I used the Head First Java book which I can highly recommend.
Ok thank you very much you have been a great help.
Blakebn2012 said:
Ok thank you very much you have been a great help.
Click to expand...
Click to collapse
You're welcome.
There's different languages for different things, like Java vs. C++ (Java is portable/cross-platform, pure object-oriented, has automatic garbage collection, etc; C++ is platform dependent and needs to be compiled on each environment, wasn't built from the ground up as OO, you need to allocate and manage memory yourself, etc. Java isn't quite as fast/efficient as C++ but it's come a long way from it's beginnings and is pretty close now, for desktop apps IMO anyway.
Then, for web development, there's Python and PHP. Both accomplish the same thing (doing back-end logic for websites, like querying databases so the data can be displayed on the page) but have different syntax. People like either one for different reasons and it's mainly just personal preference when it comes down to those.
So to answer your question, the difference between some languages is pretty great (like assembly and C#) and they're used for different purposes. And the difference between others, like PHP and Python, is for the most part superficial and it's just personal preference between the two.
The main reason we do have programming languages is that working directly on the bare hardware is pretty difficult. Working directly with machine code is difficult in many ways: it is hard to be kept bugfree, even harder to be read and understood, and there is also the problem that it's only working on a specific machine. Programming languages cope with those problems by introducing programming paradigms, which make several things easier, but it turned out that there is no paradigm which covers all needs. C/C++ for instance makes it possible to work pretty close to the machine while producing quite readable code, which can be ported easily from one plattform to another (compared to using assembly language). In contrast Java introduces a Virtual Machine on top of the actual system such that it's even a lot easier run code across several systems (compile it on one machine, run it everywhere ... as long as a JVM is available), and it brings the object oriented paradigm with it. Furthermore there are declarative languages for database programming, functional programming languages or logical programming languages for mathematical problems around, and so on ... . Sometimes you might not be interested in writing understandable portable code, such that assembly language is your best pet, but that's most probably not true in most situations.
123123132
Really good compact responses. I also want to recommend learning some shell programming, i.e. linux terminal programming for file/process management and low-level hardware manipulation in the kernel. Shells are usually mksh, zsh, bash, busybox ash, or symbolically linked to sh. This is known as a scripting language because you can run your programs/scripts on-the-fly without any compiling. Adding some shell scripts to your java app can make it very powerful such as with apps like trickster, synapse, performance control, etc., .. basically any kernel/hardware control apps.
Also you can try Ruby language. Its great for some everyday tasks, very simple and powerful(especially string processing). Also Ruby On Rails is very simple framework for web-developing. A week and you can try to code your own github. And the IRB console is good enough. But i duuno, is there any mobile-app-dev modifications of Ruby. Anyway, its still great enough.
Blakebn2012 said:
Hi guys, can anyone explain to me why you can have different coding languages? I am going to try and explain it the best way possible. Pretty much I want to know why some people use other coding languages instead of others? Are some better for particular activities? Like I know cross compatibility like you can't use html to code a game online you need to use Flash or Javascript etc.
tl;d why use one language over another?
Click to expand...
Click to collapse
That would be perfect, if we lived in a place where only one language is enough for all works XD
However, the really life isn't perfect.
Some works need complicated language to achieve and some don't.

Writing in C++ for Android

Hello,
I'm looking for an easy way to write android apps in C++. I'm a begineer and I would apriciate a simple, easy to use metod. How can I do it? (Note: I don't know Java).
Regards,
Igor
Anybody?
You should start doing tutorials first if you have no programming experience. There are a lot of good resources available on YouTube. Search for Bucky and C++. Once you get the hang of it, you can try making some simple stuff.
Put coding programs for android to the side for a bit. Just try to master the language of c++. And then figure out how to code the grograms
Maybe you can start by developing with Qt on pc and then progressively switch to their Android framework .
Phurkus said:
Put coding programs for android to the side for a bit. Just try to master the language of c++. And then figure out how to code the grograms
Click to expand...
Click to collapse
Like this person said OP. Just master it first
In addition of what had been say and which is true, if you're targeting Android specifically, you should learn Java.
If you're going to dev, the language is not really important, when you master three language or more, you should be able to quickly master other needed languages. You should also read a bit about Algorithmic and Objects.
hi
First you need to know JNI,How to call function from c on java and opposite and Java is require !!!
go here : qt.io
windows , android , ios , osx , Linux and more
Definitely take a look at JNI. And this https://developer.android.com/tools/sdk/ndk/index.html
Sent from my XT1254
Is there some kinda ebook for it? ?
Dhruvam said:
Is there some kinda ebook for it? ?
Click to expand...
Click to collapse
Probably, there are ebooks for all sorts of things. Just be sure to understand you won't be able to write Android application in C++ (ok, you will be, but the struggle to call JNI won't be worth the effort). So do you want to learn C++ or to write an Android app?

Categories

Resources