Skip to content

Instantly share code, notes, and snippets.

@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
if ("echo".equals(action)) {
this.echo(args.getString(0), callbackContext);
return true;
}
return false; // Returning false results in a "MethodNotFound" error.
}
public void echo(String echo, CallbackContext callbackContext) {
<dependency id="org.jboss.aerogear.cordova.android.reflect" url="https://github.com/edewit/aerogear-reflect-cordova.git"/>
public class Echo extends BasePlugin {
public boolean echo(String echo, CallbackContext callbackContext) {
callbackContext.success(message);
return true;
}
@edewit
edewit / windows.md
Last active August 29, 2015 14:04

##Toast Notifications

toast specs.

{
    "title" : "The title",
    "alert" :"HELLO!",
    "duration" : "short|long",
    "launch" : {
        "type": "toast",

How to build cross platform applications with Cordova

Mobile devices are increasingly important as a platform. The number of different devices on the market increases every day. This posses a challenge, how do we support all of them. Every new device comes with it's own paradigms and programming language. Wouldn't it be great if we could create one application that could support all platforms. With Cordova and AeroGear you can.

But that is not all a mobile application is more then just the client you'll need a flexible backend, LiveOak is backend-as-a-service stack that simplifies development for mobile.

Finally support for Push notifications accros platforms, reaching out to the users of your apps for marketing or buisness rules.

The mobile team at jboss has some more things that we'll be working on I'll give an overview of what is in the pipeline

{
       "variants" : ["c3f0a94f-48de-4b77-a08e-68114460857e", "444939cd-ae63-4ce1-96a4-de74b77e3737" ....],
       "alias" : ["[email protected]", "[email protected]", ....],
       "categories" : ["someCategory", "otherCategory"],
       "deviceType" : ["iPad", "AndroidTablet"],
       "ttl" : 3600,
       "message": {
         "alert":"HELLO!",
 "sound":"default",
/*
Converts A class to a dictionary, used for serializing dictionaries to JSON
Supported objects:
- Serializable derived classes
- Arrays of Serializable
- NSData
- String, Numeric, and all other NSJSONSerialization supported objects
oauth2.google("517285908032-l580qf378r0jg5l9ebt52ugvbp5vvf06.apps.googleusercontent.com", ['openid', 'email'])
.then(function (result) {
console.log(result);
}, function (error) {
alert(error);
});
-- phpMyAdmin SQL Dump
-- version 3.5.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 14, 2014 at 01:28 PM
-- Server version: 5.5.29
-- PHP Version: 5.4.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
#import "AppDelegate+url.h"
#import "AeroGearHttp.h"
#import <objc/runtime.h>
@implementation AppDelegate (url)
// its dangerous to override a method from within a category.
// Instead we will use method swizzling. we set this up in the load call.
+ (void)load
{