How do I get the platform on which my application is executed?

I need to determine on which platform (iOS or Android) my application is currently executed. Is there a way to do this? Until now I just found the Capabilities.os property which is I think for exactly this case. The problem with that property is, that it only return the different Windows version, or if the platform is a Mac or Linux or iPhone OS (is that iOS? I don't know...).
Are there any ideas how I could solve this?

Thanks guys,
the solution of Colin Holgate works for me, although it should be
if (Capabilities.version.indexOf('IOS') >= 0) 
if i want to check if my application runs on iOS. If I want to check for Android I use, of course, AND instead of IOS.

Similar Messages

  • I downloaded new Firefox but now can't open Firefox at all. It says it is not supported on my system. How can I get the earlier version which I deleted?

    I downloaded new Firefox but now can't open Firefox at all. It says it is not supported on my system. How can I get the earlier version which I deleted?

    http://www.mozilla.com/en-US/firefox/4.0/system-requirements/ <br />
    Mac
    Operating Systems
    * Mac OS X 10.5
    * Mac OS X 10.6
    Recommended Hardware
    * Macintosh computer with an Intel x86 processor
    * 512 MB of RAM
    * 200 MB hard drive space
    For older Macs that aren't supported in Firefox 4.0, try TenFourFox for PowerPC's running Mac 10.4.11 & 10.5.8 . <br />
    http://www.floodgap.com/software/tenfourfox/

  • How can I get  the MDX-statement which is generated in a query?

    Can I somehow get the MDX statement, which is generated when I create a Query via BeX Query Designer? I am using JCo to connect to BW (3.0b) and to execute MDX statements from a standalone JAVA-application. It would be very helpful to have the statements, so that I don't have to create them by myself.
    If this it not possible...is there any reference regarding the MDX statements, I could use?

    Hi Markus,
    The Query Designer generates no MDX, so you can't find any persisted MDX Statements. But you can do a trick, you can use the SAP BW OLE DB Provider in Excel. This Tool generates MDX Statements check this link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/a06a51f3-0201-0010-8591-b742cfafd267
    I hope this helps.
    best regards
    Kai

  • How can i get the realpath of my web application in jsf manage bean

    in jsp, i can use application.getRealPath("/")
    but in jsf how can i get the realpath in manage bean and initializean variable.
    thanks

    FacesContext aFacesContext = FacesContext.getCurrentInstance();          
    ServletContext context = (ServletContext)aFacesContext.getExternalContext().getContext();
    String rootpath = context.getRealPath("/");
    i use the code like that ,it can work , but when i click a button in my web page and call a function of java bean to read a file in "rootpath" , only odd number click it do well , even number click it do nothing and navigate to a blank page.
    how can i do that ,.
    my english is too pool ,sorry.

  • How can I get the lib files which supported jsf?

    In one book , That introduce me to get the lib files from a jsf folder ,after you install the jwsdk1.3 ,now ,I installed the 1.5,but I cann't find this jsf folder.where I can get these lib files ? Thanks very much.

    Try data rescue or some other program. However, before proceeding turn off TM and avoid that muck up the next time you connect. AFAIK, however, it shouldn't have happened without a dialog box popping up allowing you to not use it for TM.
    See Pondini's TM FAQs for more information..

  • How can i get the component value which is in jtable

    hi all,
    i have a JTable and i added JSpinner component in 1st column.
    i want to get the value of the component.
    i tried to get the value using the following code
    for(int i=0;i<5;i++)
    ((JSpinner)tableDisbursals.getEditorComponent().getComponentAt(i,1)).getValue()it throwing NullPointerException
    is that correct? what i did
    thanks in advance
    daya

    hi all,
    thanks for replay
    the following code is demo
    import hivosCommonMain.function.ComProperties;
    import hivosCommonMain.function.FillCompFN;
    import java.awt.Component;
    import java.util.Date;
    import java.util.Vector;
    import javax.swing.AbstractCellEditor;
    import javax.swing.JFrame;
    import javax.swing.JSpinner;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellEditor;
    public class SpinnerDemo extends JFrame{
         DefaultTableModel tableModel;
         JTable table;
         private String[] columnNames = {"First Name",
                "Last Name",
                "Sport",
                "# of Years",
                "Vegetarian"};
         private Object[][] data = {
                   {"Mary", "12/Aug/2005",
                   "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "12/Aug/2005",
                   "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "12/Aug/2005",
                   "Knitting", new Integer(2), new Boolean(false)},
                   {"Sharon", "12/Aug/2005",
                   "Speed reading", new Integer(20), new Boolean(true)},
                   {"Philip", "12/Aug/2005",
                   "Pool", new Integer(10), new Boolean(false)}
         public SpinnerDemo(){          
            tableModel     = new DefaultTableModel(data, columnNames);
            table   = new JTable(tableModel) {
                 public boolean isCellEditable(int row, int col) {
                      return true;
            table.getColumnModel().getColumn(1).setCellEditor(new MyCellEditor());
            Component c = table.getEditorComponent();
            Component c2 = c.getComponentAt(1, 0);
            JSpinner spinner = (JSpinner)c2;       
            System.out.println(spinner.getValue());
            getContentPane().add(table);
            setVisible(true);
            pack();
         public static void main(String args[]){
              new SpinnerDemo();
         class MyCellEditor extends AbstractCellEditor implements TableCellEditor {
              JSpinner sDate;
              Object value;
              public MyCellEditor() {
                   sDate = new JSpinner(FillCompFN.getJSpinnerModel());
                   sDate.setEditor(new JSpinner.DateEditor(sDate, ComProperties.DATE_FORMAT));
                   ((JSpinner.DefaultEditor)sDate.getEditor())
                                       .getTextField().setHorizontalAlignment(JTextField.RIGHT);
                   sDate.setOpaque(true);
              public Object getCellEditorValue() {
                   return ((JSpinner.DefaultEditor)sDate.getEditor())
                        .getTextField().getText();
              public Component getTableCellEditorComponent(JTable table,
                   Object value,
                   boolean isSelected,
                   int row,
                   int column) {
                   this.value = value;
                   try{
                        if(value.toString().length() > 0)
                             ((JSpinner.DefaultEditor)sDate.getEditor())
                             .getTextField().setText(value.toString());
                        else
                             sDate.setValue(new Date());
                   }catch(Exception e){
                        e.printStackTrace();
                        sDate.setValue(new Date());
                   return sDate;
    }

  • How to find out the position in which an application hangs

    Hi,
    is there any possibility to find out the position in a source, in which a deployed application hangs?
    For example, there is an endless loop in an application, which is already deployed. In runtime the application hangs in this loop. How can I findout in which line the application hangs?
    In other words, how can I see the stack of a certain process,for example, http_workerx?
    Regards,
    Ali
    Message was edited by:
            Ali Maraschi-Schouschtari

    Hi Ali,
    With <b>SAP NetWeaver Composition Environment (CE) 7.1 SP3</b> it is very easy.
    <i>1.) Open the SAP Management Console
    2.) Go to AS Java Threads tree node - you will see all the threads that are currently started on the system
    3.) Check for threads that are colored in red - it takes about 30 sec the system to detect that an HTTP thread (http_workerx), as it is in your case, is hanging/executing endless loop.
    4.) Right click on the hanging thread (colored in red) and pick 'Callstack' from the pop-up menu
    5.) In the new window you will see the stack-trace showing what exactly this hanging thread is doing at the moment.</i>
    With the <b>previous versions (or SPs)</b> you need to apply a little bit more technical skills for the same result. <i>(1) you need to do produce thread dump of the server that is suspected to have hanging thread</i> and (<i>2) to analyze this thread dump (check what the threads in Running state are doing).</i> As it is in your case with the HTTP worker threads, their names are also printed in the thread dump, so you can focus only on them.

  • How can I get the file path which located on webapps/MY_APPS ?

    Hi,
    I use tomcat as our servlet container.OS is win2k srv
    my project was put on x:\tomcat\webapps\MY_APPS
    and I could use getServletContext().getRealPath("/") within a servlet to get x:\tomcat\webapps\ROOT\MY_APPS,
      public void doPost(HttpServletRequest request,
                         HttpServletResponse response)
        throws ServletException, IOException
           String myAppsPath = getServletContext().getRealPath("/");
      }but I could not utilize this method within a normal help class
    any suggestion will be welcome.
    thanks in advance.

    try this:
    package com.sample;
    import java.io.File;
    public class SampleClass
      public SampleClass()
       * @param args
      public static void main(String[] args)
        SampleClass sampleClass = new SampleClass();
        File f = new File("SampleClass.class");
        System.out.println(f.getAbsolutePath());
    }

  • How to get the frame rate of my application

    Hi again...
    How can I get the frame rate of my application?
    I also want the frame rate value to be the title of the frame, updated every second. How do I do that?
    thanks in advance...

    To get the path where your application has been installed you have to do the following:
    have a class called "what_ever" in the folder.
    then you do a litte:
    String path=
    what_ever.class.getRessource("what_ever.class").toString()
    That get you a string like:
    file:/C:/Program Files/Cool_program/what_ever.class
    Then you process the result a little to remove anything you don't want:
    path=path.substring(path.indexOf('/')+1),path.lastIndexOf('/'))
    //Might be a little error here but you should find out //quickly if it's the case
    And here you go, you have a nice
    C:/Program Files/Cool_program
    which is the path to your application.
    Hooray

  • How can I get the position assigned to the user in CRM .

    Hi all ,
    How can we get the positions to which a  user is assigned as a holder in CRM .
    Thanks ,
    Naval bhatt .

    Hi,
         Use the PPM toolkit class CL_CRM_PPM_UM_TOOLKIT. You can use the method You can use the method GET_ASSIGNMENTS_OF_USER which returns positions held by an user(user name).  You may also find the method GET_POSITION_OF_USER useful. It accepts username and the organization ID and will return the positions held by the user under that organization.
      This class always uses the current plan (01). If you want otherwise, you can use the FM RH_STRUC_GET. As to how this FM should be used, look inside the above said methods.
    Regards,
    Arun Prakash
    Edited by: Arun Prakash Karuppanan on May 11, 2010 11:40 AM

  • I am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier

    i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos

    Well I'll guess you're using iPhoto 11:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • How do I get the PDF Convert feature of Adobe Acrobat Pro Extended 9.4.4, which makes a PDF of a web page interactive, to work in Firefox 4.0.1?

    I just installed (on my Windows 7 Ultimate (64 bit) operating system/Intel i5 CPU M560 2.67 GHz) and am now using as my default browser Firefox 4.0.1 because Internet Explorer 9 was giving me so much trouble--lack of display of web content, lack of PDF reproduction when web content displayed, screwball formatting display, etc., all of which has been remedied by the mere installation of Firefox 4.0.1.
    How do I get the PDF Convert feature of Adobe Acrobat Pro Extended 9.4.4, which converts a web page to an interactive PDF, to set up and work on Firefox 4.0.1?

    You can not do that using Adobe Acrobat 9. Adobe never made a create PDF add-on for Firefox for use with Adobe Acrobat 9. They created a Firefox add-on for use with Acrobat X, but currently that one does not work with Firefox 4 though Adobe are working on an update.

  • How to get the last wbs which is displayed  in transaction code cj03?

    Dear Experts,
       I want to get the last wbs which are displayed in  transaction code cj03, i have written below program,but i found it is incorrect. because the sort of wbs  in cj03 is not equal to table prps. the last wbs in cj03  is not equal to table prps.
    who can tell me how to get last wbs which is displayed in cj03?
      SELECT
         PRPS~STUFE
         PRPS~POSID
         PROJ~POST1
         INTO CORRESPONDING FIELDS OF TABLE WA_PRPS_TEMP FROM PRPS INNER JOIN PROJ ON PROJPSPNR = PRPSPSPHI
         WHERE PROJ~PSPID EQ P_PROJECT.
      WA_TLINE = LINES( WA_PRPS_TEMP ).
      READ TABLE WA_PRPS_TEMP INDEX WA_TLINE.
      IF WA_PRPS_TEMP-POSID = P_lastWBS.
        P_LAST = 1
    endif.
    Best Regards,
    Merry

    Hi Merry  ,
      The WBS elements are stored in the table PRPS , so please try using the conversion exit and use the data in internal format then use it in the IF condition.
    Check the FM CONVERSION_EXIT_ABPSN_INPUT and CONVERSION_EXIT_ABPSN_OUTPUT
    Regards,
    Arun

  • I purchased a magazine using the Zinio app which I'd recently downloaded on to a recently purchased iPad. I received an error message at the time (can't recall the details) but have since been invoiced for the $8.99. How can I get the Magazine I purchased

    I purchased a magazine using the Zinio app which I'd recently downloaded on to a recently purchased iPad. I received an error message at the time (can't recall the details) but have since been invoiced for the $8.99. How can I get the Magazine I purchased?

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
    Canceling a Digital Subscription
    http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
     Cheers, Tom

  • How can we get the image which is stored in clipboard by labview, is there any functions available like text from clip board

    How can we get the image which is stored in clipboard by labview, i can get the text in clipboard by using invoke node directly.but i cannot get the image, is there any functions or vi available.(image is in Png format)

    The Read from Clipboard method is, unfortunately, limited to text. If the clipboard contains an image then you need to use OS-specific functions calls. This is an example program for Windows. It's old, but it should still work.

Maybe you are looking for