Discord Rich Presence in AIR? - actionscript-3

Discord released a Rich Presence SDK that lets C++ developers integrate their game with Discord, which really is an extension of their existing RPC server built into Discord. Lately this SDK has been ported to more and more languages, including Java and Javascript. I know AIR can interface with Javascript, but they seem to use node.js which could be messy.
With all of these new wrappers popping up, what would be the best way of going about this for an AIR app? I'm trying to figure out the most efficient method for creating an AS3 version but I'm not sure which path is the best.
Edit: I don't even want the fancier features, I just want to be able to set a user's local Discord client to display extra game info.

Related

Mobile Apps latest technologies research

I am currently on a research understanding the whole buzz around some technologies that claim that they deploy themselves as cross-platform apps once you write your code in HTML5/CSS3/AngularJS/Whatever client side techonology.
I understand those technologies provide you with a bridge to the native-side of the OS you are running on, but I still lack some real important information regarding them.
Do all those PhoneGap/Ionic/Cordova just wrap your client-side code into an application? Is it the same as using the web-browser to get to a URL but with only some native-like additions(Camera/File etc..).
Do those technologies just connect to your website that is online using DNS? Or is the "Website" you are building does not sit on a server but only on the local OS? Can they run that application offline?
Besides the native additions you get with those kind of technologies, why bother developing with them when you can on the other hand develop a responsive website that can also work on desktop?
Can you connect to a server-side using Ionic/Phonegap? Let's say I have an MS-SQL Table I want to communicate with- is that possible?
I really have a hard time understanding what all those technologies are any good. Still, it is growing in popularity. Thanks for any light on that matter.
Do all those PhoneGap/Ionic/Cordova just wrap your client-side code
into an application? Is it the same as using the web-browser to get to
a URL but with only some native-like additions(Camera/File etc..).
They wrap your html, css and javascript code and provide a javascript API to use native features
Do those technologies just connect to your website that is online
using DNS? Or is the "Website" you are building does not sit on a
server but only on the local OS? Can they run that application
offline?
You should have all the html, css and javascript inside of your app, if you do it this way the app will work offline.
You can have it online too, but it won't work offline and have some problems.
Besides the native additions you get with those kind of technologies,
why bother developing with them when you can on the other hand develop
a responsive website that can also work on desktop?
If you don't need any of the native features phonegap provides, then do a responsive website, the idea of phonegap is fill the gap between the browser and the native apps, some day the browser will have access to all the native features and phonegap will die.
BTW, now phonegap have a desktop platform, so you can make it work as native app for phone and still work in the browser
Can you connect to a server-side using Ionic/Phonegap? Let's say I
have an MS-SQL Table I want to communicate with- is that possible?
Sure, you can make XHR calls to the server to get a XML, JSON, etc with the onlyne SQL database, you can do a POST too, and upload files.

Building an Air app for desktop#2015, any disadvantages?

Since I'm familiar with AS3, I'm planning to build a desktop app using Air, and I'd like to not run into limitations, I never developed a full blown app for desktop using Air, only small apps and others for mobile.
The idea of this app is to be similar to an IDE, with some visual management, think of the design view of Flex, something like that. But not that big, a smaller/reduced version of that.
I'm asking this because I don't remember seeing any app like that built in Air, and I wonder if there is a good reason, or not.
If for example someone says: "use Java, its better", please tell me why, and more importantly, what things I can do in Java for desktop that Air just wont allow me to.
IMHO AIR is extremely powerful and if you combine Stage3D + Native Extensions you can do almost everything with a good performance. I have been working in several projects for desktop, iOS and Android and using Starling + Feathers + Robotlegs + creating my own native extensions (plus there is a lot of free/open source/commercial) was possible to achieve all my (and clients) goals.
Also, there is a huge (ActionScript/AIR) community sharing knowledge and helping each other, several open source frameworks (for games, 2D, 3D, animations, GUI).
I have tried Objective-C, Swift and Java and of course, there is a lot of positive points, native performance, powerful IDE's, GUI integration, native components, etc.
It's a mix, if you need to have your app running in multi platform, I believe Adobe AIR is a good option, if not and you have the necessary knowledge to work using Objective-C/Java, use native.
Of course, it's all relative, I'm just trying to share some tips.

Faye Client for ActionScript3

I'm looking for a pub/sub messaging system to connect various applications I'm building, some of them will be iOS, other ones AIR/AS3 and maybe some openFrameworks.
I found out Faye and it looks like really interesting. I've found libraries to integrate it in all my apps/languages, so I'm trying it out.
Now, the problems are with the AS3 implementation. I've found this great library and it's kind of working, BUT I've some issues I can't understand. My main problem is that I can build clients, connect them to a node.js server and exchange information between them, but after a while they stop receiving information.
So I was wondering:
do anyone of you have experience with Faye and this library, and knows if this behaviour it's normal and if there's a way to prevent it? I've done some tests using some html browser clients and everything was ok, so it's definitely a flash library problem
do you know any other library to implement Faye in AS3/AIR? I was browsing a lot but I couldn't find anyone
Do you know any alternative pub/sub messaging system I could implement (easily) in as3?
Thank you
We've open sourced our implementation of AS3 Faye client recently. You can find it here.
It's been in prod for more than a year and was tested by millions of users, without issues so far. It's used in Flash Player Web and AIR Mobile applications.
Interfaces mimic JS client interfaces, so its setup is as easy as JS client setup. Plus one additional feature: multiple urls for reconnection fallbacks.
Give it a try!

Adobe air or flex?

I am starting with my first application development. So far I have worked only with Html, css, js, jquery etc..
I want to create an app like the desktop gmail notifier which pings the server at regular interval, look for any messages and notifies the user. I read that Adobe Air and flex are the tools that can be used for this. I have developed the basic prototype in adobe air by studying the tutorials in net.
But the problem is that, my client doesn't want the source code to be made available to users. With air, you can see the complete source code after installation/unzipping the .air app.
Is there any way I can protect the source code? Or should I use flex and convert it to a swf? Is the source codes are protected in flex? I am not familiar with the flash action scripting. Please advice.
I think you are confused as to what Flex is. It is an SDK that is a level below the AIR and Flash SDKs. Flex is a secondary structural language that is meant to be used in conjunction with AS3, while AIR is compile-type.
It doesn't matter how you compile this, the source code will be attainable if someone really wants to get it. If you compile as an AIR app, you can unzip and get the SWF file. If you compile as a SWF, you already have that SWF. The SWF can then be decompiled using various tools.
There is no real way to hide front end code from prying eyes. Flash is definitely harder to read than HTML or CSS or Javascript, but definitely not impossible to view regardless of how you compile. Your best bet is definitely to offload as much as possible to a server and possibly obfuscate your code.
I would definitely try to explain to your client that it is simply not possible to truly hide source code from individuals who would like to access it. If someone really wants to steal the code, they can and will.
Code cannot be hided in any front end technologies, Flash (SWF, Flex or AIR) or HTML (JavaScript).
Do all the business logic at server and authentic properly for securing your data.
And AIR and Flash Player are both runtimes which play applications written in Adobe Flash or Apache Flex.
You can use a client-server implementation to hide the logic from the user and flex would just render a UI based on the business logic from the server side code(php,java or .NET) that interacts with the gmail servers
If you want proper notifications, go with AIR - access to some system-level features like toast notifications. With Flex, you'll be limited to webpage content.
About code protection - you can develop app in ActionScript and then protect compiled SWF with obfuscator for some fair defense, although there's probably no good free obfuscators. I paid some bucks for secureSWF license and consider it a good investment. Of course, determined hacker would crack app anyway (in theory,) but I would'nt worry about this too much for a simple pinger app.

Using BlazeDS with Flash CS5.5 or 6

Officially, BlazeDs can only be used "with Flex and AIR". This comment is puzzling in itself since Flex is a set of Actionscript development tools, while AIR is a "mode" in which Flash can operate.
Ultimately, I am starting a new project and I want to use BlazeDS for a Flash CS5.5 (or CS6)-based project. Is this possible? Has anyone used this combination in the past?
If you actually read the article you linked to, you'll soon find that it is absolutely okay to use BlazeDS with any technology that can communicate with a web socket - its message format (AMF3) is an open standard.
So yes, it can be used with Flash (or rather, pure ActionScript), but it is a little less convenient than with MXML, where everything is set up by the framework, because it takes more "under the hood" configuration to be able to run all the necessary parts for remoting. And you will still need the Flex SDK, of course - there's no getting around that.
Once you have the Flex SDK set up with your Flash IDE, you have to manually initialize the Flex remoting classes needed before you can access a BlazeDS service. There is a sample class that has all the required calls and some additional information in this blog post.
I have also written an extensive tutorial about getting RemoteObject wired up and working, as well as setting up a simple "Hello World" web service on my blog. The article series I wrote is intended for use with FDT and RobotLegs 2, but at least the first part (setting up a Java WAR project to deploy as web service) should be helpful to you, nonetheless.
Finally, I would recommend you rethink using Flash as your primary IDE - in my experience, it... well, frankly, it sucks (pardon my French) for anything but animations and setting up asset libraries. If you don't want to pay for a better IDE, you should consider using FlashDevelop (unless you're on a Mac - OS X is not supported). Or maybe give FDT a try - it is much, much more convenient for coding, even if you don't buy the Max license.