mobile_browser is not defined in WURFL

I have this HTTP request, I expected this, but WURFL is returning that. Please provide enough data to reproduce the problem.
shenjin
Posts: 1
Joined: Tue Sep 20, 2016 5:05 pm

mobile_browser is not defined in WURFL

Postby shenjin » Tue Sep 20, 2016 5:23 pm

Hello,

I've been using WURFL OnSite for Java, and have been having troubles extracting certain capabilities. According to the WURFL capabilities page (https://www.scientiamobile.com/wurflCapability), there should be a "mobile_browser" capability field which returns information about the device browser. However when I try extracting the "mobile_browser" capability, I get a capability not defined exception. Below is the code and error.

Code: Select all

package wurfl;

import com.scientiamobile.wurfl.core.Device;
import com.scientiamobile.wurfl.core.EngineTarget;
import com.scientiamobile.wurfl.core.GeneralWURFLEngine;

public class wurfl {

	public static void main(String[] args) {
		GeneralWURFLEngine wurfl = new GeneralWURFLEngine(
				"/Users/shenjin/Downloads/onsite_evaluation_1.8.0.0_Java_API/release-eval/core/release/wurfl.xml");
        wurfl.setEngineTarget(EngineTarget.accuracy);

        String user_agent = "Mozilla/5.0 (Linux; Android 4.2.1; N9600 Build/JOP40D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36";

        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"));

		System.out.println("Mobile Browser: "
				+ device.getCapability("mobile_browser"));
    }
}
Exception in thread "main" com.scientiamobile.wurfl.core.exc.CapabilityNotDefinedException: Capability: mobile_browser - Capability: mobile_browser is not defined in WURFL
at com.scientiamobile.wurfl.core.i.a(Unknown Source)
at com.scientiamobile.wurfl.core.m.getCapability(Unknown Source)
at com.scientiamobile.wurfl.core.DefaultDevice.getCapability(Unknown Source)
at wurfl.wurfl.main(wurfl.java:22)
Is this something that's just not supported in the latest WURFL OnSite Java client? I noticed that there are a lot fewer capabilities than the 500+ advertised on the site.

Code: Select all

////wurfl.getAllCapabilities();
[mobile_browser_version, 
resolution_height, 
resolution_width, 
is_wireless_device, 
is_tablet, 
preferred_markup, 
brand_name, 
can_assign_phone_number, 
xhtml_support_level, 
ux_full_desktop, 
device_os, 
is_smarttv, 
model_name, 
marketing_name, 
device_os_version, 
pointing_method]

//wurfl.getAllVirtualCapabilities();
[is_app, 
is_app_webview, 
is_mobile, 
is_phone, 
is_full_desktop, 
advertised_browser, 
is_smartphone, 
is_robot, 
complete_device_name, 
is_largescreen, 
advertised_device_os, 
is_android, 
is_xhtmlmp_preferred, 
device_name, 
is_html_preferred, 
advertised_browser_version, 
is_windows_phone, 
is_ios, 
is_touchscreen, 
is_wml_preferred, 
form_factor, 
advertised_device_os_version]
Any help is appreciated,
Thanks!

david
Posts: 20
Joined: Thu Jun 30, 2016 9:54 am

Re: mobile_browser is not defined in WURFL

Postby david » Wed Sep 21, 2016 1:32 pm

Hello shenjin,

If you are using the evaluation version of Java Onsite, there is a limited number of capabilities available and unfortuantely `mobile_browser` is not one of them. You can find a list of capabilities that the evaluation license has here: https://www.scientiamobile.com/page/cap ... evaluation

Let me know if you need to specifically test `mobile_browser` or any other capabilities that are not listed and I can set you up with a trial version of Java Onsite with the specific capabilities you need.


Who is online

Users browsing this forum: No registered users and 15 guests