• Resolved obiwein

    (@obiwein)


    Is there an example piece of web code available that can be used to actually capture the Device Registration information?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter obiwein

    (@obiwein)

    I currently have the following setup on a website, but no device tokens actually register. Please help.

    <script src="Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    
    	<div class="form-group col-md-6">
                    Please Enter Your Email Address<input id="email" type="text" name="DeviceId" required="required" placeholder="[email protected]" /><br />
                    <button id="btnRegister" onclick="SubmitFormData()" class="btn btn-primary pull-right" >Register Your Device</button>
    	</div>
    
    <script type="text/javascript">
        $(document).ready(function () {
           
        });
    
        
        function SubmitFormData() {
            alert('Submit');
            register();
        }
    
    function register(os, token) {
            var baseUrl;
            baseUrl = 'https://mysitename.com/pnfw';
            if (!baseUrl) {
                return $q.reject();
            }
            return $http({
                method: 'POST',
                url: baseUrl + '/register',
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded'
                },
                transformRequest: function(obj) {
                    var p, str;
                    str = [];
                    for (p in obj) {
                        str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
                    }
                    return str.join('&');
                },
                data: {
                    os: os,
                    token: token
                }
            });
        };
    
    </script>
    Plugin Author Delite Studio

    (@delitestudio)

    Hello,

    you can find detailed documentation here.

    I suggest you to take a look at this project to see a working example.

    Regards

    Thread Starter obiwein

    (@obiwein)

    I have seen that project, however there is a ton of information regarding building a standalone iOS application.

    Trying instead to have just the push notifications with only WordPress and the device itself without another app that gets installed. Just register the device on a web page and then done.

    Is there an example registration page available just for that part?

    Plugin Author Delite Studio

    (@delitestudio)

    Everything you’ll need is in the documentation page, with detailed format for every API.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Example html for iOS device Registration’ is closed to new replies.