BPS API to return to the charging source

Hello Guyz is there any API BPS to return the value of loader Type means that the load is loading USB or Charger taken

Yes, search for the function battery_info_get_charger_name() in battery.h BPS. Here are all the battery.h functions available:
https://developer.BlackBerry.com/native/reference/core/com.QNX.doc.bps.lib_ref/topic/manual/battery...

This is the name of shipper returned:
Not connected: "none."
Wall charger: "USB DCP.
USB in the desktop: "USB Host".

There are probably other values, but I don't have the time to test it yet. You can quickly get a peek at all the values accessible in battery.h by entering this url in your mobile browser:
file:///PPS/system/BattMgr/status

Don't forget to refresh the page when you plug / unplug to see the new State, the name of the shipper is somewhere near the end of the file.

Tags: BlackBerry Developers

Similar Questions

  • How can I return to the 'parent' source after following a link in the page source?

    After following a link in the page source, I would like to be able to return to the source 'parent '. The only option I found is the source is completely closed and open the source of the page once more. A 'return' option would be useful here...

    I just tried to look at the source of the page and the previous/next buttons on my mouse worked.

    If this isn't an option for you, another option is to view the Page Source to use an external application of your choice who has previous/next buttons the value. Dafizilla ViewSourceWith can be used to define an external application to view the source. You can also define an external application by changing hidden preferences 2, the following 2 links show what to change:

  • In the absence of a Drag and Drmove to a specific target, I want the Drag object to return to the drag source, so that the user can try again drag

    I have a matrix 7 X 5 simple grid where I want my users to drag one of the 35 boxes to slide into the correct location about to slip 1 matrix instead of 1 drop. If the user has not abandoned on the right Drop target. The system needs to undo the move to allow the user to try again. What are the properties for the characteristics of failure I have to ensure that this happens.

    You will need for each target to open the object Actions (under the tab Format CP8) dialog box, uncheck the accept all and indicate that only the good drag source.

  • Unable to get the API to return the correct value

    Hello

    You can someone help me?

    I use the API below to check the amount of data received and sent by bb10 but it didn't do anything.

    QNetworkConfigurationManager: DataStatistics returns 0

    Best regards

    Jonathan

    Welcome on the support forums.

    We did some digging last week and finally found a solution.
    See
    http://supportforums.BlackBerry.com/T5/native-development/network-traffic/TD-p/2287487

  • IOM, API - getData() - no data is not returned by the user account

    Hi all

    I have a question for the AD account data. The problem is when I try to get the account data from any account (account status: enabled, the account Type: primary), the API GetData returns a blank card and I don't know why. I see this account in the accounts of the user to the IOM. This account has been created through reconciliation of AD and this account is only one (primary and active).

    In the test environment my code works very well, but production only.

    Here is part of my code where I get some details of account.

    ...

    accounts = provServ.getAccountsProvisionedToUser (take);

    Logger.Finest ("getUsersToTheLookupTask-> user Details - take:" + take + ", DisplayName:" + userDisplayName);

    Iterator it = accounts.iterator ();

    {while (IT.hasNext ())}

    Account ad_account = (Account) it.next ();

    If (ad_account.getAppInstance () .getApplicationInstanceName () .equalsIgnoreCase (appInstName) & & ad_account.getAccountType () .equals (Account.ACCOUNT_TYPE.) (Primary)) {}

    Logger.Finest ("getUsersToTheLookupTask-> AppInstance ApplicationInstanceName:" + ad_account.getAppInstance () .getApplicationInstanceName ());

    Logger.Finest ("getUsersToTheLookupTask-> AppInstance DisplayName:" + ad_account.getAppInstance () .getDisplayName ());

    Logger.Finest ("getUsersToTheLookupTask-> AccountDescriptiveField:" + ad_account.getAccountDescriptiveField ());

    Logger.Finest ("getUsersToTheLookupTask-> getAccountID:" + ad_account.getAccountID ());

    String UtilisateurDN = getADUserDN (appInstName, take);

    AccountData accountdata = ad_account.getAccountData ();

    Map < String, Object > accdata = accountdata.getData ();                         //THIS RETURN EMPTY map < String, Object >! And I don't know why!

    Logger.Finest ("--> account data:" + accdata);

    String userOrg = accdata.get("UD_ADUSER_ORGNAME").toString ();

    String userCN = accdata.get("UD_ADUSER_COMMONNAME").toString ();

    Logger.Finest ("-> CN an ORG:" + userOrg + "-" + userCN);

    userOrg = userOrg.substring (userOrg.indexOf ("OR ="));

    String UtilisateurDN = "CN =" + userCN + "," + userOrg;

    Logger.Finest ("getUsersToTheLookupTask-> pair key / value:" + UtilisateurDN + ":" + userDisplayName);

    userMap.put (UtilisateurDN, userDisplayName);

    }

    }

    ...

    You have an idea why I'm not able to get user account data?

    Thank you!

    Milan

    Fact.

    The following API does not return the AccountData in the AccountVO. Old API IOM at 11.1.2.0 in 11.1.2.1 IOM Yes.

    accounts = provServ.getAccountsProvisionedToUser (take);

    If you need obtain account data, use:

    Acccriteria SearchCriteria = new SearchCriteria (ProvisioningConstants.AccountSearchAttribute.APPINST_KEY.getId (), "*", SearchCriteria.Operator.EQUAL);

    accounts = provServ.getAccountsProvisionedToUser (take, acccriteria, null, true);

    ...

    AccountData accountdata = ad_account.getAccountData ();

    Card accdata = accountdata.getData ();

    GetData returns then map of attributes as I expected.

  • Hi, I just got a second generation ipod nano, and whenever I have unplug the charger a line crosses the screen. Help, please

    Hi, I just bought a used second generation ipod nano and whenever I have unplug the charger a line crosses the screen and I can't do anything with the ipod. Help, please.

    When you do a Reset (reboot) on the iPod

    Learn how to reset your iPod - Apple Support  (see iPod with a click wheel)

    do you see this line on the screen when the Apple logo?  If you do, it is probably a hardware problem.  If the line is not there at the start, but returns after the iPod starts, you can do a restore of the iPod using iTunes.  This d erases the IPO, reinstall its software and sets it to the default settings.

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod settings - Apple Support

    If the problem persists after the restore, the cause is likely to be hardware problem.

  • When I start Firefox, I always "Welcome to Firefos" tab. I tried to change the options for mu, but when I close Firefox, the options return to the origional options before them, I changed. How to fix the problems of St?

    When I start Firefox, I always "Welcome to Firefos" tab. I tried to change the options for mu, but when I close Firefox, the options return to the origional options before them, I changed.

    Looks like your current profile does not work correctly.

    Create a new profile as a test to see if your profile is the source of the problems.
    See basic troubleshooting: make a new profile:

    If this new profile works then you can transfer files from the old profile to the new profile (be careful not to copy corrupted files)

    See:

  • HP Officejet Pro 8610: HP Officejet Pro 8610 won't scan in color via the charger on a MAC

    I have a lot of documents that I need scanned in color using the charger and I don't know where the parameter must use the scan black and white to color. Help, please. I am a mobile notary and there are ready docs that I must return to the lender.

    I can print and copy in color very well and I can scan in color using the flat bed but not the charger.

    Please help.

    Hello @CJAI, greetings!

    Thank you for joining the Forums of HP Support!  It's a good place to find the help you need, other users, HP experts and other support staff.

    I see that you are having problems when scanning using the document feeder. Have you tried to do a scan using the HP Easy Scan application? HP Easy Scan is a free app on the App Store with tools to scan documents and photos to a Mac running OS X 10.9 or later version.

    Please go to http://hp.care/2d75fhX to get detailed instructions to scan and also to change the settings, including the color settings. If you don't have the application, you can also download and install the application from the same link.

    These measures should be the case, I would like to know the results

    Good luck

    Please click on 'acceptable' on the post that solves your problem to help others to find the solution. To show gratitude for my help, please click the 'Thumbs Up icon' below!

  • Re: Slate 7 code the kernel source

    I submitted the request, but no response from HP. What should I do?

    andyjoecn,

    We're sorry that we had some delays, but all requests for source code open source requested through the Open Source download Site have been answered, beginning June 18.  If you do not have a link to open source, please return your application.

  • Lost my battery life while the charger is plugged!

    I had a lot of trouble with my Windows Vista Basic on my level of battery charge. Even when my charger is plugged in it does not, but stay the same % now im only to left %4 and maybe isn't able to return if I turn off my comp. Please ANSWER QUICKLY

    You are right.  This has nothing to do with the Office, this is not a good place to post.

    You should contact your PC vendor.  The charger, the battery or the motherboard (where the load circuit) has a problem.

    Brian Tillman [MVP-Outlook]

  • Bought B210a in the Portugal. Now to return to the United States. Problems?

    After four years of volunteering in the North of Portugal, where I bought my printer Photosmart Plus B210e (still in warranty) and my laptop HP Pavilion PC (out of warranty of six weeks), for reasons of ill health, I must return to the United States. [The printer that I had delivered statements did not survive the movers.]

    I have problems with my printer, or warranty with the purchase of ink cartridges?  I saw the messages of other people outside the United States, saying that their printers require different cartridges and more expensive - here, I use four 364, it is the same cartridge in the USA?

    HP/USA will accept a guarantee of common market HP/ESA (given that HP has all printers manufactured in China, there should be no problem, but...).

    Unfortunately, I live on a medical pension, which means that I don't want to buy expensive equipment that I already bought and paid for.

    Thank you very much - this is my first time on this forum.

    FCZ +.

    You can continue to use the cartridges in the printer and spare cartridges you have.  Once you miss if ink and the need to replace a cartridge you need to Contact HP to ask a "regionalization Reset." Do not charge for this, it is covered under the warranty of the cartridge. You will need to have access to your computer and printer then on line with HP. You will also need to have a set of cartridges for the new region, once completed reset cartridges of region of origin no longer works.  Webpage of HP on the subject is here.

    The cartridges in the United States will be 564.

    I don't know how the EU guarantee would transfer to the United States, you must Contact HP.

  • Get the same return of the browser at the request

    Hi, I'm using

    BrowserSession.showBrowser)

    to access a browser of my application (I wanted to integrate the browser in my app, but since I am compiling for pre 5.0 devices, I can't use the new browser.field2, but only the browser.field not so very awesome API).

    It is - I want to make something once the user returns to the application from the browser. Is it possible to somehow get this event? (Once the user presses the back key, it returns to my request from the browser).

    I want to differentiate this event of any other event of first plan-background.

    Thank you

    Dan

    Here's a way to do it:

    1. In your subclass UiApplication, declare an executable field (let's call it "pending").
    2. Just before calling BrowserSession.showBrowser (), the value until an executable you want to run on back.
    3. Back in your subclass UiApplication, override the activate():

      public void activate() {    if (pending != null) {        invokeLater(pending);        pending = null;    }}
      

      With the help of invokeLater is not really necessary because activate() is called on the event thread. However, I would suggest using it when even just to be sure that the executable is run after all the other events that may be pending.

  • How to read file returned by the file picker

    I'm going to obviously stupid here, but for the life of me I can't figure out how read in a text file returned by the file picker.  I am currently getting the good full path of the file in the file picker but where do I go from here?  BlackBerry.IO.file does not seem to exist in Blackberry 10 and I'm confused as to how I would use the HTML5 File API from only a file returned by the file picker path.

    Can someone please spit out a quick and dirty example showing me the rudiments of reading in the data file from a path returned by the file picker, please?

    Thank you very much

    DM

    Don't know if you have the path to the file, and then you left there. One thing to note. The file MUST be inside you bar (sandbox) OR you need to add the <> ermit > access_sharedermit >
    and then he can live the file in the shared folder on the device.

    Here is a code that you can use to read a file. I poached it our docs found here:https://developer.blackberry.com/html5/apis/blackberry.io.html

    
    
  • Mail body blank when mail is sent by the java source compiled.

    create or replace and compile java source named MailExMulti as
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.net.URL;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.DataSource;
    import javax.activation.FileDataSource;
    import javax.mail.BodyPart;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletRequest;
    import javax.servlet.http.HttpServletRequest;
    import java.sql.Clob;
    public class SendSimpleMail {
      public static void sendmail(String s) {
          Properties props = new Properties();
           props.put("mail.smtp.host", "xxx.xxx.com");
           props.put("mail.smtp.socketFactory.port", "123");
           props.put("mail.smtp.socketFactory.class",
                           "javax.net.ssl.SSLSocketFactory");
           props.put("mail.smtp.auth", "true");
           props.put("mail.smtp.port", "123");
            Session session = Session.getInstance(props,
              new javax.mail.Authenticator() {
              protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication("[email protected]", "aaa");
              }
              });
            try {
              MimeMessage msg = new MimeMessage(session);
    javax.mail.Multipart multiPart = new MimeMultipart("mixed");
    MimeBodyPart textpart = new MimeBodyPart();
    textpart.setText("\r\nasdsadsadsad");
    multiPart.addBodyPart(textpart);
              msg.setFrom(new InternetAddress("[email protected]"));
              msg.setRecipients(Message.RecipientType.TO, "[email protected]");
              msg.setSubject("Simple Test Mail");
              msg.setSentDate(new Date());
             
              msg.setContent(multiPart);
              msg.saveChanges();
              File file;
              file = new File("D:"+"//msg1.txt");
              try{
              msg.writeTo(new FileOutputStream(file));
              }
              catch(Exception e)
              {
              System.out.println("File does not exists...");
              }
              Transport.send(msg);
        System.out.println("---Done---");
            } catch (MessagingException mex) {
            mex.printStackTrace();
            }
      }
    }
    
    

    When we call the java source above for pl/sql an empty body is sent to the recipient, so that if I copy this code and work in stand-alone jdk the recipient is able to see the body. Any help would be greatly appreciated.

    If we directly set html in msg.setcontent without recipient multipart, is able to see the body.

    But I need to make this work with addbodypart and several parts that I intend to integrate images later in the mail.

    Oracle DB version: 11.2.0.2.0

    used container: javax.mail - 1.5.0.jar

    That may be relevant to the multipart construction, but that's just a guess.

    With the help of Java to send mails to the database is no longer really needed. There is UTL_SMTP and UTL_MAIL:

    https://docs.Oracle.com/CD/E11882_01/AppDev.112/e40758/u_mail.htm#ARPLS384

    UTL_SMTP

    Or this thread: need help with sending e-mail s

  • A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10001.

    Hello

    I just bought an HP computer, Windows 8 Pro, x64bit. I worked OK for a week and then started to freeze. It freezes all the time. I'll send the error message in the event log. I'd appreciate your help because I've had enough of this gel and I turn it works all the time.

    Log name: System
    Source: Schannel
    Date: 12/07/2013-12:55:12
    Event ID: 36870
    Task category: no
    Level: error
    Keywords:
    User: SYSTEM
    Computer: Aleksey
    Description:
    A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10001.
    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        36870
        0
        2
        0
        0
        0 x 8000000000000000
       
        7179
       
       
        System
        Aleksey
       
     

     
        Server
        0x8009030d
        10001
     

    Thank you

    Hi Aleksey,

    I appreciate the efforts that you put to publish the query on this forum.

    Please help me with the following information about this issue:

    (1) is the computer that is connected to a domain network?

    (2) when exactly you receive the error message? It is by accessing any application?

    If the computer is connected to a domain network, I suggest you send the request on 8 Windows IT Pro. Check out the link:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w8itpro

    Please let us know if the computer is not in a domain. We will be happy to help you come.

Maybe you are looking for