getDevicePhoneNumber() provides the phone number with the unicode left-to-right mark

I use getDevicePhoneNumber (boolean format) ( http://www.blackberry.com/developers/docs/4.6.0api/net/rim/blackberry/api/phone/Phone.html#getDevice... (boolean)) to get the telephone number of my camera. I know that maybe it's not the actual number. I also can't use something else as the pin of the device. I use it to fill a field "my phone number" by default that can be edited manually in the case where the number is not correctly being read on the SIM card.

It works really well and displays the phone number in the field. However, a thorough review to the string of shows that he has the mark unicode '% E2% 80% 8F' in front of the string. This brand is known in unicode (utf-8) "BRAND LEFT-to-RIGHT ' (sources: http://www.tachyonsoft.com/uc0020.htm and http://unicode-search.net/unicode-namesearch.pl?term=mark ).

I only experienced it in BB OS 4.6 devices (does not check 4.7 yet), but it seems not to happen in OS 4.5 and below.

Were there changes to the orientation of the chain in OS 4.6?

Can I get rid of this brand using String.trim (); or I have to use something else?

This problem persists on my 9000 "BOLD", but none of my other GPS phones.

Because it was a pain to try to understand, here's the code I used to solve this problem.

private String trimPhoneNumber(String phoneNumber){
    byte phoneBytes[] = phoneNumber.getBytes();
    int length = phoneNumber.length();
    int offset = 0;
    if ( phoneBytes[0] == 0x3F ) {
        length--;
        offset++;
    }

    return new String(phoneBytes, offset, length);
}

Tags: BlackBerry Developers

Similar Questions

  • Validate / Format of phone number with Extension

    I am trying to allow users to enter a phone number, with the POSSIBILITY of adding an extension at the end, but I can't seem to get the good coding...

    Thus, users should be able to type the following:

    5555555555

    555-555-5555.

    (555)555-5555

    555-555-5555

    As well as

    55555555551234

    1234 5555555555

    555 555 5555 1234

    555-555-5555 1234

    And they should all validate/format:

    555-555-5555 ext (number of optional expansion)

    5 years and 1234 s are only examples.

    I tried to use a mask of arbitrary, but you are unable to view OPTIONAL characters method... they want to all be necessary therefor 9999999999 ext9999 eventually REQUIRE a 4-digit extension.

    Thanks in advnace for your help

    It can be done using a custom size validation script.

  • How to display the phone number with code in the text element

    Hello friends,

    I have table "customer_management. In this table, I have a phone number of field in the varchar2 data type.
    the storage format of the telephone number is: (code-phone number) for example 0902334-324345
    Ok. I created a form of this table in the data block. This form I want to view the phone number and code in two text elements... So, should I create a query to do this... Pls help me with a query... What trigger is suitable for it?
    Please give me example query...

    Thank you

    Hello
    If you are using

    :TAA_CUSTOMER_MANAGEMENT.CONTACT_PHONE_NO
    :TAA_CUSTOMER_MANAGEMENT.NUMBERS
    

    are these above said are elements not db?
    If yes then its get accessor for fill in post-interrogez trigger.
    Just check substring and instring functions that return the value.

    Published by: user13329002 on March 3, 2011 01:47

  • My Bookmark tabs and frequent site disappeared from the top left and right, how to recover?

    For no reason that I can see on Firefox in the upper right corner, the bookmark has disappeared, and on the upper left tab, the tab Web sites visited more often. There is simply nothing. I can always go to the bottom of the page to navigate, but it is most cumbersom and loses all the advantages of a single click, I had. My computer is an intel windows Vista.

    Make sure the toolbars like the toolbar 'Navigation' and the 'personal bar' are visible.

    • Firefox menu button > Options
    • View > toolbars (press F10 to display the menu bar)
    • right click on empty toolbar space
    • If the missing elements in the palette of the toolbar, and then drag them to the window customize (view > toolbars > customize) on the toolbar
    • If you do not see an item on a toolbar in the toolbar palette and then click the button "Restore default" to restore the default toolbar set up

    Make sure that you run not Firefox mode full screen (press F11 or Fn + F11 to toggle; Mac: Command + SHIFT + F).

    If you are in full screen view then hover over with the mouse upward to make the bar appear Navigation and tab bar.
    Click the expand (in the top right Navigation bar) to exit full screen or right-click on a space empty on a toolbar and select "exit full screen" or press the F11 key.

  • Is it possible to scroll the timeline left or right without having to move the mouse to the top of the window?

    First has a really cool feature that allows you to toggle a tool at hand to grab the chronology and away from the everywhere where you happen be left and right. I see that hearing has a hand tool if you navigate with the mouse to the top of the window, but it turns out to be a frustrating problem on my bench I have a large monitor, so up there, just to spend a little is frustrating. I know you can hold SHIFT key and scroll the mouse wheel, but this is very insensitive and in many too small increments to be helpful for what I want. I still find myself all just wishing I could grab the chronology of everywhere where is my cursor and simply drag to the left or to the right. Is it possible somehow?

    The left and right of the Page Page is very convenient. Who might do the trick for now.

    So, is there no way to disable the audio scrub? As I am locating in sound FX and things, I'm constantly wishing I could turn that off so I could scrub through the video and find my points of synchronization without hearing my audio monitors ROAR to me. First has it mapped to a keyboard shortcut to quickly switch it on and outside.

    Seems that the first people and the need of people hearing talk to each other a little more...

  • [OWB] Delete the characters left or right of the column?

    Hello, I would like to ask if there is a way to reduce some characters left or right of a column. Thank you.

    Oh sorry, I was indeed not clear.

    You must use the Expression operator and write the SUBSTR function in the SQL Code. The name of your column is the first parameter (probably INGRP1. Column_name or something similar).

  • How to position my tag div with top, bottom, left and right attributes?

    So I have my background image and then I want only the sides to display so I put my div tag in the Center and does it extend to the edges of the top and bottom of the page, then theres a little bit of the background image on the sides of the white div. Than perfect, but when I focus I had to remove the position attribute. Now, I can not use the up, down, left and right attributes.

    OLD CODE WITHOUT A CENTER:

    {#whitediv}

    position: absolute;

    Top: 0px;

    Width: 930px;

    height: 100%;

    z-index: 1;

    background-color: #FFF;

    }

    NEW CODE WITH CENTER POSITION BUT CANT IT:

    {#whitediv}

    position:;

    Top: 0px;

    margin: 0px auto;

    Width: 930px;

    height: 100%;

    z-index: 1;

    background-color: #FFF;

    }

    To Center elements with CSS, you need 4 basic things.

    1. A document type is valid,
    2. width in pixels, % or ems, container
    3. a margin left and right of the automobile,
    4. default positioning (static or not specified).

    For example, the following page has a centered division.

    http://ALT-Web.com/test/resizable-BG.shtml

    The background image is applied to the CSS body selector.

    / * DIV CENTERED * /.

    {#page online purchase

    Width: 70%;
    margin: 5th auto;
    Padding: 3em;
    background: rgba (0,0,0, 0.70);
    color: #FFF;
    }

    Nancy O.

  • Easy way to synchronize the audio left and right, from different sources?

    I mainly filmed concerts of a single camera using a Sony Z1 - when they are available, I'll take a sound card feeds channel 1, and a live auditorium feed a microphone mono channel 2. Because of the distance of the scene (and light is faster than sound, etc.), the power of the sound card is synchronized with the video and power of the auditorium is between 1 and 3 frames behind. Is there an easy way for me to take the tray clips together and just move this auditorium feed back in sync with the video and sound card feed, raw clips?

    Previously, I did this by dropping the clips to the timeline, done to separate tracks, sliding manually sync on the auditorium that feed by the required number of frames and link everything back up again. Synchronize audio visually using the waveform display (before first CC).

    I have two problems with this in Adobe first CC. First, the audio waveforms are not like waveforms more (and it doesn't seem to be possible to change the display to the old way?). So now that I am syncing the auditorium that feed in sound only, because I don't see anything on the screen to sync any more - both channels just look like random noise (or almost).

    Secondly, I film some events of multi camera, and of course, I'd like to be able to use the new functionality of synchronization for the multicam. But I know in advance that the audio channels on all the clips are not synchronized with the video (the camera powered by the sound card will be synchronized, the camera takes live food out as indicated above). Surely, there must be a way where I can fix the sync audio to video on raw clips first, before you say Adobe to synchronize based on the audio clips? Otherwise it will all be misaligned and require adjustment of the manual sync anyway? Again, what I've done previously is set of benchmarks on the identical frames, multi camera sync (so the video is now just good) and then manually set the audio synchronization before editing.

    In the context menu for the timeline, you can uncheck rectified of Audio waveforms for their return to normal.  (I wish that Adobe does not have this as default.  It's just weird.)

    But to synchronize, you can only do in the order.

  • How to get rid of web address flashing in the lower left or right?

    whenever I have the mouse over a link, it displays the web address in the lower corners right or left side of the browser window. I find that it is distracting and useless, as soon as you hover over it, it disappears. I would like to get rid of this.

    Thank you
    Kevin

    You want to only remove this status "overLink" message or other messages as well?

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    statuspanel[type="overLink"] .statuspanel-label {display:none!important;}
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    You can use this button to go to the Firefox profile folder currently in use:

    • Create the folder chrome (lowercase) in the .default < xxxxxxxx > profile folder if the folder does not exist
    • Use a text editor like Notepad to create a userChrome.css (new) file in the folder chrome (file name is case sensitive)
    • Paste the code in the userChrome.css file in the Editor window
    • Make sure that the userChrome.css file starts with the default @namespace line
    • Make sure that you select "All files" and not "text files" when you save the file via "save file as" in the text editor as userChrome.css.
      Otherwise, Windows can add a hidden .txt file extension and you end up with one does not not userChrome.css.txt file
  • The control left and right Audio - first CC 2015

    How can I change the stereo audio to mono?  Is it being on the Timeline on possible with the media before hand?  And if so, how is this work?

    Hello

    Please see the link below.

    Editing clips > organizing media in Adobe Premiere Pro (version 2014) CC

    Vinay

  • Is it possible to remove the scan (left and right) between my articles from my folio?

    Hi all

    Sorry, I'm new here. My question is maybe stupid.

    I have this problem (swipe) in Adobe Content Viewer (on my ipad). I've used InDesign CC * to create a simple application for my children (a sort of mini game: kid must find (by clicking) 2 items on the first screen then screen success then new screen with 3 items...). No sense to get the ability to slide with this project. Any idea to remove this scanning option? This means that only folio app isn't a real application but an ebook?

    Thanks in advance!

    * Maybe I'm wrong, but I thought I can create and publish for free (with CC + $99 developer program I) as much simple folio (for ipad) app I want.

    Although there is no setting to turn off scanning, you can create an invisible object of multi-state 1024 x 768 on each page that contains active scan. In this way, by sweeping changes from invisible the invisible state State (in other words, he seems to have no effect). Add buttons on top of the DSO for navigation. There is an example of this in the free app from the DPS tips. See the article of last second in the Advanced edition of overlays.

  • Place content on the extreme left and right of a line

    I have a complex form where each line has different layout requirements.
    Some lines are spaced in the browser, others are framed on the left.
    And others, like the lines at the top of the page must have the text on the left and a date on the right end of the same line.

    What is the best way to layout of this type of form?

    Try with the following:

    
      
        
          ... put some components here ...
        
      
      
        
          ... put some components here ...
        
      
    
    

    Dimitar

  • move the object left and right

    Hi, how are you all? I hope you all well...

    Now IAM trying to do more spells for the hero and this spell is the fireball

    I want to spend the time the hero is on the right also leave when the hero on the left

    I tried with this code when you press w it should move 10 or 20 px then it must stop

    but the fact of idont this step "then it must stop" because of this error as the fireball, call

    like I want to

    TypeError: Error #1010: a term is undefined and has no properties.

    Hero / onEnterFrame)

    Here is the code

    HERO class

    package {}


    import flash.display.MovieClip;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.events.Event;

    import flash.sensors.Accelerometer;
    import flash.media.Sound;
    import flash.media.SoundChannel;


    SerializableAttribute public class extends MovieClip {HERO
    var NIGHTJUNGLE:nightjungle = new nightjungle
    var ELECTRICALSHIELD:electricalshield = new electricalshield;

    var speed: int = 3;
    var fireballindex:Array = new Array
    var dir:int;
    var ELECTRICITY: electricity = new electricity;
    var SOUNDCHANNEL:SoundChannel = new SoundChannel
    var firespeed:int = 50
    var i: int
    public void HERO() {}

    addEventListener (Event.ADDED_TO_STAGE, onAddedToStage);

    }

    public void onAddedToStage(event:Event):void {}

    addEventListener (Event.ENTER_FRAME, onEnterFrame);

    stage.addEventListener (KeyboardEvent.KEY_DOWN, onKeyDown);

    stage.addEventListener (KeyboardEvent.KEY_UP, onKeyUp);


    SOUNDCHANNEL = NIGHTJUNGLE.play (1,1000)
    gotoAndStop (4);

    }

    public void onEnterFrame(event:Event):void {}

    x += dir * speed;
    {if (fireballindex [i] .stage)}
    .x += fireballindex [i] 1
    }

    }

    public void onKeyDown(event:KeyboardEvent):void {}

    If {(event.keyCode is Keyboard.RIGHT)

    gotoAndStop (2);

    dir = 1;
    Speed = 10
    If (ELECTRICALSHIELD.stage)
    addChild (ELECTRICALSHIELD)

    }


    If {(event.keyCode is Keyboard.LEFT)

    gotoAndStop (1);


    dir = - 1;
    Speed = 10
    If (ELECTRICALSHIELD.stage)
    addChild (ELECTRICALSHIELD)

    }

    If {(event.keyCode is Keyboard.UP)

    gotoAndStop (1);

    y = 10;

    }

    If {(event.keyCode is Keyboard.Q)

    Speed = 30;

    addChild (ELECTRICALSHIELD);
    SOUNDCHANNEL = ELECTRICITY.play)

    }
    If (event.keyCode == Keyboard.W) {}


    fireballindex.push (new fireball())

    addChild (fireballindex [i])
    fireballindex [i] .width = 50
    fireballindex [i] .x += firespeed * dir

    i ++
    trace (i)
    }
    If (event.keyCode == Keyboard.E) {}
    MovieClip (parent).aa.x = x + 100
    }
    }

    public void onKeyUp(event:KeyboardEvent):void {}

    If {(event.keyCode is Keyboard.Q)

    If {(ELECTRICALSHIELD.stage)

    removeChild (ELECTRICALSHIELD);
    If (SOUNDCHANNEL! = null)
    Speed = 0;
    SOUNDCHANNEL = ELECTRICITY.play (1,1)

    }

    }
    If {(event.keyCode is Keyboard.W)


    }

    If {(event.keyCode is Keyboard.LEFT)
    Speed = 0
    gotoAndStop (3);
    If (ELECTRICALSHIELD.stage)
    addChild (ELECTRICALSHIELD)

    } Else if (event.keyCode == Keyboard.RIGHT) {}
    Speed = 0
    gotoAndStop (4);
    If (ELECTRICALSHIELD.stage)
    addChild (ELECTRICALSHIELD)
    }

    }

    }

    }

    Thank you

    I would not use 'i' to target the object of the fireball.  In the case of the fireballs to withdraw at any time, that the value of i will be false.  The fireball that you add may not of fireballindex [i].

    If all the code that goes in the same neighborhood, then I declare the instance var name and use the name...

    var fBall:fireball = new fireball();

    fBall.name = "fb" + String (i)";

    fBall.width = 50;
    fBall.x += firespeed * dir;

    fireballindex.push (fBall);

    addChild (fBall);

    i ++ ;

    Later if you need to target this fireball, you can use the table or you can use its name.

    If you still want to use the non-var approach (I see no reason to) then instead of target

    fireballindex [i]

    I would target the last element added to the matrix who is definitiely going to be

    fireballindex [fireballindex. Length-1])

  • Spreading wide all the way left and right?

    If you are looking for in the Web site:

    http://MCEC.my/

    You scroll down and in the sponsor section where you see the pink background, how do you extend the bottom completely on the screen of the browser when the page load?

    Because now the left and the right is white and a little weird...

    Thanks for any help in advance

    However, if you are wanting to do this on your current CSS:

    Replace #TheLogos in your CSS by this:

    {#TheLogos}

    Width: 1900px;

    background: lavenderBlush;

    border-top: 1px solid #666;

    top of the margin: 20px;

    position: relative;

    left margin: 40%;

    }

    And replace h4 #sponsors with this:

    H4 #sponsors {}

    padding-top: 20px;

    make-style: oblique;

    Color: #333;

    left margin: 25%;

    / * style for sponsor text * /.

    }

  • My backspace key is very slow in removing letters - you must press to delete one letter at a time - can anyone help? Also the arrows left and right do not seem to work

    The BACKSPACE on my keyboard is only remove a letter at a time after pressing the button several times and wait between pressing the button to erase the letters. None of the answers anyone?

    You can try to uninstall the keyboard in the Device Manager

    and restart windows, then reload the material.

Maybe you are looking for