Examples of PushConfig


Examples of org.jboss.aerogear.android.unifiedpush.PushConfig

    private static final String PUSH = "push";
   
    @Test
    public void testDefaultConfig() throws URISyntaxException {
        Registrations reg = new Registrations();
        PushConfig config = new PushConfig(new URI("http://testreg.com"), "TestID");
        reg.push(PUSH, config);
        PushRegistrar registrar = reg.get(PUSH);
        assertNotNull(registrar);
        assertTrue(registrar instanceof AeroGearGCMPushRegistrar);        
    }
View Full Code Here

Examples of org.jboss.aerogear.android.unifiedpush.PushConfig

    }
   
    @Test(expected = IllegalArgumentException.class)
    public void testFailsOnUnsupportedType() throws URISyntaxException {
        Registrations reg = new Registrations();
        PushConfig config = new PushConfig(new URI("http://testreg.com"), "TestID");
        config.setType(new PushType() {

            @Override
            public String getName() {
                return "FAIL_TYPE";
            }
View Full Code Here

Examples of org.jboss.aerogear.android.unifiedpush.PushConfig

                else {
                    return null;
                }
            }
        });
        PushConfig config = new PushConfig(new URI("http://testreg.com"), "TestID");
        config.setType(new PushType() {

            @Override
            public String getName() {
                return "CUSTOM_TYPE";
            }
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.PushConfig

        client = new SimplePushClient("ws://localhost:7777/simplepush/websocket");
        client.connect();
        client.register(new RegistrationListener() {
            @Override
            public void onRegistered(String channelId, String simplePushEndPoint) {
                final PushConfig config = new PushConfig();
                config.setDeviceToken(channelId);
                config.setSimplePushEndpoint(simplePushEndPoint);

                config.setAlias("john");
                config.setCategories(Arrays.asList("lead"));
                unifiedPushClient.register(config);
            }
        });

        client.addMessageListener(new MessageListener() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.