blackberry

how to create a custom dialog for asking permission in blackberry

懵懂的女人 提交于 2019-12-24 10:46:26
问题 how to create a custom dialog for asking permission in blackberry and store in application Descriptor. i have created this code but i am not able get our custom message and getting Exception Uncaught Exception:no Application Instance. class PermissionTest extends UiApplication { private static String[] dialogChoice = { "Exit" }; static boolean permissionsOk = false; // main method public static void main(String[] args) { _assertHasPermissions(); PermissionTest theApp = new PermissionTest();

RIM blackberry Record 3GP video

荒凉一梦 提交于 2019-12-24 10:39:28
问题 I am writing an application that can record a 3GP video. I have tried both MMAPI and Invoke API. But have following issues. Using MMAPI: When I record to stream, It records video in RIMM streaming format. when I try to play this video player gives error "Unsupported media format." When I record to a file. It will create a file of size 0. Using Invoke API: In MMS mode it does not allow to record a video more than 30 seconds. In Normal mode size of the file is very large. Once I invoke camera

How to define supported BlackBerry OS versions and models for application?

爷,独闯天下 提交于 2019-12-24 10:31:17
问题 After company wins a project it is usual to mention in contract what devices are supported and what OS versions are supported. But taking into account BlackBerry it appears sometimes to be tricky, as you can have the same device model, but two and(or) more different OS versions (or within same OS different package versions). And in this situation application may need to be updated. So the main question here is what is expected to be mentioned in contract? Could you please share some your

Making the RichTextField Horizontally Centered in Blackberry

淺唱寂寞╮ 提交于 2019-12-24 10:24:12
问题 My current Mainscreen looks like : The current code for each line of display is like: RichTextField WeFix1 = new RichTextField("• Computer & Laptop", RichTextField.TEXT_JUSTIFY_HCENTER); VFMTitle1 = new VerticalFieldManager(Field.USE_ALL_WIDTH| Field.NON_FOCUSABLE); HFMTitle1 = new HorizontalFieldManager(FIELD_HCENTER); HFMTitle1.add(WeFix1); VFMTitle1.add(HFMTitle1); add(VFMTitle21); But need to it be positioned in a straight line : 回答1: There are many possibilities. You can adjust the

How to convert JAR FILE to COD file using Ant Build

坚强是说给别人听的谎言 提交于 2019-12-24 09:58:29
问题 I have a JAR File,i want to know how to convert the JAR file to COD file. <target name = "build-MyLib" depends="clean"> <rapc destdir="release\5.0" output="Lib"> <src> <fileset dir="."> <include name="lib/Lib.jar" /> </fileset> </src> </rapc> </target> Error i got was [rapc] java.util.zip.ZipException: duplicate entry: Lib-1.cod [rapc] at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source) [rapc] at java.util.jar.JarOutputStream.putNextEntry(Unknown Source) [rapc] at sun.tools.jar.Main

Blackberry: how to make a data structure (for example Hashtable) persistable?

风格不统一 提交于 2019-12-24 09:40:12
问题 I have this code which works well: static { myStore = PersistentStore.getPersistentObject(MY_LONG_KEY); myList = (Vector) myStore.getContents(); if (_storedStations == null) { myList = new Vector(4); // prepopulate with fake data myList.addElement(new MyItem("Eins")); myList.addElement(new MyItem("Zwei")); myList.addElement(new MyItem("Drei")); myList.addElement(new MyItem("Vier")); myStore.setContents(myList); } } class MyItem implements Persistable { ..... } probably because the

Issue while using moving effect on slider

你说的曾经没有我的故事 提交于 2019-12-24 09:18:27
问题 Here i use a value changing effect on a slider; if i move the slider, it will scroll and display updated values in an edit field, as per the moving of the slider bar. Also, there is an edit field effect where the slider should be moved as per the values entered into the edit field; but it is not working. When i comment out part of the edit field effect, it is working properly but when i apply that edit field effect again, then it is not working ... // for slider move FieldChangeListener

BlackBerry - read custom ringtone name from address book contact list?

血红的双手。 提交于 2019-12-24 08:20:07
问题 Actually I am assigning custom ringtone with contact number in a custom database contact list. Now I am having problem with the reading to that contact list. If anyone having any idea about this problem pls pls help. UPDATE public void showAddressBook() { try { ContactList contactList = (ContactList) PIM.getInstance() .openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE); Enumeration enumx = contactList.items(); while (enumx.hasMoreElements()) { Contact c = (Contact) enumx.nextElement(); int[]

Set the height and width of EditField on BlackBerry

旧时模样 提交于 2019-12-24 07:53:54
问题 I want to set the height and width of an EditField in my BlackBerry app. 回答1: You need to override the field's layout method to set the size for you: protected void layout(int width, int height) { super.layout(customWidth, customHeight); setExtent(customWidth, customHeight); } where customWidth and customHeight have been set by you elsewhere. super.layout(customWidth, customHeight) lays the field out to use your special width & height. setExtent(customWidth, customHeight) sets the size of the

Google Data Api library for Blackberry

耗尽温柔 提交于 2019-12-24 07:27:21
问题 I want to get google contacts in my Blackberry Application. Is there any public libraries availabile for blackberry to do this? I try to use Oauth-SignPost. But the libraies used in it not supported by blackberry.Then I try the following code public static String requestToken(){ String url = C.REQUEST_URL; String header = oauth_header(url, HttpProtocolConstants.HTTP_METHOD_GET); String requestTokenUrl = concatURL(url, header); HttpConnection httpConn = null; InputStream input = null; try{