Maps API for Adobe AIR (AS3) on 2017 - actionscript-3

It's Dec 2016. The Adobe Flash and Google Maps API for Flash has been deprecated, and I have a major project coming up that relies heavily on maps. What should I do to make it work on AIR?
Thinking of: Google Maps JavaScript API + Mobile web view. A little worried about power consumption or ram issues on lower performance smartphones.
Is that my best bet? Or, is there one out there that still works for AIR?
Edit: Something like ArcGIS API for Flex would be great! Although, it seems they just went into retirement phase...

There's openscales. It's not actively developed anymore, but it is open source.

you may using ANE to solve this kind of problems
a costly Ane (iOS v5.1+ & Android v10+) com.distriqt.NativeMaps
The Native Maps allows you to display native iOS Apple maps and
Android Google maps with interactivity and overlays in your
applications.
This allows you to provide high performance mapping applications well
integrated with your AIR application. Select between normal, hybrid
and satellite map types and control the view setting positions,
bounds, zoom and tilt.
a free Ane (Only for IOS) air-maps-ane
AIR Maps ANE provides the support for using the native mapping
component in your Adobe AIR application. It uses Native Extensions to
access the maps APIs for that platform and provides an AS3 interface
so that it can be used in Flash Mobile applications developed using
Adobe AIR.
or create your own ANE.

The Google, in its Maps API for Flash deprecation announcement states:
The performance and consistency of browser JavaScript implementations
has progressed, making the JavaScript Maps API an increasingly
suitable alternative.
However,
While the deprecation of Google Maps API for Flash was a sad
announcement to Flash developers (back in September, 2011), it should
be mentioned that it is still possible to use the Google JavaScripts
Maps API
within Flash projects by loading it as an HTML page, which may just
work for some projects, even though it cannot be controlled as easy
using ActionScript.
The preceding page mentions the MapQuest AS3
API, as an alternative, but unfortunately, it seems to be also deprecated! So, I think your best bet, is the best bet!

YCanvas is also not actively developed but it can make the trick and it's also opensource
I used it in this app : http://volcansdauvergne.com/ few years ago

Related

Difference between HTML5 API and Phonegap API

I'm working with hybrid mobile application, where I wanted to save the contact to the device contact list.
I followed the Phonegap Api documentation. I was suprised to see Phonegap and HTML5 both uses the navigator object,
As per my understanding, both the api uses the same navigator object. So, how Phonegap Api is different from the HTML5 Api?
It is hard to say exactly how they are different b/c it depends on which part of the API you're talking about and for which platform/browser. The point of Phonegap is to use the HTML5 api in a way that you can build a single web app and then compile it to a native ios, android, ... app. Mostly, the use of the phonegap api allows you to interact with the phone's api at a lower level than the HTML 5 api will allow. Like getting access to the contacts or the device's sensors. However, as browser support for HTML 5 evolves there is less and less functional ability you gain using phonegap.

how can i make in app buying in actionscript

I have a child book mobile application and my customer asking me that
he wanted to 10 book 5 free and 5 purchasable.How can i do that
You will need a Native Extension (ANE)
You could make your own, but i would reccomend buying one like this -> milkmangames.com
For Android, you need to use an AIR Native Extension (ANE) (link is a tutorial on how to create and use one). An ANE allows you to run a native code (Java on Android, Objective-C on iOS and Mac, C++ on Windows). You would tie into the native APIs already available for in-app purchases. There are free options available, though they are generally not well documented. I recently had luck with the GCM ANE found here (though you will need to rebuild it in order to use your own icon).
For iOS, Adobe actually provides a way to do it within AIR itself using the RemoteNotifier class. I was able to implement this extremely easy. No trouble whatsoever and it is documented fairly well. This also uses native APIs, but it is built into the AIR SDK and is fully supported by Adobe. I highly recommend using this over an ANE. Read this article

MVC4 mobile Web app into app store

I have developed an web app using MVC4- mobile and HTML5. Every things is working fine when we enter URL from any phone. But i am wondering how to convert my web app into hybrid app so that i could upload in istore or GooglePlay.
Please help me with the procedure or steps i need to follow and is there any tool other than phoneGap that i could use.
Thanks in advance.
There are few options but I will mention only two of them.
Most commonly used is a Phonegap/Cordova app wrapper framework (Also my main choice). Cordova is a new name for a Phonegap framework. It will give you an access to common mobile phone functionalities (Android, iPhone, Blackberry and WP7+). It is rather easy to use and there are a lot of vorking tutorials available, you can even find them in youtube.
Here's an phonegap link: http://cordova.apache.org/. There you will find tutorials how to install/configure it on all available platforms. This is a older link: enter link description here, it still has usable informations.
If in doubt always search for phonegap examples instead of cordova. For some reason Phonegap is still a mostly used name.
Here's an Phonegap + jQuery Mobile example: http://therockncoder.blogspot.com/2012/07/jquery-mobile-phonegap-and-camera.html, there you will find a github link for Android and iOS implementation.
Through the PhoneGap javascript APIs, the "web app" has access to the mobile phone functions such as Geolocation, Accelerometer Camera, Contacts, Database, File system, etc. Basically any function that the mobile phone SDK provides can be "bridged" to the javascript world. On the other hand, a normal web app that runs on the mobile web browser does not have access to most of these functions (security being the primary reason). Therefore, a PhoneGap app is more of a mobile app than a web app. You can certainly use PhoneGap to wrap a web app that does not use any PhoneGap APIs at all, but that is not what PhoneGap was created for.
Now some disadvantages. With PhoneGap for each platform you have to maintain a different project. The burden for that increases when there is a need to use multiple PhoneGap plugins because you need to search and update different files on each platform.
Mosync is also an excellent solution. This framework has a few things better handled then Phonegap. Like:
With MoSync you’ll have only one project to maintain for all the platforms. For iOS you will still need to use Xcode because MoSync outputs a project for it but, other than just building it, there is no need to dig deeper in Apple’s IDE.
The entire provided functionality for JavaScript is placed in the same file for all of the operating systems. There are no files for plugins because it has none (at least that I know of), but the same extensibility is achieved in ways described in the next section.
If there is some functionality that MoSync doesn’t provide on the JavaScript side, there are no plugins that you can use, but there is another way. MoSync provides a lot of features from the C++ side and if they aren’t accessible from JavaScript by default they can be easily made available. I’m sure that in the future the MoSync team will add more features to the JavaScript library.
With MoSync you are not restricted to only JavaScript frameworks to replicate native UI, you can truly create native UI elements that are more responsive using only JavaScript.
Rhomobile on the other hand is much less used thus a lot less supported.
I heard few good things about this framework but never had time to learn/use it.
RhoMobile applications are OS-agnostic, able to support enterprise-
and consumer-class operating systems including Windows® Embedded
Handheld, Windows® CE, Windows® Phone 7 Series, Apple® iOS, Android®
and BlackBerry®. You have complete control over how applications
behave on different devices. With RhoMobile Suite, you are finally
free from OS design constraints, able to create business applications
that are every bit as elegant looking and intuitive as their consumer
counterparts (This was copied from their main site).

Unity 3d in touch sensitive webstore interface

I need to create a touch version of the webstore with 3D elements. At the beginning I chose a WebGL technology because of the straightforward integration with databases (such interface will need to download thumbnails of products and basic information about it using MySQL).
Problem is the lack of simple tools to create such a project. Recently I became interested in Unity. I just don't know whether its capabilities allow me to do this. What do you think about Unity 3d? Is a good choice for such a task?
Unity3D web player needs a plugin installed at the user's browser. This plugin is not available for iPhone and AFAIK for Android neither. Thus it is not possible to create a pure browser based online store solution.
What you can do with Unity3D as a workaround: Do the project in Unity3D and export it once as web version for desktop clients and then export it as app (i.e. a fat client that needs to be installed) for iPhone and again for Android. But even then you will have a lot of work providing different layouts for all target devices.
Although I like Unity3D very much, I would not recommend it for development of an online store.

Native iPhone app in HTML/Javascript?

I would like to build an app that heavily relies on Google Maps. Is it possible to write a native iPhone application in HTML/Javascript ? If so, will it be accessible from the app store ? Otherwise, how could I include Google Maps in a native app ?
You will need to build a framework application in Objective-C that contains a UIWebView. You can populate the UIWebView with your HTML/Javascript.
In my opinion the better alternative is to use the MapKit framework from a native app. MapKit lets you do almost everything you can do using the full Google Maps API and I think a native app will always work better on the device than a UIWebView container app.
I have used MapKit in a few of my apps and found it easy to use with nice performance. In the linked example I embed a MkMapView in a UIScrollView in page mode. I doubt you would have an easy time implementing this with a UIWebView and I am sure it wouldn't perform as well.
Yes, it is possible to do this. There is a great opensource project called PhoneGap http://phonegap.com/ that allows you to do exactly that. Not only but alos deploy on other mobile OSs like Android, blackberry etc.
To get on the app store, you need to register as an apple developer which is about US$100. Development can only be done on a mac) Apple gives you lots of software tools including code editors and iphone simulator.
Addressing the two parts of your question:
Is it possible to write a native
iPhone application in HTML/Javascript
? If so, will it be accessible from
the app store ?
There's a framework called NimbleKit that allows you to write your app in HTML/JavaScript and then converts it to Objective-C/Cocoa for you. There are several problems with NimbleKit, though:
It costs $99.
It adds a level of indirection that increases the chance of errors.
Because you're not using the 'real thing', you're much more limited in what you can do (i.e. you can only use what they have made available to you).
Another solution is to embed a UIWebView in a native iPhone app (you'll have to use a bit of Objective-C/Cocoa to do this) and then write the rest of your app as an iPhone web app that is loaded into the UIWebView. However, I would strongly advise you not to write an iPhone web app, whether standalone or embedded in a native app. As of writing, iPhone web apps have many disadvantages, including:
They're very slow.
They have limited functionality (e.g. no device APIs).
They can't take advantage of the Cocoa-Touch framework (a serious downside).
iPhone web apps may become viable in the future, but at this point in time, I'd steer away from them and write a native iPhone app using native technologies (i.e. Objective-C/Cocoa).
Otherwise, how could I include Google
Maps in a native app ?
Use Apple's framework "MapKit". See Displaying Maps and Annotations in the iPhone Application Programming Guide, this tutorial, and this tutorial for information on how to use MapKit.
In iPhone OS 3.0 and greater apple has created a custom Cocoa Touch control that allows developers to embed Google Maps into a native app. The maps support multi-touch and you can annotate the maps with custom views, find the user's current location and do other cool stuff.
The way to do this is to build your app as a regular web app (javascript/css/html). The embed that in a native WebView. The WebView is a container for iphone apps that are meant to be web apps. These apps are sold the same way as other apps on the app store.
It's not possible to write a native iPhone app in HTML/JS, http://code.google.com/p/iphone-google-maps-component/ may be of some use, or you can use:
UIApplication *app = [UIApplication sharedApplication];
[app openURL:[[NSURL alloc] initWithString: #"http://maps.google.com/maps?g=London"]];
Please see How can I launch the Google Maps iPhone application from within my own native application? for more info.
There is also Appcelerator Titanium, which looks to be a good framework for developing iPhone and Android applications using web technologies. They gave an interesting presentation on this at C4.
However, trying to "write once, run everywhere" on mobile devices will cause you to create something that is inferior on all platforms to native applications, because you will need to design for the lowest common denominator between them.