Unable to detect desktop browsers

I have this HTTP request, I expected this, but WURFL is returning that. Please provide enough data to reproduce the problem.
kolli
Posts: 3
Joined: Wed Jul 22, 2015 12:10 am

Unable to detect desktop browsers

Postby kolli » Wed Jul 22, 2015 12:15 am

I am using java api 1.6 version and wurfl.xml 1.6 beta version .


Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Firefox/38.0

For this useragent, we are not able to find device_os and browser details.
make:generic web browser.

Please help us .

Elliotfehr

Re: Unable to detect desktop browsers

Postby Elliotfehr » Wed Jul 22, 2015 8:49 am

Hello,

It seems that you may be running the API under high performance mode which will not attempt to match desktop devices. When running the API under accuracy mode, you should see:

device id: firefox_38_0
device_os: Desktop
mobile_browser: Firefox Desktop
advertised_device_os: Windows
advertised_browser: Firefox

Thank you,

Elliot

kolli
Posts: 3
Joined: Wed Jul 22, 2015 12:10 am

Re: Unable to detect desktop browsers

Postby kolli » Thu Jul 23, 2015 1:47 am

Hi Elliot, What do you mean by high performance mode and accuracy mode.

When I am running in my local, It should return device_os and browser but not.
Let me know, how do I identify high performance & accuracy modes.





Thanks
Kolli

Elliotfehr

Re: Unable to detect desktop browsers

Postby Elliotfehr » Thu Jul 23, 2015 8:54 am

The WURFL API has two performance modes that can be set depending on use case. In high performance mode, the API will not attempt to match desktop devices, while in high accuracy mode, the API will attempt to match all devices.

The documentation for the Java API can be found here. Below is a small code sample that demonstrates how this can be set:

Code: Select all

import net.sourceforge.wurfl.core.Device;
import net.sourceforge.wurfl.core.EngineTarget;
import net.sourceforge.wurfl.core.GeneralWURFLEngine;

public class Wurfl {

    public static void main(String[] args) {
        GeneralWURFLEngine wurfl = new GeneralWURFLEngine("wurfl.xml");
        wurfl.setEngineTarget(EngineTarget.accuracy);

        String user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Firefox/38.0";

        Device device = wurfl.getDeviceForRequest(user_agent);
        System.out.println("Is Tablet: " + device.getCapability('is_tablet'));
        System.out.println("Can Assign Phone Number: " + device.getCapability('can_assign_phone_number'));
    }
}

d man
Posts: 1
Joined: Sun Jul 26, 2015 12:58 pm

Re: Unable to detect desktop browsers

Postby d man » Sun Jul 26, 2015 1:03 pm

ok hi everyone am new.
now I stumbled on the scientiamobile community support forum while searching for help with my device.
please I need to know where I can get drivers for the mpman ph350 phone, the phone wont boot its stuck in a boot loop and I need help please.

kolli
Posts: 3
Joined: Wed Jul 22, 2015 12:10 am

Re: Unable to detect desktop browsers

Postby kolli » Mon Jul 27, 2015 1:45 am

Thanks for clarifying.

Till now , I have not used setEngineTarget() method in my code, I assume this will not affect any existing ?

Elliotfehr

Re: Unable to detect desktop browsers

Postby Elliotfehr » Mon Jul 27, 2015 8:53 am

Kolli,

This should not affect any of your existing code, however it may affect your performance depending on the type of traffic you experience since high accuracy mode will attempt to match both mobile and desktop devices.

Thank you,

Elliot


Who is online

Users browsing this forum: No registered users and 10 guests