Languages

Menu
Sites
Language
Developing own Browser app using HTML5 on TIZEN

Hi! All,

We are developing a new sample browser application on HTML5 & JQuery using Tizen SDK. 

But , Till now we are unable to find any possible APIs  (Like in Android WebView , Webkit etcs., ) or Scripts  to develop our own Browser.

Can any one please Suggest us , Is there any possible way to develop our own browser app for Tizen ?

Thanks in advance.,

-Ganesh Kumar R.

 

 

 

 

 

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

9 Replies
John Ixion
Hi Ganesh, web apps are supposed to run on (almost) all browsers imo ;)
John Ixion
forgot: Tizen = Linux + Webkit = web apps without browser. Installing another browser will probably be possible but it doesn't make sense imo
John Ixion
forgot#2: "browser app" = browser, not a web app, right ? :)
Ganesh Kumar R
Hi! Oliver., Thanks, Liked your bullet response. Let me improve my question to make you understand. Actually am trying to create (develop) a "Demo Browser" with some additional features . For example in Android there are : UC Browser - https://play.google.com/store/apps/details?id=com.UCMobile.intl Dolphin Browser - https://play.google.com/store/apps/details?id=mobi.mgeek.TunnyBrowser&hl=en I need develop a similar apps in Tizen. Hope now my query is improved, Kindly advise me the possible way to achieve my requirement as earlier. Thanks., ganesh kumar r.
Ganesh Kumar R
Olivier ? Any sugestion on this ?
Marco Buettner
Imo it would better if you write your browser as native application.... UC browser and Dolphin also written in nativ languages :)
Sang-Jun Park

1st, https://developer.tizen.org/ko/documentation/dev-guide/2.2.1?redirect=https%3A//developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/index.html

2nd, as far as I know, tizen =linux +open c++APIs

About 1st, webkit is ported on tizen optimal.

Good luck  to your browser for everybody.

 

Sang-Jun Park

 

sample(sc) for tizen webkit browser

https://developer.tizen.org/documentation/dev-guide/2.2.1?redirect=https%3A//developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/index.html&langredirect=1

*you can use tizen webkit just in 1line of "LoadUrl()" API,  resultingly.

Sang-Jun Park
 
sorry it don't work below url ...
you can find  delow contents in web tutorial

Task: Web Viewer

This tutorial, based on the WebViewer sample delivered with the Tizen SDK, demonstrates how you can use the Tizen::Webnamespace to link your application to the Web by embedding the native Web browser functionality in your application. For more information on the sample functionality, see WebViewer Sample Overview.

The tutorial builds upon the elements described in Initializing the Web Control Instance, and consists of the following parts:

The tutorial does not cover information on general Tizen native application structure or on using the UI elements; for those issues, see App Tutorial and UI Tutorial.

This sample is a fully functional Web browser skeleton application which allows you to access URLs from the Web.

The application includes the following UI controls:

  • Form (__pMainForm) for creating the base of the WebViewer operations.
  • EditField (__pEdit) for entering the URL values.
  • Button (__pButton) for loading the Web page.
  • Footer items (such as footerItem1) for handling browser history.

Figure: WebViewer form

WebViewer form

To Initialize the Application

  1. WebViewer.h Header File
    1. To begin with, make sure that the FWeb.h header that contains the required Web modules is included in the application header file.

      #include <FApp.h>
      #include <FBase.h>
      #include <FSystem.h>
      #include <FUi.h>
      #include <FWeb.h>
    2. The actual functionality in this sample application requires a few listener interfaces, such asTizen::Ui::IActionEventListener for listening to button actions. TheTizen::Web::Controls::IWebKeypadEventListener interface is used for listening to keypad events invoked by HTML tags, such as <input> and <textarea>. These interfaces are defined inside the WebViewer class constructor.

      class WebViewer
         : // ...
         , public Tizen::Ui::IActionEventListener
         , public Tizen::Web::Controls::ILoadingListener
         , public Tizen::Web::Controls::IWebKeypadEventListener
      {
    3. The methods contained within the above interfaces are declared.

         public:
            virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
    4. Declare a set of pointers for the UI and Web controls. These are initialized with the CreateWebForm() method in the WebViewer.cpp source file.

         private:
            result CreateWebForm(void);
            Tizen::Base::String GetValidUrl(Tizen::Base::String& url);
      
            Tizen::Ui::Controls::Form* __pMainForm;
            Tizen::Web::Controls::Web* __pWeb;
            Tizen::Ui::Controls::EditField* __pEdit;
      }
  2. WebViewer.cpp Source File

    A Web browser application with a set of UI controls requires an expanded set of imported namespaces.

    In addition to Tizen::BaseTizen::Base::UtilityTizen::SystemTizen::AppTizen::Ui, and Tizen::Ui::Controls, you also need the Tizen::Web::Controls namespace that contains the Web control, and the Tizen::Graphics namespace that contains theTizen::Graphics::Rectangle abstraction class required for drawing the UI elements on the device screen.

    The full list of namespaces is:

    using namespace Tizen::Base;
    using namespace Tizen::Base::Utility;
    using namespace Tizen::Graphics;
    using namespace Tizen::Locales;
    using namespace Tizen::System;
    using namespace Tizen::App;
    using namespace Tizen::Ui;
    using namespace Tizen::Ui::Controls;
    using namespace Tizen::Web::Controls;

To Create the Web Control

The Web control creation is implemented in the WebViewer.cpp file.

The UI of the application, including the Web control, is created inside the CreateWebForm() method that is called when the application starts.

The only parameter required by the Web instance is the size of its rectangular area. Finally, event listeners are set for data loading and the overlay keypad, which is shown when the user clicks the URL edit field.

result
WebViewer::CreateWebForm(void)
{
   // Create form, footer, edit field, and button

   __pWeb = new (std::nothrow) Web();

   bound = __pMainForm->GetClientAreaBounds();
   r = __pWeb->Construct(Rectangle(0, EDIT_LINE_HEIGHT + EDIT_LINE_BOTTOM_MARGIN, bound.width,
                         bound.height - EDIT_LINE_HEIGHT - EDIT_LINE_BOTTOM_MARGIN));

   r = __pMainForm->AddControl(__pWeb);

   setting.SetInputStyle(INPUT_STYLE_OVERLAY);
   r = __pWeb->SetSetting(setting);

   __pWeb->SetLoadingListener(this);
   __pWeb->SetWebKeypadEventListener(this);

   __pWeb->SetFocus();

   return r;
}

To Control the Web Browser

The Web browser control is implemented in the WebViewer.cpp file.

The user actions related to the Web browser are handled in the OnActionPerformed() event handler. The Back andForward footer items send back and forward commands to the Web control with the GoBack() and GoForward()methods. This browsing history function does not need to be implemented separately, it is integrated into the Webcontrol.

The LoadUrl() method is used to access the Web page whose URL the user has entered into the edit field.

void
WebViewer::OnActionPerformed(const Control& source, int actionId)
{
   String url;
   switch (actionId)
   {
      case AC_BUTTON_WEB_BACK:
      {
         __pWeb->GoBack();
      }
         break;

      case AC_BUTTON_WEB_FORWARD:
      {
         __pWeb->GoForward();
      }
         break;

      case AC_BUTTON_WEB_GOTO:
      {
         url = __pEdit->GetText();

         __pWeb->LoadUrl(GetValidUrl(url));
         __pMainForm->RequestRedraw(true);
      }
         break;

      case AC_BUTTON_WEB_STOP:
      {
         __pWeb->StopLoading();
      }
         break;

      default:
         break;
   }

   return;
}

Where to Go Next