Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Wilbur

    (@ozu)

    Ok. I just contacted you guys.

    Thread Starter Wilbur

    (@ozu)

    I used volley to make the request thus:

    private void testNoti() {
            Log.d(TAG, "testNoti called.....");
            //Using http returns error 301 so I used https
            StringRequest postRequest = new StringRequest(Request.Method.POST,"https://MY_SITE_URL/pnfw/register/",
                    new Response.Listener<String>() {
                @Override
                public void onResponse(String response) {
                   Log.d(TAG, response);
                }
            },
                    new Response.ErrorListener() {
                        @Override
                        public void onErrorResponse(VolleyError volleyError) {
                            Log.d(TAG, volleyError.toString());
                            Log.d(TAG, "onErrorResponse called");
    
                        }
                    }){
    
                @Override
                protected Map<String, String> getParams() throws AuthFailureError {
                    Map<String,String> params= new HashMap<>();
                    params.put("os","Android");
                    params.put("token","mytoken");
                    return params;
    
                }
            };
    
            RetryPolicy policy = new DefaultRetryPolicy(5000, 2, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);
            postRequest.setRetryPolicy(policy);
            postRequest.setShouldCache(false);
            RequestQueue requestQueue = Volley.newRequestQueue(getActivity());
            requestQueue.add(postRequest);
        }

    It gave this 200 Ok result:

    <html>
        <head>
            <link rel='canonical' href='https://MY_SITE_URL/pnfw/register/' />
            <script data-cfasync="false" type="text/javascript">window.google_analytics_uacct = "UA-68565532-11";</script>
            <script data-cfasync="false" type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['e._setAccount', 'UA-66555532-11']);
    _gaq.push(['f._setAccount', 'UA-38339005-1']);
    _gaq.push(['e._setDomainName', 'MY_SITE_URL']);
    _gaq.push(['f._setDomainName', 'MY_SITE_URL']);
    _gaq.push(['e._setCustomVar',1,'template','pub_site_noads',3]);
    _gaq.push(['e._setCustomVar',2,'t','147',3]);
    _gaq.push(['e._setCustomVar',3,'rid','0',2]);
    _gaq.push(['e._setCustomVar',4,'bra','mod2',3]);
    _gaq.push(['e._setAllowAnchor',true]);
    _gaq.push(['e._setSiteSpeedSampleRate', 10]);
    _gaq.push(['f._setCustomVar',1,'template','pub_site_noads',3]);
    _gaq.push(['f._setCustomVar',2,'domain','MY_SITE_URL',3]);
    _gaq.push(['f._setSiteSpeedSampleRate', 20]);
    _gaq.push(['e._trackPageview']);
    _gaq.push(['f._trackPageview']);
    
    _gaq.push(['_setAccount', 'UA-12184421-5']);
    _gaq.push(['_setDomainName', 'MY_SITE_URL']);
    _gaq.push(['_trackPageview']);
    
    (function() {
     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'https://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
    
    var ez_tos_track_count = 0;
    var ez_last_activity_count = 0;
    (function (__ez_tos) {
      window.setInterval(function () {
        __ez_tos = (function (t) {
          return t[0] == 45 ? (parseInt(t[1]) + 1) + ':00' : (t[1] || '0') + ':' + (parseInt(t[0]) + 15);
        })(__ez_tos.split(':').reverse());
    
        ez_tos_track_count++;
        if(ez_tos_track_count > 1 && ez_tos_track_count < (ez_last_activity_count + 4) && ez_tos_track_count < 240)
        {
            if(window.pageTracker)
            {
                pageTracker._trackEvent('Time', 'Log', __ez_tos);
    			new EzoicAnalytics().storeImpression();
            }
            else
            {
               _gaq.push(['e._trackEvent', 'Time', 'Log', __ez_tos]);
               _gaq.push(['f._trackEvent', 'Time', 'Log', __ez_tos]);
    		   new EzoicAnalytics().storeImpression();
            }
    
    		if(typeof(_paq) != 'undefined')
            {
                _paq.push(['trackEvent', 'Time', __ez_tos, 'TimeOnPage']);
            }
    
        }
      }, 15000);
    })('00');
    
            </script>
            <script type="text/javascript">var ezouid = "929718742";</script>
            <base href="https://MY_SITE_URL/pnfw/register/">
            <!--[if lt IE 9]>
            <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
            <![endif]-->
            <!--[if (gte IE 9) | (!IE)]>
            <!-->
            <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
            <!--
            <![endif]-->
            <script type='text/javascript'>
    var ezoTemplate = 'pub_site_noads';
    if(typeof ezouid == 'undefined')
    {
        var ezouid = 'none';
    }
    var ezoFormfactor = '1';
    var ezo_elements_to_check = Array();
    </script>
            <script>
    var old_jquery = null;
    var old_jquery_sign = null;
    function open_jquery_wrapper()
    {
        if(typeof $ezJQuery != 'undefined')
        {
            old_jquery = jQuery;
            old_jquery_sign = $;
            $ = $ezJQuery;
            jQuery = $ezJQuery;
        }
    }
    function close_jquery_wrapper()
    {
        if(typeof $ezJQuery != 'undefined')
        {
            $ = old_jquery_sign;
            jQuery = old_jquery;
        }
    }
    </script>
            <!-- START EZHEAD -->
            <script type='text/javascript'>
    var soc_app_id = '0';
    var did = 7676;
    var ezdomain = 'MY_SITE_URL';
    var ezoicSearchable = 1;
    </script>
            <!---->
            <!-- END EZHEAD -->
            <script src="//MY_SITE_URL/utilcave_com/templates/js/ezjquery-noconflict.js"></script>
            <script data-cfasync="false" data-pagespeed-no-defer type='text/javascript'>
    function ez_isclean( data ) {
        if (typeof data === 'undefined') { data = document.URL; }
        var re = /(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))(@|%2540|%40)((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;
        var isClean = !re.test(data);
        return isClean;
    }
    
    var ez_queue = new Array();
    function sort_queue(a, b)
    {
      if( a.priority < b.priority ) return -1;
      else if( a.priority == b.priority ) return 0;
      else return 1;
    }
    function execute_ez_queue()
    {
      ez_queue.sort( sort_queue );
    
      for( var i in ez_queue )
      {
            if(typeof ez_queue[i].method != "undefined")
            {
                try{
                    ez_queue[i].method.call( null );
                }
                catch (err) {
    
                }
            }
      }
    }
    
    var ez_ad_units = new Array();
    var ezslots = new Array();
    function ez_write_tag(d) {
        if(ez_isclean() && d instanceof Array) {
    
    		ez_ad_units[ez_ad_units.length] = d;
            var ezcmd = "googletag.cmd.push(function() {var divid = 'div-gpt-ad-"+d[1]+"-0';if(typeof ezlrarn == 'function'){ezlrarn(divid);}googletag.display(divid);});";
    		return ezcmd;
        }
        else {
            return "1+1";
        }
    }
    function in_array(needle, haystack) {
        var length = haystack.length;
        for(var i = 0; i < length; i++) {
            if(haystack[i] == needle) return true;
        }
        return false;
    }
    
            </script>
            <script data-cfasync='false' data-pagespeed-no-defer >var ezrpos = new Array();var ez_current_interval;var ez_current_load = 0;</script>
            <style>.ezoic-floating-bottom { display: none!important; }.ezoic-ad{display:inline-block;}</style>
            <style>.adtester-container-127 {display:none;}
    .adtester-container-124 {display:none;}
    .adtester-container-109 {display:none;}
    .adtester-container-119 {display:none;}
    .adtester-container-126 {display:none;}
    .adtester-container-115 {display:none;}
    .adtester-container-121 {display:none;}
    .adtester-container-118 {display:none;}
    .adtester-container-103 {display:none;}
    .adtester-container-110 {display:none;}
    .adtester-container-100 {display:none;}
    .adtester-container-122 {display:none;}
    .adtester-container-101 {display:none;}
    .adtester-container-108 {display:none;}
    .adtester-container-116 {display:none;}
    .adtester-container-107 {display:none;}
    .adtester-container-113 {display:none;}
    .adtester-container-111 {display:none;}
    .adtester-container-123 {display:none;}
    .adtester-container-120 {display:none;}
    .adtester-container-117 {display:none;}
    .adtester-container-106 {display:none;}
    .adtester-container-114 {display:none;}
    .adtester-container-125 {display:none;}
    .adtester-container-102 {display:none;}
    .adtester-container-104 {display:none;}
    .adtester-container-112 {display:none;}
    .adtester-container-105 {display:none;}
    </style>
            <script type="text/javascript" cf-async="false">var _ezaq = {"ab_test_id":"mod2","ab_test_val":"","ad_location_ids":"","adgroup_rank_id":-1,"adx_ad_count":0,"country":"US","device_height":528,"device_width":1280,"domain_id":7676,"forensiq_score":-1,"form_factor_id":1,"has_bad_words":0,"ip":"10.0.2.45","landing_page_url":"https://www.MY_SITE_URL/pnfw/register/","max_ads":4,"page_ad_positions":"","page_view_count":0,"page_view_id":"def5f284-07c9-4bb3-6298-cd32d1cdcbe3","pv_event_count":0,"referrer_id":0,"region":"eu-west-1","serverid":"52.211.65.6:29449","sub_page_ad_positions":"","t_epoch":1475652030,"template_id":147,"url":"https://MY_SITE_URL/pnfw/register/","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36","user_id":929718742,"visit_id":1299827616,"visit_uuid":"fa262828-7fba-40f9-7669-974e1079f741","word_count":0};var _ezim_d = {};var _ezat = {"domain_id":7676,"form_factor_id":1,"pageview_date":"2016-10-05","pageview_id":"def5f284-07c9-4bb3-6298-cd32d1cdcbe3","template_id":147,"url":"https://MY_SITE_URL/pnfw/register/","visit_uuid":"fa262828-7fba-40f9-7669-974e1079f741"};</script>
            <script data-cfasync='false' type="text/javascript" src="/ezoic/imp2.js?cb=137-7&v=1"></script>
            <script data-pagespeed-no-defer data-cfasync='false' type="text/javascript" src="/ezoic/banger.js?cb=137-7&bv=2&v=16&PageSpeed=off"></script>
        </head>
        <body>
            <script data-cfasync="false" type="text/javascript">
    
    if (typeof $ezJQuery == 'undefined') {
        if (typeof jQuery == 'undefined') {
            document.write('
                <scr'+'ipt type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js">
                </sc'+'ript>');
        } else {
            $ezJQuery = jQuery;
        }
    }
    
    if (typeof $ezJQuery == 'undefined' && typeof jQuery != 'undefined') {
        $ezJQuery = jQuery.noConflict(true);
    }
    
    if (typeof $ezJQuery != 'undefined') {
        $ezJQuery("body").mousemove(function(e){
          ez_last_activity_count = ez_tos_track_count;
        });
        $ezJQuery("body").keypress(function(e){
          ez_last_activity_count = ez_tos_track_count;
        });
        $ezJQuery(window).scroll(function(e){
          ez_last_activity_count = ez_tos_track_count;
        });
    } else {
        ez_last_activity_count = 8;
    }
            </script>
            <script type="text/javascript">
    var __ez_dims = (function() {
    	var setCookie = function( name, content, expiry ) {
    		return document.cookie = name+'='+content+((expiry)?';expires='+(new Date(Math.floor(new Date().getTime()+expiry*1000)).toUTCString()):'');
    	};
    	var ffid = 1;
    	var oh = window.screen.height;
    	var ow = window.screen.width;
    	var h = ffid === 1 ? oh : (oh > ow) ? oh : ow;
    	var w = ffid === 1 ? ow : (oh > ow) ? ow : oh;
    	var uh = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
    	var uw = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
    	setCookie('ezds', encodeURIComponent('ffid='+ffid+',w='+w+',h='+h), (31536e3*7));
    	setCookie('ezohw', encodeURIComponent('w='+uw+',h='+uh), (31536e3*7));
    })();
    </script>
            <script type='text/javascript' src='//MY_SITE_URL/utilcave_com/inc/tb.php?cb=137-7&shcb=5&template=orig'></script>
            <script>
    $ezJQuery(function() {
        if (typeof run_body_onload == 'function') {
            run_body_onload();
        }
        if (typeof ezoicJSPageLoad == 'function') {
            ezoicJSPageLoad($ezJQuery);
        }
    });
    </script>
        </body>
    </html>
    <!--[ezpicker:done]-->

    And I can now see tokens from the dashboard. What next?

    Thread Starter Wilbur

    (@ozu)

    Please which token will I pass for “YOUR_TOKEN” ? Or better still is there any way I could test using PostMan?

    • This reply was modified 8 years, 1 month ago by Wilbur.
    Thread Starter Wilbur

    (@ozu)

    Yes I see no tokens.
    I have checked and seem not to find the problem. This is my manifest file:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="https://schemas.android.com/apk/res/android"
              package="com.wilbur.blogger">
    
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    
        <uses-permission android:name="android.permission.GET_ACCOUNTS" />
        <uses-permission android:name="android.permission.WAKE_LOCK" />
        <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    
        <permission android:name="com.wilbur.blogger.permission.C2D_MESSAGE"
                    android:protectionLevel="signature"/>
        <uses-permission android:name="com.wilbur.blogger.permission.C2D_MESSAGE" />
    
        <application
            android:name=".activities.GApplication"
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <receiver
                android:name=".receivers.MyReceiver"
                android:enabled="true">
            </receiver>
    
            <receiver
                android:name="com.delitestudio.pushnotifications.PushNotifications$MessageReceiver"
                android:permission="com.google.android.c2dm.permission.SEND" >
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                    <category android:name="com.wilbur.blogger" />
                </intent-filter>
            </receiver>
    
            <activity
                android:name=".activities.SplashActivity"
                android:theme="@style/SplashTheme">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
    
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
            </activity>
            <activity...//removed the activities
        </application>
    
    </manifest>
    Thread Starter Wilbur

    (@ozu)

    I see this in debug:

    Finished Fire OS notifications	
    October 3, 2016 8:22 PM
    Do not send Fire OS notifications	
    October 3, 2016 8:22 PM
    Processing new chunk from offset 0	
    October 3, 2016 8:22 PM
    Starting Fire OS notifications	
    October 3, 2016 8:22 PM
    Finished Android notifications	
    October 3, 2016 8:22 PM
    Processing new subpage with 0 tokens	
    October 3, 2016 8:22 PM
    Processing new chunk from offset 0	
    October 3, 2016 8:22 PM
    Starting Android notifications	
    October 3, 2016 8:22 PM

    I didn’t see any token.

    • This reply was modified 8 years, 1 month ago by Wilbur.
    Thread Starter Wilbur

    (@ozu)

    I have verified that all the values are correct but I keep seeing the line “Token is null or has expired” in logcat and I haven’t gotten any notification.

    Thread Starter Wilbur

    (@ozu)

    Thanks for the reply. I will verify the values and get back to you guys.

    Thread Starter Wilbur

    (@ozu)

    Ok, thanks for our help.

    Thread Starter Wilbur

    (@ozu)

    _wc_average_rating certainly worked, special thanks for that. This link https://cld.wthms.co/bRQe/H4zWsbBH is not working so I don’t know what information you are trying to pass with it.

    About the _popularity tags, it works on my store. E.g https://storeurl?orderby=popularity sorts products according to the order of popularity.

    Sorry about the _newness tag, I just discovered that it is the same as sorting by date.

    Thread Starter Wilbur

    (@ozu)

    _wc_average_rating certainly worked, special thanks for that. This link https://cld.wthms.co/bRQe/H4zWsbBH is not working so I don’t know what information you are trying to pass with it.

    About the _popularity tags, it works on my store. E.g https://storeurl?orderby=popularity sorts products according to the order of popularity.

    Sorry about the _newness tag, I just discovered that it is the same as sorting by date.

    Thread Starter Wilbur

    (@ozu)

    The price worked. Thanks for that.

    But

    https://www.storeurl.com/wp-json/wc/v1/products?filter[orderby]=meta_value_num&filter[meta_key]=_rating

    https://www.storeurl.com/wp-json/wc/v1/products?filter[orderby]=meta_value_num&filter[meta_key]=_newness

    https://www.storeurl.com/wp-json/wc/v1/products?filter[orderby]=meta_value_num&filter[meta_key]=_popularity

    All returned empty response. But on the WordPress website, the response are not empty.

Viewing 11 replies - 1 through 11 (of 11 total)