Search Results

Search found 1450 results on 58 pages for 'blackberry tour'.

Page 15/58 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Starting one BlackBerry screen from another.

    - by DanG
    I've recently run into a snag while putting on the finishing touches for my BlackBerry app. I'm building a login screen which, if the user is successful in logging in, goes to a data loading screen, and then to a home screen. From the home screen, you can use the app. Everything works great but one thing, I can't seamlessly move from the login screen to the loading screen, to the home screen. I can move from the login screen to the loading screen ok, because I'm doing that via a button click which is on the GUI thread, but then I have the login screen at the bottom of the stack and can't get it out using the dismiss method. Once in the loading screen, I can't push the home screen because I'm not doing it via the gui method, though I'm able to update the GUI via the following piece of code: private void checkData(){ Timer loadingTimer = new Timer(); TimerTask loadingTask = new TimerTask() { public void run() { // set the progress bar progressGaugeField.setValue(DataManager.getDataLoaded()); // for repainting the screen invalidate(); } }; loadingTimer.scheduleAtFixedRate(loadingTask, 500, 500); } Does anyone know how to solve my problem of moving seamlessly from the login screen to the loading screen to the home screen? Note: once I'm at the home screen I'd like to have it be the only screen on the stack. Thanks!

    Read the article

  • BlackBerry:Reduce space between 2 buttons in HorizontalFieldManager

    - by user469999
    hi In blackberry i have created a horizontal field managar and added some buttons of small size to it to display toolbar at the bottom of the screen.But my problem is there is too much space between the 2 buttons.I have to reduce this space between 2 buttons so that i can manage to place atleast 6 buttons at the bottom of the screen.I am using the BFmsg.setMargin(305,0,0,40) statement. can anyone please help me on this. Following is my code : BFcontacts = new ButtonField("Cnt") { protected void paint(Graphics graphics) { //Bitmap contactsbitmap = Bitmap.getBitmapResource("contacts.jpg"); //graphics.drawBitmap(0, 0, contactsbitmap.getWidth(), contactsbitmap.getHeight(), contactsbitmap, 0, 0); graphics.setColor(Color.WHITE); graphics.drawText("Cnt",0,0); } }; BFcontacts.setMargin(305,0,0,10);//vertical pos,0,0,horizontal pos HFM.add(BFcontacts); BFmsg = new ButtonField("Msgs") { protected void paint(Graphics graphics) { //Bitmap msgsbitmap = Bitmap.getBitmapResource("messages.jpg"); //graphics.drawBitmap(0, 0, msgsbitmap.getWidth(), msgsbitmap.getHeight(), msgsbitmap, 0, 0); graphics.setColor(Color.WHITE); graphics.drawText("Msgs",0,0); } }; BFmsg.setMargin(305,0,0,40);//vertical pos,0,0,horizontal pos : original HFM.add(BFmsg); add(HFM) Thanks in advance

    Read the article

  • blackberry implement audio player

    - by Prasad
    Hi, I am developing an application which let users to hear songs online. And I used Blackberry Player and Manager APIs. My application works fine and I can play songs. Now I wan't to add more controls to it. As an example I want pause, play songs. Mute the sound, Control the volume. Display the progress of the play back. Display the current time position of the song like that. I started research on that. And I tried to do that with PlayerListener. But unfortunately all the time I am getting IllegalStateException. So I can't go ahead with that research. As a help can someone please tell me how can I implement above kind of controls for a player. Appreciate if someone can post a sample code to do that. Further I will put my playback source code here. public void run() { try { p = Manager.createPlayer(requestedSong + SystemSettings.strNetwork); p.setLoopCount(1); p.start(); } catch (IOException ioe) { } catch (MediaException me) { } } public void run() { try { p = Manager.createPlayer(strSongURL); p.setLoopCount(1); p.start(); } catch (IOException ioe) { } catch (MediaException me) { } } Thank you very much. Prasad

    Read the article

  • Designing secure consumer blackberry application

    - by Kiran Kuppa
    I am evaluating a requirement for a consumer blackberry application that places high premium on security of user's data. Seems like it is an insurance company. Here are my ideas on how I could go about it. I am sure this would be useful for others who are looking for similar stuff Force the user to use device password. (I am guessing that this would be possible - though not checked it yet). Application can request notifications when the device is about to be locked and just after it has been unlocked. Encryption of application specific data can be managed at those times. Application data would be encrypted with user's password. User's credentials would be encrypted with device password. Remote backup of the data could be done over HTTPS (any better ideas are appreciated) Questions: What if the user forgets his device password. If the user forgets his application password, what is the best and secure way to reset the password? If the user losses the phone, remote backup must be done and the application data must be cleaned up. I have some ideas on how to achieve (3) and shall share them. There must be an off-line verification of the user's identity and the administrator must provide a channel using which the user must be able to send command to the device to perform the wiping of application data. The idea is that the user is ALWAYS in control of his data. Without the user's consent, even the admin must not be able to do activities such as cleaning up the data. In the above scheme of things, it appears as if the user's password need not be sent over the air to server. Am I correct? Thanks, --Kiran Kumar

    Read the article

  • BlackBerry Library problems. (jre6 + NET_RIM_BLACKBERRY)

    - by kimera84
    Hi Everyone, I'm new in blackberry environement programming, I'm developing an application for this device and there are some probs about libraries that I don't understand. I have the main project called: npoBBerry - his library is NET_RIM_BLACKBERRY (from 4.6.1 version...) it includes other two projects: Npo - his library is standard jre6 (Npo inlcudes NpoCore) NpoCore - his library is standard jre6 Compliance was set... In Java Compiler level is set to 1.4 for all. Now the problem is that I'm not able to build my project. 4 errors: Error preverifying class ch.yek.npo.model.Advertising Error preverifying class ch.yek.npo.repository.Repository$1 Error!: Error: preverifier failed: C:\Program Files\eclipse\plugins\net.rim.eide.componentpack4.6.1_4.6.1.27\components\bin\preverify.ex ... Error!: Error: preverifier failed: C:\Program Files\eclipse\plugins\net.rim.eide.componentpack4.6.1_4.6.1.27\components\bin\preverify.ex ... I know that libraries are differents but maybe I'm missing something. NpoCore represents models, interfaces Npo just take data from a repository NpoBBeryy just use this data from Services... Please help and thanks in advance... :)

    Read the article

  • trackroll does not works as i want or expect to do,blackberry

    - by SWATI
    i am working on blackberry curve 8300 i have added some components in the main screen,now i want to move the focus vertically when the trackball moves up or down and move the focus horizontally when track-Wheel moves left or right. ================================================================================== --Title area that contains a focusable field(BACK)-- --Non focusable Label field that indicates the name of the user-- --A horizontal field manager1 that contains 4 buttons-- --A horizontal field manager2 that contains 4 buttons-- --A horizontal field manager2 that contains 4 buttons-- ================================================================================== now suppose currently focus is on BACK button and i scroll the track-wheel downwards then, focus should come on 1st button of manager1 Again when i scroll downwards,then focus should come on the 1st button of manager2 and not the 2nd button of manager1(as its happening on device) my code is ::: protected boolean trackwheelRoll(int amount, int status, int time) { focusIndex = this.getFieldWithFocusIndex(); System.out.println("focus index ::::::::::::::::"+focusIndex); Field f; if(focusIndex!=0) { if(amount==-1) { //move up if(focusIndex>=0) { focusIndex = focusIndex-1; f = getField(focusIndex); f.setFocus(); } } if(amount==1) { //moving down if(focusIndex<=3) { f = getField(++focusIndex); f.setFocus(); } } } return super.trackwheelRoll(amount, status, time); } even after this control moves abruptly on simulator but on device no change took place

    Read the article

  • Blackberry invalidate field not causing a repaint

    - by Michaela
    I'm writing a Blackberry app. I have a custom list field where I can select an item in the list which pushes the edit screen onto the stack. I edit the item and save, and when I pop that screen off so I am back on my list screen, I want to view the update I just made reflected in the list. I have done this on other screens which just had LabelFields and it worked fine. However, with the list screen, calling invalidate() seems to do nothing. I know the value has saved correctly through print lines, and I see the paint() method in the listfield is getting called. But the only way I can get the list field to update is to delete it from the screen and re-add it. That seems wrong. What am I doing wrong? public class ListTasksScreen extends MainScreen{ private TaskList tasks; private CustomListField taskListField; public ListTasksScreen (TaskList tasks){ super(); this.tasks = tasks; Vector incompleteTasks = tasks.getIncompleteTasks(); taskListField = new CustomListField(incompleteTasks, tasks); add(taskListField); } public void updateTaskList(TaskList t) { Vector incompleteTasks = t.getIncompleteTasks(); taskListField= new TaskListField(incompletetTasks, t); //I just want to call taskListField.invalidate() here. //the only thing that seems to work is deleting taskListField //and re-adding this.delete(taskListField); add(taskListField); } }

    Read the article

  • Trouble bringing a Blackberry App to Foreground

    - by Luis Armando
    I have an app that is listening in background and when the user clicks "send" it displays a dialogue. However I need to bring my app to foreground so the user answers some questions before letting the message go. but I haven't been able to do this, this is the code in my SendListener: SendListener sl = new SendListener(){ public boolean sendMessage(Message msg){ Dialog myDialog = new Dialog(Dialog.D_OK, "message from within SendListener", Dialog.OK,Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Dialog.GLOBAL_STATUS) { //Override inHolster to prevent the Dialog from being dismissed //when a user holsters their BlackBerry. This can //cause a deadlock situation as the Messages //application tries to save a draft of the message //while the SendListener is waiting for the user to //dismiss the Dialog. public void inHolster() { } }; //Obtain the application triggering the SendListener. Application currentApp = Application.getApplication(); //Detect if the application is a UiApplication (has a GUI). if( currentApp instanceof UiApplication ) { //The sendMessage method is being triggered from //within a UiApplication. //Display the dialog using is show method. myDialog.show(); App.requestForeground(); } else { //The sendMessage method is being triggered from // within an application (background application). Ui.getUiEngine().pushGlobalScreen( myDialog, 1, UiEngine.GLOBAL_MODAL ); } return true; } }; store.addSendListener(sl); App is an object I created above: Application App = Application.getApplication(); I have also tried to invoke the App to foreground using its processID but so far no luck.

    Read the article

  • How to figure out which key was pressed on a BlackBerry

    - by Skrud
    What I want: To know when the user has pressed the button that has the number '2' on it, for example. I don't care whether "Alt" or "Shift" has been pressed. The user has pressed a button, and I want to evaluate whether this button has '2' printed on it. Naturally, if I switch devices this key will change. On a Bold 9700/9500 this is the 'E' key. On a Pearl, this is the 'T'/'Y' key. I've managed to get this working in what appears to be a roundabout way, by looking up the keycode of the '2' character with the ALT button enabled and using Keypad.key() to get the actual button: // figure out which key the '2' is on: final int BUTTON_2_KEY = Keypad.key(KeypadUtil.getKeyCode('2', KeypadListener.STATUS_ALT, KeypadUtil.MODE_EN_LOCALE)); protected boolean keyDown(int keycode, int time) { int key = Keypad.key(keycode); if ( key == BUTTON_2_KEY ) { // do something return true; } return super.keyDown(keycode,time); } I can't help but wonder if there is a better way to do this. I've looked at the constants defined in KeypadListener and Keypad but I can't find any constants mapped to the actual buttons on the device. Would any more experienced BlackBerry devs care to lend a helping hand? Thanks!

    Read the article

  • Blackberry (Java) - Can't get KeyListener to work

    - by paullb
    I am trying to get the KeyListener working for Blackberry, but none of the Dialogs pop up indicating that a key has been pressed (see code below, each action has a dialog popup in them). Any ideas on what i might be doing wrong? public class CityInfo extends UiApplication implements KeyListener { static CityInfo application; public static void main(String[] args) { //create a new instance of the application //and start the application on the event thread application.enterEventDispatcher(); } public CityInfo() { //display a new screen application = new CityInfo(); pushScreen(new WorkflowDisplayScreen()); this.addKeyListener(this); } public boolean keyChar(char arg0, int arg1, int arg2) { // TODO Auto-generated method stub Dialog.alert("key pressed : " + arg0); return true; } public boolean keyDown(int keycode, int time) { // TODO Auto-generated method stub Dialog.alert("keyDown : " + keycode); return false; } public boolean keyRepeat(int keycode, int time) { // TODO Auto-generated method stub Dialog.alert("keyRepeat : " + keycode); return false; } public boolean keyStatus(int keycode, int time) { // TODO Auto-generated method stub Dialog.alert("keyStatus : " + keycode); return false; } public boolean keyUp(int keycode, int time) { Dialog.alert("keyUp : " + keycode); // TODO Auto-generated method stub return false; } } I also tried implementing keyChar on the MainScreen class but that did not yield any results either.

    Read the article

  • how to create class alert using lcdui package in blackberry

    - by Baby
    Advance Thanks.i am new to blackberry developement.i try the following code for creating alert using lcdui package.but nothing will coming when i am running Plz help me. package alertpack; import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.AlertType; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.Screen; import javax.microedition.midlet.MIDlet; import javax.microedition.midlet.MIDletStateChangeException; import net.rim.device.api.ui.Color; import net.rim.device.api.ui.Graphics; public class alertclass extends MIDlet implements CommandListener { private Display display; private Alert alert; private Form form = new Form("Throw Exception"); private Command exit = new Command("Exit", Command.SCREEN, 1); //public static void main(String[] args) //{ //} private boolean exitFlag = false; public alertclass(){ display = Display.getDisplay(this); form.addCommand(exit); form.setCommandListener(this); } protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { // TODO Auto-generated method stub if (unconditional == false) { throw new MIDletStateChangeException(); } } protected void pauseApp() { // TODO Auto-generated method stub } protected void startApp() throws MIDletStateChangeException { // TODO Auto-generated method stub display.setCurrent(form); } public void commandAction(Command c, Displayable d) { // TODO Auto-generated method stub if (c == exit) { try { if (exitFlag == false) { alert = new Alert("Busy", "Please try again.", null, AlertType.WARNING); alert.setTimeout(Alert.FOREVER); display.setCurrent(alert, form); destroyApp(false); } else { destroyApp(true); notifyDestroyed(); } } catch (Exception exception) { exitFlag = true; } } } }

    Read the article

  • fetching gps location in blackberry

    - by SWATI
    in my application i try to fetch users location but it always 0.0 for both latitude and longitude.I have seen blackberry forum but couldn't find what am i doing wrong??? code : package com.MyChamberApp; import javax.microedition.location.Criteria; import javax.microedition.location.Location; import javax.microedition.location.LocationListener; import javax.microedition.location.LocationProvider; public class GPS_Location { static double longi; static double lati; public GPS_Location() { } public void location() { new LocationTracker(); } class LocationTracker { private LocationProvider provider; Criteria cr; public LocationTracker() { resetGPS(); } public void resetGPS() { try { cr = new Criteria(); cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH); cr.setPreferredResponseTime(120000); cr.setCostAllowed(true); provider = LocationProvider.getInstance(cr); provider.getLocation(120); if (provider != null) { provider.setLocationListener(new MyLocationListener(), 1,1,1); } } catch (Exception e) {} } public void run(){} private class MyLocationListener implements LocationListener { public void providerStateChanged(LocationProvider provider,int newState) { if (newState == LocationProvider.TEMPORARILY_UNAVAILABLE) { provider.reset(); resetGPS(); } if (newState == LocationProvider.OUT_OF_SERVICE) { provider.reset(); resetGPS(); } } public void locationUpdated(LocationProvider provider,Location location) { if (location != null && location.isValid()) { try { lati = location.getQualifiedCoordinates().getLatitude(); longi = location.getQualifiedCoordinates().getLongitude(); } catch (Exception e) {} } } } } } i have tried this code on curve8300,bold9000 It works well on simulator but does not fetches value on device till i manually do not refresh my gps. thanks in advance!!!!!!!!!!!!!!!!

    Read the article

  • BlackBerry 5.0 causing full menu to show on navigationClick

    - by jwadsack
    I have a BlackBerry app that is built for 4.5.x SDK. The first page of the app shows a list of fields and each field can be highlighted and clicked. The click action shows a new view with additional information about the field. This all works fine in 4.5, 4.6 and 4.7 and on the sim with 5.0. On a real 9000 running 5.0, when clicking the trackball on an item in the list, the full menu is showing rather than the click event getting consumed (or even fired) for the field. The view is derived from MainScreen and looks something like this: public class ListView extends MainScreen { public ItemCollection list = new ItemCollection; protected void sublayout( int maxWidth, int maxHeight ) { int i = 1; while(( item == (Item)list.nextElement()) != null) { ItemField field = new ItemField(item, i++); add(field); } } } This class does not consume navigationClick, but shouldn't need to, right? The field class does consume navigationClick event: public class ItemField extends Field { protected boolean navigationClick(int status, int time) { controller.showDeal(item.id, Session.current); return true; } } Is there something that changed in 5.0 that I need to add to have this app work the same for all platforms?

    Read the article

  • Unable to establish the connection to the file in BlackBerry

    - by Vikas
    I have tried the example code on SO to read the contents from the file in the resource directory in BlackBerry. But I am having an issue with the FileConnection. I get the following error: File system error (1003) I tried the example from here. I want only the read functionality, the file I want to read is in CSV format as a .txt file placed in the /res/test.txt. public class FileDemo extends MainScreen { public FileDemo() { setTitle("My Page"); String str = readTextFile("file:///test.txt"); System.out.println("Contents of the file::::::: " + str); } public String readTextFile(String fName) { String result = null; FileConnection fconn = null; DataInputStream is = null; try { fconn = (FileConnection) Connector.openInputStream(fName); is = fconn.openDataInputStream(); byte[] data = IOUtilities.streamToBytes(is); result = new String(data); } catch (IOException e) { System.out.println(e.getMessage()); } finally { try { if (null != is) is.close(); if (null != fconn) fconn.close(); } catch (IOException e) { System.out.println(e.getMessage()); } } return result; } } Any suggestions/advice on a better approach or as to how I can get this working??

    Read the article

  • Blackberry Development, adding dynamic number of buttons and setting Fieldchangelistener() for them

    - by Nikesh Yadav
    Hi, I am adding dynamic number of buttons in a Blackberry application and trying to get different events on each button click. I am not able to apply the setchangelistener() for these array of buttons as once the loop finishes after adding all the buttons, the events gets generated only for the last indexed button. If I make us of getIndex(), it runs fine only if I am not adding any other fields on my screen, but if I add other fields along with these array of buttons, the getIndex() function count them in the indexing as well. Can anyone please help me out in setting FieldChangeListener to array of ButtonField? Here is a sample code of the way I am using the array of ButtonField. I the code I have added two test LabelField at the top of the screen, if I remove them the code will run fine and I will get different result for each button click, but if I keep them active, the indexing gets effected and the Button wont work. package buttonclickloop; import net.rim.device.api.ui.DrawStyle; import net.rim.device.api.ui.Field; import net.rim.device.api.ui.FieldChangeListener; import net.rim.device.api.ui.component.ButtonField; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.container.HorizontalFieldManager; import net.rim.device.api.ui.container.MainScreen; public class ButtoncClickLoop extends MainScreen { int i = 0; private ButtonField[] btn = new ButtonField[50]; public ButtoncClickLoop() { // TODO Auto-generated constructor stub LabelField Field1 = new LabelField("Field1"); LabelField Field2 = new LabelField("Field2",DrawStyle.RIGHT | ButtonField.USE_ALL_WIDTH); HorizontalFieldManager FieldHmgr = new HorizontalFieldManager(); FieldHmgr.add(Field1); FieldHmgr.add(Field2); FieldHmgr.setMargin(0,0,10,5); add(FieldHmgr); while (i < 3){ FieldChangeListener listener = new FieldChangeListener() { public void fieldChanged(Field field, int context) { context = field.getIndex(); if (field == btn[context]){ add(new LabelField("Label" + context + "")); } } }; btn[i] = new ButtonField("Button" + i + ""); btn[i].setChangeListener(listener); add(btn[i]); i = i + 1; } } } Thanks, Nikesh

    Read the article

  • How to control manager class in Blackberry

    - by Keng
    Dear All, I have a problem when creating a UI on Blackberry. First, i try to create a ChatLayoutManager class extended from Manager class. My layout has three component: topfield, mainfield and bottom field. public class ChatLayoutManager extends Manager { private Field bottomField; private Field mainField; private Field titleField; public ChatLayoutManager(long style) { super(style); } protected void sublayout(int width, int height) { setExtent(width, height); int y = 0; if (bottomField != null) { layoutChild(bottomField, width, height); // This goes at the bottom of the screen setPositionChild(bottomField, 0, height-bottomField.getHeight()); height -= bottomField.getHeight(); } if (titleField != null) { layoutChild(titleField, width, height); // This goes at the top of the screen setPositionChild(titleField, 0, 0); height -= titleField.getHeight(); y += titleField.getHeight(); } if (mainField != null) { layoutChild(mainField, width, height); // This goes just below the title field (if any) setPositionChild(mainField, 0, y); } } public void setMainField(Field f) { mainField = f; add(f); } public void setBottomField(Field f) { bottomField = f; add(f); } public void setTitleField(Field f) { titleField = f; add(f); } Then i create another field (ChatField) extended from manager to add to mainfield in the ChatLayoutManager class which i have created above. public class ChatField extends Manager{ private Field _contentField[]; protected ChatField(){ super(Manager.HORIZONTAL_SCROLL | Manager.VERTICAL_SCROLL); } // TODO Auto-generated constructor stub} protected synchronized void sublayout(int width, int height) { // TODO Auto-generated method stub setExtent(width, height); int x = 0; int y = 0; if(_contentField.length > 0){ for(int i = 0 ;i<_contentField.length; i++){ //if(getManager() == this){ this.layoutChild(_contentField[i], _contentField[i].getWidth(), _contentField[i].getHeight()); this.setPositionChild(_contentField[i], x, y); if(_contentField[i++]!= null){ if ((_contentField[i].getWidth() + _contentField[i].getWidth()) >= width){ x = 0; y += _contentField[i].getHeight(); } else{ x += _contentField[i].getWidth(); } } //} } } } public void setContentField(Field field[]){ _contentField = field; } } And now, when i create some fields(such as TextField, BitmapField ...) added to ChatField, the program has an error "Field is not a child of this manager". The reason is when the framework invokes the sublayout function of the ChatField class , when sublayout starts calling layoutChild function the manager of field is not ChatField but ChatlayoutManager. I've experience hard time trying to resolve this problem, still I have no solution. Anybody can give me some suggestions? I really appreciate.

    Read the article

  • Can I add a second mobile/cell network to my Blackberry Express Server?

    - by cagcowboy
    We have recently installed Blackberry Express Server for our UK Blackberry users (who are on Vodafone, not sure if the network matters) Our US users have got wind of this and are hoping we can do the same for them. (They're mostly on AT&T) The UK & US Exchange mailboxes are based on 2 different exchange servers So... Q. Is it possible to support the US users with the current installation/server configuration?

    Read the article

  • Blackberry - Running Background Application

    - by Leandro
    Good afternoon. I'm starting programming in java and blackberry. I am developing an application with three windows, which I will show basic information about the device, these windows are already done and working. I need to create a process running in the background, this process will run every 10 minutes. As I make this process run in the background and is working to close the windows? This is the kind that runs the application: public class InfoBerry extends UiApplication{ public vtnprincipal vtnprincipal; public vtnbateria vtnbateria; public vtnestado vtnestado ; public vtnacerca vtnacerca; public InfoBerry(){ } public static void main(String[] args) { InfoBerry theApp = new InfoBerry(); theApp.mostrarpantalla(); } public void mostrarpantalla(){ vtnprincipal = new vtnprincipal(this); vtnbateria = new vtnbateria(this); vtnestado = new vtnestado(this); vtnacerca = new vtnacerca(this); // Inicailizamos los componentes de la pantalla principal vtnprincipal.incventana(); // La pnemos en lo alto de la pila de pantallas pushScreen(this.vtnprincipal); } } And this is the class you need to run in the background. As I have to make the call to this class to run in the background? class iconnoti extends MainScreen{ //icono de la temperatura EncodedImage imgtem = EncodedImage.getEncodedImageResource("icon_bateria_t.png"); ApplicationIcon icontem = new ApplicationIcon(imgtem); //icono de la carga de la bateria EncodedImage imgcarga = EncodedImage.getEncodedImageResource("icon_bateria.png"); ApplicationIcon iconcarga = new ApplicationIcon(imgcarga); //icono de la memoria EncodedImage imgmemo = EncodedImage.getEncodedImageResource("icon_memoria.png"); ApplicationIcon iconmemo = new ApplicationIcon(imgmemo); ApplicationIcon mIcon = icontem; boolean act; public iconnoti() { } public void rotar_temperatura(){ cron c1; actualizar_icono(icontem); actualizar_valor(DeviceInfo.getBatteryTemperature()); c1 = new cron(2,10000); c1.start(); } public void rotar_memoria(){ cron c1; actualizar_icono(iconmemo); actualizar_valor(34); c1 = new cron(3,10000); c1.start(); } public void rotar_nivel(){ cron c1; actualizar_icono(iconcarga); actualizar_valor(DeviceInfo.getBatteryLevel()); c1 = new cron(1,10000); c1.start(); } public void iniciar_servicio() { try { ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance(); ApplicationIndicator Indicator = reg.register(mIcon, false, true); } catch (Exception e) { } } public void parar_servicio() { try { ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance(); reg.unregister(); } catch (Exception e) { } } void actualizar_valor(int value) { try { ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance(); ApplicationIndicator appIndicator = reg.getApplicationIndicator(); appIndicator.setValue(value); } catch (Exception e) { } } void actualizar_icono(ApplicationIcon icon) { try { ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance(); ApplicationIndicator appIndicator = reg.getApplicationIndicator(); appIndicator.setIcon(icon); } catch (Exception e) { } } } class cron extends Thread { //private ApplicationIcon icono; public int valor; private int tiempo; iconnoti icon = new iconnoti(); public cron(int v, int t){ valor = v; tiempo = t; } public void run() { try { sleep(tiempo); } catch (InterruptedException e) { } if(valor == 1){ icon.rotar_temperatura(); }else if(valor == 2){ icon.rotar_memoria(); }else if(valor == 3){ icon.rotar_nivel(); } } } Thanks for the help.

    Read the article

  • Draw background for each cell in ObjectListField

    - by user315647
    Hi all, I am creating a blackberry apllication which pre-dominantly uses ObjectListFields..All i need now is to draw an image as a background for each cell. I know this is quiet possible but i am not getting hold of the procedure. if i draw bitmap in drawlistrow() function the bluehighlight gets into the background and the cell highlight becomes very hard to read......can anybody help me with a code snippet to get through this problem ....thanks...

    Read the article

  • configuring UltraLiteJ with eclipse plugin

    - by rupesh
    hi all i am using eclipse plug-in for developing blackberry application, i want to use database in my program i am not getting a proper tutorial or any stuff for configuring Ultralitej with eclipse plug-in. can any one please provide me with any tutorial or any guidance. Thanks a lot

    Read the article

  • RIM présente BlackBerry 6.0, le futur OS de ses téléphones

    Mise à jour du 28.04.2010 par Katleen RIM présente BlackBerry 6.0, le futur OS de ses téléphones BlackBerry. Les téléphones des professionnels par excellence. Une recette qui marche, et qui n'avait pas changé depuis un moment. Hier cependant, son fabriquant RIM a présenté la future version du système d'exploitation de ces mobiles. L'interface du BlackBerry OS 6.0 est efficace, même si elle emprunte beaucoup à d'autres produits, comme l'iPhone ou le Zune. Elle est très fonctionnelle et cohérente. Au niveau technique, le navigateur qui recevait des retours mitigés des utilisateurs, sera équipé d'une version récente du moteur de rendu HTML Webkit et affichera donc le...

    Read the article

  • How to do firmware updates/upgrades to a Blackberry

    - by Luis Alvarado
    I have several clients/friends that have Blackberry and wish to update their phone but without installing Windows. Any windows. Just doing it from Ubuntu. How can this be done. The update the mention is for the firmware and new programs for the phone. I do not know much about Blackberries since am more of an android guy. At the end they want support for upgrade/update the Blackberry from within Linux and sync it to the PC (Backups, upload/download stuff to and from it). I have seen 2 types of projects working on this: Linberry (From Venezuela ;) ) - http://linberry.webcindario.com/ Barry - http://www.netdirect.ca/software/packages/barry but so far neither offers updating the firmware or downloading updates. Are there any Ubuntu blackberry projects I am not aware of.

    Read the article

  • Blackberry custom OVERLAY horizontal menu

    - by Dachmt
    Thanks to Max in this post, I made an horizontal menu. But now I'm trying to make an overlay menu, i I don't find how to do that... Let's see what i got first. So, I have a class MapScreen which display my map: public class MapScreen extends MenuScreen Then, I have in the same file the MenuScreen class like this that allows to display the horizontal menu when I press the MENU key: abstract class MenuScreen extends MainScreen { boolean mMenuEnabled = false; CyclicHFManager mMenuManager = null; public MenuScreen() { mMenuManager = new CyclicHFManager(); mMenuManager.setBorder(BorderFactory.createBevelBorder(new XYEdges(4, 0, 0, 0), new XYEdges(Color.DARKBLUE, 0, 0, 0), new XYEdges( Color.WHITE, 0, 0, 0))); mMenuManager.setBackground(BackgroundFactory .createLinearGradientBackground(Color.DARKBLUE, Color.DARKBLUE, Color.LIGHTBLUE, Color.LIGHTBLUE)); for (int i = 0; i < 10; i++) { Bitmap nBitmap = new Bitmap(60, 60); Graphics g = new Graphics(nBitmap); g.setColor(Color.DARKBLUE); g.fillRect(0, 0, 60, 60); g.setColor(Color.WHITE); g.drawRect(0, 0, 60, 60); Font f = g.getFont().derive(Font.BOLD, 40); g.setFont(f); String text = String.valueOf(i); g.drawText(text, (60 - f.getAdvance(text)) >> 1, (60 - f .getHeight()) >> 1); Bitmap fBitmap = new Bitmap(60, 60); g = new Graphics(fBitmap); g.setColor(Color.DARKBLUE); g.fillRect(0, 0, 60, 60); g.setColor(Color.GOLD); g.drawRect(0, 0, 60, 60); g.setFont(f); g.drawText(text, (60 - f.getAdvance(text)) >> 1, (60 - f .getHeight()) >> 1); BitmapButtonField button = new BitmapButtonField(nBitmap, fBitmap); button.setCookie(String.valueOf(i)); button.setPadding(new XYEdges(0, 18, 0, 18)); button.setChangeListener(new FieldChangeListener() { public void fieldChanged(Field field, int context) { Dialog.inform("Button # " + (String) field.getCookie()); } }); mMenuManager.add(button); } } protected boolean keyDown(int keycode, int time) { if (Keypad.KEY_MENU == Keypad.key(keycode)) { if (mMenuManager.getManager() != null) { delete(mMenuManager); mMenuManager.mCyclicTurnedOn = false; } else { add(mMenuManager); mMenuManager.getField(2).setFocus(); mMenuManager.mCyclicTurnedOn = true; } return true; } else { return super.keyDown(keycode, time); } }} And finally my menu manager: public class CyclicHFManager extends HorizontalFieldManager { int mFocusedFieldIndex = 0; public boolean mCyclicTurnedOn = false; public void focusChangeNotify(int arg0) { super.focusChangeNotify(arg0); if (mCyclicTurnedOn) { int focusedFieldIndexNew = getFieldWithFocusIndex(); if (focusedFieldIndexNew != mFocusedFieldIndex) { if (focusedFieldIndexNew - mFocusedFieldIndex > 0) switchField(0, getFieldCount() - 1); else switchField(getFieldCount() - 1, 0); } } else { mFocusedFieldIndex = getFieldWithFocusIndex(); } } private void switchField(int prevIndex, int newIndex) { Field field = getField(prevIndex); delete(field); insert(field, newIndex); }} So as it is like this, it is working: when I press the MENU key, the menu appears, i can navigate between buttons, and it disappear when I press again the same key. The only problem is my menu isn't overlaying my map, it pushes the content up. I tried with the menu manager like in your first response, resizing the content manager but it is the same result. Max gave me the link http://stackoverflow.com/questions/1497073/blackberry-fields-layout-animation to do so, but I really don't know how to use it to make it work in my project... Thank you for your help! UPDATE This works great, it's what I wanted. However, I still have a problem because I'm under 4.5. So first in the MenuHostManager constructor, I deleted the USE_ALL_HEIGHT and change setPositionChild(mMenuManager, 0, Display.getHeight() - mMenuManager.getPreferredHeight()); like this to have the menu at the bottom of the screen. It worked. Then, instead of drawing my bitmaps, I did this: Bitmap nBitmap = EncodedImage.getEncodedImageResource("menu" + i + ".png").getBitmap(); BitmapButtonField button = new BitmapButtonField(nBitmap, nBitmap); And it worked too (no rollover for now, later). So it is great! I also overwrite the Paint method of my CyclicHFManager to have a background color, because I can't use the BorderFactory and BackgroundFactory... My menu bar has a color for now so it's ok. Then, because of these 2 classes missing, in my BitmapButtonField I had to delete the 2 setBorder functions that change the borders. And now i have my buttons pretty big like normal buttons with borders... How can I make the same effect as the setBorder functions under 4.5? (BTW, setBorder is not working under 4.5 too...). Thank you!

    Read the article

  • The Breakpoint Ep. 4 —The Tour De Timeline

    The Breakpoint Ep. 4 —The Tour De Timeline Ask and vote for questions at: goo.gl The DevTools' Timeline shows the heartbeat and health of your application's performance. In this episode we'll do a deep deep dive into how to uncover the cost of internal browser operations like parsing HTML, decoding images, invalidating layout geometry and painting to screen. Paul and Addy will show you how best to approach improving the performance of your CSS and JS. From: GoogleDevelopers Views: 0 0 ratings Time: 01:00:00 More in Science & Technology

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >