universal programming language for android, iphone and windows phone - android

Hey I am going to write an algorithm for my android application.
Now the issue is Its a big algorithm and I might develop applications for iphone and windows phone also. So i wanted to reuse the code every where.
My question is that which language should i write the algo in to reuse the code.
I have done some research it seems android and iphone support C++ but i am confused with windows phone
Does windows phone support C++ language

sounds like C++ will come with WP Apollo.
I would do in C++ and wait to see if there are C++ for WP soon enough.
Otherwise, rewrite that code into C#, pretty quick I think.

Windows Phone 7 doesn't support C++
Windows Phone 8 will support C++
Maybe you should take a look at MonoTouch. It allows you to code in C# and target Windows Phone, iOS and Android.

No, Windows Phone does not support C++ - there is a chance that WP8 will support it, but i din't think that has been made official yet. You have a few options, none of them are ideal!
MonoTouch / MonoDroid
You can use Mono to write your application in C# for iOS and Android, and using the regular C# frameworks for Windows Phone. This does mean you will have to use Mono for your entire application, not just this algorithm.
JavaScript
You could write your algorithm in JavaScript then run it within a suitable browser control within each platform. Ugly, but viable!

WP8 doesn't have full C++ support.
You can't develop and publish to WP8 app store non-direct3D apps just by using it. You HAVE TO/MUST use C# to design your interface, which is XAML and only compatible with C#. This "You can develop apps with C++ for WP8" slogan is just a big marketing lie. And the indication of WP8's failure. Read my answer here for further and the resources:
https://softwareengineering.stackexchange.com/a/177048/3375

Related

Native iOS/android application to Windows Phone

I have an iPhone application (with an android counterpart), developed in Xcode and written in Objective-C. It is a classical native iOS app, already working and uploaded in the App Store. Similarly, the android version is built with Java and linked with the android SDKs. It's uploaded to the market place.
I was asked to port the app to Windows Phone. Is this possible without modifying the code?
I am not familiar with Windows Phone dev, however it looks like that is a completely
separate ecosystem for developing apps (different programming language, different IDE, different app store etc).
Can I go from Android to Windows Phone or from iOS to Windows Phone?
PhoneGap - or similar platforms - are not options since the code is already written in Objective-C and Java.
Like iOS and Android, Windows Phone is a completely different operating system and currently requires a completely different development platform.
It is not possible to take the existing code and make it function on a Windows Phone.
iOS commonly uses Objective-C for application development . Even if there was a way to compile Objective-C onto a Windows Phone, it would be inherently tied to platform features, and UI controls. While you could write some code in C++ and share it, with an iOS application, you'll still need some in Objective-C.
Android applications use Java normally. Java is not available for the Windows Phone platform. So, the language is out. Further, like iOS, the platform features are not necessarily shared and the UI control and behaviors are different. Android applications can use C++ (if you happened to code using it), but it has limitations, and by using it, again, you'd be tying the code to the Android platform potentially. Some code may be portable.
Windows Phone applications are usually written in C#/C++ and XAML or DirectX. While there is some similarity in languages (Java and C#), you'll encounter far more platform differences that could need significant effort to convert. From the way network requests are made to handling threads will be different (and many many more). Objective-C is also very different from C++.
Unless you had used something like Xamarin and written the underlying business logic using a common platform (C#/.NET), you'll need to consider a port to Windows Phone a fresh start.
It's not possible to just reuse all of the code that's been written. With a careful effort, you could share some common code (if it were written in C++), but as the shared code will not directly work with UI (and other platform features), you'd still need to do the UI on each platform, work around limitations, and potentially customize the user experience for each platform.
Microsoft has provided some guidance on porting, and provided some links with an API equivalency table here.
Yes, you can use Microsoft's Windows bridge for iOS to convert your iOS application code to Windows mobile platform code.
You need to use WinObjC SDK provided by Microsoft for this purpose.
Follow this link for more details.
No, you can't, WP apps are build with c# or .net and in visual studio IDE. There is no automated way to port a previously coded ios or android native app built with objetive-c or java to WP.
In my opinion there is no way to directly port a iphone app to windows phone app. You need to develop windows phone app with its needed environment like Visual Studio , windows phone sdk and with windows os.
You can also use cross platform like phonegap if it may fit to your requirement.
It looks like you have an existing Obj-C codebase for iOS, and a Java codebase for Android. No matter how you cut it, you're looking at [re]writing code to get something on WP8.
I don't know how "UI heavy" your app is; in general the UI code is the most platform specific (unless you're willing to put up with "cross platform" stuff that might not have good UX).
You might consider keeping the non-UI code mostly plain C++ and using Obj-C, etc. only for the parts where you have to talk to the framework. It will be easier to support multiple platforms with C++.
I took this approach with an app I'm working on; it's targeted for iOS but it's about 80% C++ (including Open GL). If I decide to port to Android I just need to deal with the 20%, mostly UI-ish code.

Hybrid apps for iOS/Android/Windows 8

I hope this question is specific enough. I have a client for whom I made an iOS native app and an Android native app (same app, different platform). It's a fixed pixel design (I made this work for Android somehow:) and it works on iPad, iPhone and most Android devices (with some letterboxing). Now I am asked to write the same app for the Windows store and they want me to use HTML and JavaScript. My question is, when I use HTML and JavaScript, would it be "easy" for me to use this code into some sort of hybrid solution (PhoneGap, etc)? The app doesn't need much complicated functionality but does need to support push notifications on iOS and it needs to be able to play videos, preferably HLS. Any advice on what the best hybrid solution and do hybrid solutions allow you to build for Windows 8?
I'm a cross-platform developer working on PhoneGap and Titanium Appcelerator. The correct answer is "It depends". Currently the state of cross-platform development is not very recommendable. Yes, you can write plugins for PhoneGap and it does support windows phone but you will have a ridiculously hard time getting them to communicate with each other properly. I learnt this from experience.
If it was a hacking/hobby project to further the cause then I would say go for it but for a time-bound client project like yours, I would recommend against cross-platform solutions and go native instead. Plus native always gives considerably better control, speed and ease of development. You will probably develop it faster in native than cross platform anyway. I've played around with windows SDK and it seems easy to use and well-built with good documentation and you can use C# which is similar to Java since you have already used it on android.
You can also build windows 8 desktop apps using html and javascript natively but this isn't present in windows phone 8 yet.
As I mentioned, If you don't need too many native controls, then you can go cross-platform. For your requirements, it can be done. If you have already developed android and ios apps and only need windows app now, then going native would be easier. But if you have to make all 3 then you can go cross platform if your requirements are restricted to what you mention. Here's a good quora thread that discusses the pro's and cons:
http://www.quora.com/Is-Titanium-good-for-developing-iPhone-apps
Take a look on Xamarin
Main idea - they brings real native code for all platforms.
They have instruments to compile C# code that it can be used at all platforms
For example you should create UI in XCode (for iPhone) and use ModoDevelop to create DAL/BLL, then you can re-use C# code base over all other platforms
They have cross-platform iPhone/Android/WP7/W8 samples on GitHub
Also see Q&A on Stackoverflow tagged Xamaring
We are starting to build multiple apps for multiple clients both in IOS and Android native platforms. The problem is we are going completely native which is taking too much time.
I would like to look at the linked in method (http://arstechnica.com/information-technology/2012/10/a-behind-the-scenes-look-at-linkedins-mobile-engineering/) which is a more hybrid approach using HTML and native code.
The problem is I don't think Phonegap is that good - good for prototyping but maybe not for full versions of apps as it can be a bit slow and a bit buggy.
I would like to look into doing a model where we create like 65% HTML and 35% native to that device (like linked in)
Would anyone have any suggestions for this? Would people say we need a massive development team to pull such an approach off?
I welcome thought:)
Thanks

Iphone and Android mobile development - Getting started

I'm a web developer in ASP.NET, C# and looking to start some mobile development. I'm aware Apple uses Objective C and Android uses Java, is there a way to create an app for both platforms or do I need to buy a Mac and some books on objective c and Java?
Thanks
You can use http://phonegap.com/ or http://www.appcelerator.com/platform to write cross-platform apps.
Rumour has it that Delphi XE3 (Due to come out soon) can be compiled onto Apple, Android, Windows 8 etc.etc. so if you can hold out a little longer that should be good!
For now, you are better using a mac (with XCode) to program for IOS or OSX as Apple is very particular and you need certificates for devices, projects, development and distribution etc.etc.etc.
Android i believe you have a bit more play with, but at the moment it is 2 seperate languages. Check out the DEV centres:
https://developer.apple.com
developer.android.com/
There are ways to create apps for both platforms, especially if you know web technologies : PhoneGap and others.
But like specified in the doc, you will most probably need an actual mac if you want to build to iOS
Although there are workarounds
You could use PhoneGap or Appcelerator. Haven't tried them myself, though. But with those tools you could build for both Android and iOS.
Since you are a .Net, C# developer, i recommend you to use Mono for Android, it comes with cost but will save you time and easy to deploy
http://xamarin.com/monoforandroid
The best way to be truly cross-platform is to develop for the web. I would include this in your consideration of development strategies, in addition to PhoneGap and Titanium, as Peter mentioned. You do not have as much access to core OS features, but that is improving all the time (see http://mobilehtml5.org/). Whether or not this is feasible depends on what you are trying to accomplish.

iOS and Android development on Windows

I'm facing a dilemma: I have a solid ASP.NET development experience in C# and looking to start mobile development. I have done research and know that there are some hacks for getting a development environment for iOS on windows, and recently after Apple lifted ban on 3rd party dev apps, Adobe Flash CS5 can be used to package iOS apps. I do have some prior experience with Flash and AS2.
So my question is: should i use Flash CS5 for iOS and MonoDroid for Android or should i just get Mac and learn Objective C for iOS and learn Java for Android? What would be the most practical solution?
Thank you in advance
EDIT: In the end, after trying out both Java Development in Eclipse against Android SDK and Mono for Android, I decided it's best to write Android apps in native environment. Eclipse FTW! As for iOS, I think it will also be best to use native Mac tools and Objective C.
While there are ways to get around using Objective-C for iOS development, I'm going to recommend that you learn it anyway. You need a Mac to deploy anyway, you might as well use it to develop as well.
Objective-C is bloody bizarre when you first start using it, with its strange square brackets and odd ways of doing things. However, once you've spent some time writing code in it, a change happens in your brainmeats and you suddenly realize that this is really an elegant way to work. Xcode is also quite an excellent IDE.
You can start with the iPhone Applications Programming lessons on iTunesU from Stanford. It's free, and covers what you'll need to know pretty throughly.
Worst case, you've learned a new language, and how Apple thinks iPhone apps should be developed. Even if you ultimately use something else, that understanding will help you out long term.
Take a look at monotouch & MonoDroid (Coming Soon), it still requires a mac. But you can open your solutions in VS2010 and use resharper, and just use the Mac for deploying and building. Take a look at this Here to open monodevelop solutions in Visual Studio.
http://monotouch.net
For Android, I would recommend learning Java. I just started working with Android in Java on my Windows machine after developing some ASP.NET sites. I'm familiar with Java, but the syntax is so similar to C# that it's very easy to understand and pick up. So far it is more difficult figuring out and remembering the details of the architecture of mobile applications as opposed to the language. It also helps that there are a number of good books and online resources for converting from C# to Java and vice versa.
Update: I found a good post over on programmers.stackexchange.com that talks about C# vs. Java for Android development with good discussion on the pros and cons of switching: https://softwareengineering.stackexchange.com/questions/33076/as-a-c-developer-would-you-learn-java-to-develop-for-android-or-use-monodroid-i
#Dimitri I was almost your identical skill set when iOS 2.0 was released. I decided to try and learn Objective-C and now its my language of choice. Its a bit different to start with but most of the changes are simple to learn. Whether you are programming for iOS using Objective-C or something like Monotouch either way you have to learn the frameworks. If you use Monotouch you will never be able to be on the bleeding edge of the iOS enhancements. Using Objective-C you will be able to use the latest beta APIs and ensure your apps work right. You will need a Mac to deploy to the App store so just bite the bullet and get a Mac. Get a MacBook Air 13"
I went the route of Monotouch for iOS and Java for the Android. Unfortunately, Monotouch still requires a Mac. I am currently participating in the MonoDroid beta, which looks pretty promising too. It's all a matter of taste. I should also note that, for the most part, HTML/Javascript is a nice way to get portable apps in some circumstances. I would expect HTML5 apps to become even more viable as tooling improves.
I choose to use the Mono, MonoTouch and Mono for Android technology stack from Novell. When coupled with a micro framework like MonoCross (open source in Google code) it helps me write applications for both iPhone and Android devices while leveraging a shared code base for much of it. I would highly suggest the same route, it has allowed me to implement numerous solutions for small businesses and enterprise customers alike.
I didn't have the ASP .NET experience like you, but I was a Pocket PC/Windows CE developer so C# and the .NET Framework were also my strongest tools when I started on journey towards Mono many moons ago.
You can do iOS,Android and Windows using Xamarin.
Android and Windows can be done easily but doing iOS on Windows was tough so far like networked mac is required for debug and development but things have changed now.
Microsoft has introduced Xamarin Live Player using which you can debug,develop and deploy the app completely in windows without the help of any Apple system but to sign and release the app to appstore you will need Apple System though

Android and J2ME

Can anyone please clear my doubt regarding the query that does Android Programming has anything to do with the J2ME?
Does Android Development comes under J2ME Platform as J2ME is used basically for the Mobile Applications and Android is also the same one.
Please let me know if anybody is knowing it.
Android has nothing to do with J2ME beyond using the core Java language. In fact, the standard library is more reminiscent of Java SE.
Like Yann mentioned , j2me is not Android and vice versa, however they use the same language with different VMS. Google basically created their own JVM called DAVLIk which got Sun to sue Google because google used their technology without their approval.
There are however some J2ME to Android wrappers. LWUIT currently has such a wrapper.
in both same language will used which is JAVA.
but j2me is made for small devices which is run on kJVM .,
Android is basically made for smart devices.,
using j2me we can developed Third party app .,but Android is the native app which is fully supported by Android OS.
Also you may want to look at MicroEmulator http://microemu.blogspot.ru/2009/08/converting-javame-applications-to.html, it provides J2ME CLDC/MIDP wrappers for Java SE and Android, so basically you can write a midlet and pack it with MicroEmu to run on Android. But it will limit your app to J2ME UI which is quite weak, no comparison with Android. CodenameOne (former LWUIT mentioned in other answer) is a best choice for a cross-platform solution if you need to cover J2ME, Blackberry, Android, iOS and Windows Phone. But if you do not need to support J2ME and Blackberry, there are other solutions too (Xamarin, Marmelade, PhoneGap)

Categories

Resources