Welcome Guest, Not a member yet? Register   Sign In
Wap site By CI
#4

[eluser]esra[/eluser]
WAP supports HTML and XML, but WAP mobile devices use WML (Wireless Application Protocol) which is based on XML. To my knowledge, all of the mobile device operating systems support WAP and WML. WAP uses WMLscript which is similar to Javascript but with less CPU and memory overhead. You will most likely experience a performance hit if you attempt to use HTML and Javascript in your views even though mobile devices can process HTML code.

CI supports a user_agent library and a user_agent configuration file. Among other things, the HTTP header provided by the client device's browser includes user agent information about the platform, browser, and device. If the site is going to solely support WAP, CI should load whatever view files and embedded script files created for the application. You will probably want to detect if a mobile device is being used in order to restrict access to mobile devices and issue a warning message if a standard HTML browser is attempting to access the site. The user agent detection could be handled using a display_override hook.

If you want to support both HTML and WML from a single site, you need to detect the user agent and include conditional code in your controller to selectively use HTML or WML views based on the current user agent. So you will need to create two sets of views--one for HTML and one for WML. You will need to come up with a unique naming scheme for the views if both types are stored in the same directories or subdirectories or create separate device-dependent directories to store view files with the same naming scheme. The applicable view code would load either Javascript or WMLscript. In this case, you also should be able to handle the user agent detection using a display_override hook.

Spend some time reading about the User_agent library and hooks in the user guide. If you get stuck on the hook code, I may have something but need to test it first with a later version of CI.

Hidden away on the Microsoft MSDN site is Browser application for simulating WAP/WML for Windows CE and Windows Mobile 5/6 devices from a PC. I believe this is a custom version of IE designed to render the smaller screens. I'm not sure if there is something similar available for Linux/Unix so you probably need to research this on your own.


Messages In This Thread
Wap site By CI - by El Forum - 03-31-2008, 12:30 PM
Wap site By CI - by El Forum - 03-31-2008, 01:31 PM
Wap site By CI - by El Forum - 03-31-2008, 01:52 PM
Wap site By CI - by El Forum - 03-31-2008, 03:10 PM
Wap site By CI - by El Forum - 04-01-2008, 03:00 AM
Wap site By CI - by El Forum - 05-21-2008, 10:21 AM
Wap site By CI - by El Forum - 08-08-2008, 02:53 AM
Wap site By CI - by El Forum - 08-11-2009, 11:41 AM
Wap site By CI - by El Forum - 08-11-2009, 01:40 PM
Wap site By CI - by El Forum - 08-11-2009, 01:44 PM
Wap site By CI - by El Forum - 08-11-2009, 02:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB