Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7855585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:25:58+00:00 2026-06-02T20:25:58+00:00

I have 2 questions, regarding Sencha touch and phone gap ; I am reading

  • 0

I have 2 questions, regarding Sencha touch and phone gap ;

I am reading SenchaTouch CookBook by Ajith kumar. I am following the example programs given in the 1st chapter. So according to that i did the following.

THis is my index.html

<!DOCTYPE HTML>
    <html>
        <head>
            <title>Yapps! - Your daily applications!</title>
            <link rel="stylesheet" href="sencha-
                touch/resources/css/sencha-touch.css" type="text/css">
                <link rel="stylesheet" href="sencha-
                    touch/resources/css/yapps-all.css" type="text/css">
                <script type="text/javascript" charset="utf-8"
                    src="phonegap.1.0.0.js"></script>
                <script type="text/javascript" charset="utf-8" src="sencha-
                    touch/sencha-touch.js"></script>
                <script type="text/javascript" charset="utf-8"
                    src="ch01/ch01_03.js"></script>
                <script type="text/javascript" charset="utf-8" src="sencha-
                    touch/yapps-all.js"></script>



        </head>
        <body></body>
    </html>

The ch01_03.js file. The told to add these .JS files inside the WWW folder, but i am unable to add any files inside that folder therefore i added it out of the folder.

Ext.setup({
          onReady: function() {
          var supportedFeatures = "Ext.supports.AudioTag : " +
          (Ext.supports.AudioTag ? "On" : "Off");
          supportedFeatures += "\nExt.supports.CSS3BorderRadius : " +
          (Ext.supports.CSS3BorderRadius ? "On" : "Off");
          supportedFeatures += "\nExt.supports.CSS3DTransform : " +
          (Ext.supports.CSS3DTransform ? "On" : "Off");
          supportedFeatures += "\nExt.supports.CSS3LinearGradient : " +
          (Ext.supports.CSS3LinearGradient ? "On" : "Off");
          supportedFeatures += "\nExt.supports.Canvas : " +
          (Ext.supports.Canvas ? "On" : "Off");
          supportedFeatures += "\nExt.supports.DeviceMotion : " +
          (Ext.supports.DeviceMotion ? "On" : "Off");
          supportedFeatures += "\nExt.supports.Float : " +
          (Ext.supports.Float ? "On" : "Off");
          supportedFeatures += "\nExt.supports.GeoLocation : " +
          (Ext.supports.GeoLocation ? "On" : "Off");
          supportedFeatures += "\nExt.supports.History : " +
          (Ext.supports.History ? "On" : "Off");
          supportedFeatures += "\nExt.supports.OrientationChange : " +
          (Ext.supports.OrientationChange ? "On" : "Off");
          supportedFeatures += "\nExt.supports.RightMargin : " +
          (Ext.supports.RightMargin ? "On" : "Off");
          supportedFeatures += "\nExt.supports.SVG : " +
          (Ext.supports.SVG ? "On" : "Off");
          supportedFeatures += "\nExt.supports.Touch : " +
          (Ext.supports.Touch ? "On" : "Off");
          supportedFeatures += "\nExt.supports.Transitions : " +
          (Ext.supports.Transitions ? "On" : "Off");
          supportedFeatures += "\nExt.supports.TransparentColor : " +
          (Ext.supports.TransparentColor ? "On" : "Off");
          supportedFeatures += "\nExt.supports.VML : " +
          (Ext.supports.VML ? "On" : "Off");
          Ext.Msg.alert("INFO", supportedFeatures);
          }
          });

1.) The problem is that i am only seeing a blank screen when i run it on my iPhone and Stimulator. What is this happening, and what should i do to get the Alert displayed on the view ?

2.) I need to detect if the device i am running the application. In the book it shows how to detect an iPad, Android application and Blackberry. But not an iPhone. How can i detect an iPhone ?

Ext.setup({
          onReady: function() {

          if (Ext.is.Android)
          Ext.Msg.alert("INFO", "Welcome Android user!");
          if (Ext.is.Blackberry)
          Ext.Msg.alert("INFO", "Welcome Blackberry user!");
          if (Ext.is.iPad)
          Ext.Msg.alert("INFO", "Welcome iPad user!");

          } });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:25:59+00:00Added an answer on June 2, 2026 at 8:25 pm

    Since this question is tagged under sencha-touch-2, I assume that you are using Sencha Touch 2.

    Ext.is is deprecated for Sencha Touch version 2.0

    Instead, you can use Ext.env.OS package to detect the operating system, that is being running on the device.

    Also, you can use the is property to detect a p’cular device like iPad, iPhone, Android etc ..

    • Ext.os.is.Android : Android platform
    • Ext.os.is.iPhone : iPhone
    • Ext.os.is.iPad : iPad etc ..

    EDIT :

    Yes, you can detect the p’cular device. Check the below code …

    var navigation = Ext.global.navigator,
        userAgent = navigation.userAgent,
        osEnv, osName, deviceType;
    
    Ext.os = osEnv = new this(userAgent, navigation.platform);
    
    osName = osEnv.name;
    
    var search = window.location.search.match(/deviceType=(Tablet|Phone)/),
    nativeDeviceType = window.deviceType;
    
    if (search && search[1]) {
        deviceType = search[1];
    }
    else if (nativeDeviceType === 'iPhone') {
        deviceType = 'Phone';
    }
    else if (nativeDeviceType === 'iPad') {
        deviceType = 'Tablet';
    }
    

    Good example on Sencha Touch MVC with PhoneGap

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some questions regarding the following css that I found: html, body {
I have some questions regarding java finalization. For example I have one class FileHelper
I have some questions regarding Max() What does the following query mean? SELECT MAX(X)
I have few questions regarding safety and correctness of following hypothetical timer service: @Singleton
I have two questions regarding array: First one is regarding following code: int a[30];
I have 3 questions regarding the following function. I marked them as comments in
I have two questions regarding client-side validation in ASP, relating to the following setup:
I have some questions regarding reading and writing to CSV files (or if there
I have following questions regarding strings in C++: 1>> which is a better option(considering
I have two questions regarding the following function. Obviously, it is about a chat.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.