Search Results

Search found 11845 results on 474 pages for 'blackberry eclipse plugin'.

Page 46/474 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • What is the recommended way for calling remote JSON objects from native blackberry apps?

    - by jpartogi
    Dear all, IF I am to develop a native application on blackberry, what would be the recommended way to call remote JSON object? As I understand native blackberry apps is coded using Java, would it still be able to contact a remote JSON object from Ruby on Rails? Has there been any blackberry framework to ease this use case? Thank you very much for your help. I really appreciate it.

    Read the article

  • buttonField clicking problem in blackberry

    - by Master
    hi when i am setting the BackGround image through VerticalField Manager. only one buttonField is gettin clicked ,other button field is not working. can i have the solution for it. please if not i want alternative which will position the buttonfield ,set by user. and i want a image as a background help me out. its urgent.. public GreetingsMainScreen() { homeBackgroundImage=Bitmap.getBitmapResource("com/greetings/Images/HomeBackgroundImage.jpg"); exitField=new ButtonField("Exit",ButtonField.CONSUME_CLICK); exitField.setChangeListener(this); greetField=new ButtonField("GREET",ButtonField.CONSUME_CLICK); greetField.setChangeListener(this); VerticalFieldManager manager = new VerticalFieldManager() { protected void sublayout(int width, int height) { width=fwidth; height=fHeight; super.sublayout(width,height); setPositionChild(greetField, width-232, height-150); setPositionChild(exitField, width-205, height-110); setExtent(width, height); } }; manager.setBackground(BackgroundFactory.createBitmapBackground(homeBackgroundImage)); manager.add(exitField); manager.add(greetField); add(manager); } public void fieldChanged(Field field, int context) { if(field == exitField) { Dialog.alert("Hi"); System.exit(0); } if(field == greetField) { System.exit(0); } } } Thanks alot

    Read the article

  • Set postion in customized list field in blackberry

    - by arunabha
    I want three list field items to be displayed, from bottom to top. I am able to display three list field items, but they display from top to bottom. I have tried setting the position, but it isn't working. import java.util.Vector; import net.rim.device.api.system.Bitmap; import net.rim.device.api.system.Display; import net.rim.device.api.ui.ContextMenu; import net.rim.device.api.ui.DrawStyle; import net.rim.device.api.ui.Field; import net.rim.device.api.ui.Font; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.Manager; import net.rim.device.api.ui.MenuItem; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.component.BitmapField; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.component.ListField; import net.rim.device.api.ui.component.ListFieldCallback; import net.rim.device.api.ui.component.NullField; import net.rim.device.api.ui.container.FullScreen; import net.rim.device.api.ui.container.MainScreen; import net.rim.device.api.util.Arrays; import net.rim.device.api.ui.component.ListField; /** * @author Jason Emerick */ public class TaskListField extends UiApplication { //statics ------------------------------------------------------------------ public static void main(String[] args) { TaskListField theApp = new TaskListField(); theApp.enterEventDispatcher(); } public TaskListField() { pushScreen(new TaskList()); } } /*class List extends FullScreen { TaskList tl; List(){ super(); TaskList tl=new TaskList(); } }*/ class TaskList extends MainScreen implements ListFieldCallback { private Vector rows; private Bitmap p1; private Bitmap p2; private Bitmap p3; String Task; ListField listnew=new ListField(); public TaskList() { super(); listnew.setRowHeight(50); //setEmptyString("Hooray, no tasks here!", DrawStyle.HCENTER); listnew.setCallback(this); p1 = Bitmap.getBitmapResource("1.png"); p2 = Bitmap.getBitmapResource("2.png"); p3 = Bitmap.getBitmapResource("3.png"); rows = new Vector(); for (int x = 0; x < 3; x++) { TableRowManager row = new TableRowManager(); if (x== 0) { Task="On Air Now"; } if (x== 1) { Task="Music Channel"; } if (x==2) { Task="News Channel"; } // SET THE PRIORITY BITMAP FIELD // if high priority, display p1 bitmap if (x % 2 == 0) { row.add(new BitmapField(p1)); } // if priority is 2, set p2 bitmap else if (x % 3 == 0) { row.add(new BitmapField(p2)); } // if priority is 3, set p3 bitmap else { row.add(new BitmapField(p3)); } // SET THE TASK NAME LABELFIELD // if overdue, bold/underline LabelField task = new LabelField(Task, DrawStyle.ELLIPSIS); // if due today, bold if (x % 2 == 0) { task.setFont(Font.getDefault().derive( Font.BOLD)); } else { task.setFont(Font.getDefault().derive(Font.BOLD)); } row.add(task); LabelField task1 = new LabelField("Now Playing" + String.valueOf(x), DrawStyle.ELLIPSIS); // if due today, bold /* if (x % 2 == 0) { task.setFont(Font.getDefault().derive( Font.BOLD)); } else { task.setFont(Font.getDefault().derive(Font.BOLD)); }*/ Font myFont = Font.getDefault().derive(Font.PLAIN, 12); task1.setFont(myFont); row.add(task1); // SET THE DUE DATE/TIME row.add(new LabelField("", DrawStyle.ELLIPSIS | LabelField.USE_ALL_WIDTH | DrawStyle.RIGHT) { protected void paint(Graphics graphics) { graphics.setColor(0x00878787); super.paint(graphics); } }); rows.addElement(row); } listnew.setSize(rows.size()); this.add(listnew); } // ListFieldCallback Implementation public void drawListRow(ListField listField, Graphics g, int index, int y, int width) { //TaskList list =(TaskListField) listnew; TableRowManager rowManager = (TableRowManager)rows .elementAt(index); rowManager.drawRow(g, 0, y, width, listnew.getRowHeight()); } private class TableRowManager extends Manager { public TableRowManager() { super(0); } // Causes the fields within this row manager to be layed out then // painted. public void drawRow(Graphics g, int x, int y, int width, int height) { // Arrange the cell fields within this row manager. layout(0, 1); // Place this row manager within its enclosing list. setPosition(x,y); // Apply a translating/clipping transformation to the graphics // context so that this row paints in the right area. g.pushRegion(getExtent()); // Paint this manager's controlled fields. subpaint(g); g.setColor(0x00CACACA); g.drawLine(0, 0, getPreferredWidth(), 0); // Restore the graphics context. g.popContext(); } // Arrages this manager's controlled fields from left to right within // the enclosing table's columns. protected void sublayout(int width, int height) { // set the size and position of each field. int fontHeight = Font.getDefault().getHeight(); int preferredWidth = getPreferredWidth(); // start with the Bitmap Field of the priority icon /* Field field = getField(0); layoutChild(field, 0, 0); setPositionChild(field, 150, 300);*/ // set the task name label field /* field = getField(1); layoutChild(field, preferredWidth - 16, fontHeight + 1); setPositionChild(field, 34, 3); // set the list name label field field = getField(2); layoutChild(field, 150, fontHeight + 1); setPositionChild(field, 34, fontHeight + 6);*/ // set the due time name label field /* field = getField(3); layoutChild(field, 150, fontHeight + 1); setPositionChild(field,4,340);*/ /* layoutChild(listnew, preferredWidth, fontHeight); setPositionChild(listnew, 3, 396);*/ setExtent(360, 480); } // The preferred width of a row is defined by the list renderer. public int getPreferredWidth() { return getWidth(); } // The preferred height of a row is the "row height" as defined in the // enclosing list. public int getPreferredHeight() { return listnew.getRowHeight(); } } public Object get(ListField listField, int index) { // TODO Auto-generated method stub return null; } public int getPreferredWidth(ListField listField) { // TODO Auto-generated method stub return 0; } public int indexOfList(ListField listField, String prefix, int start) { // TODO Auto-generated method stub return 0; } }

    Read the article

  • Hook for redraw event in Blackberry

    - by Bendlas
    Is there a way to add a redraw callback to a live screen object, i.e. not via inheritance? Reasoning: I want to draw an overlay from an extension for widget sdk (substituting defunct position:absolute), so the screen is created by the bbwp stub. I can get it by Ui.getUiEngine().getActiveScreen() and draw on it quite nicely, but I need a way to redraw when appropriate. Note: I've abandoned the approach to push the overlay as a screen, because i couldn't make it transparent / find a way to pass events through.

    Read the article

  • Blackberry pixel-specific animated focus scrolling

    - by Diego Tori
    Suppose I have a VFM full of both focusable and non-focusable fields. Since most of them are spread out far apart, the movement from one focused field to another is jerky at best, even with NullFields in between. In other words, it just sets the current y position to the next focused field without smoothly scrolling the screen. What I want to achieve is to be able to scroll at a fixed rate between fields, so it it doesn't just focus from one to another that instantaneously. After reading up on how to do this, it is a matter of overriding moveFocus and setting it via a TimerTask from an accessor method to set moveFocus, as per this link. However, I haven't seen a practical implementation of how to do this, complete with the routines that are called in the TimerTask's thread. Is there any way to achieve this type of behavior?

    Read the article

  • When is onBind or onCreate called in an android service browser plugin?

    - by anselm
    I have adapted the example plugin of the android source and the browser recognises the plugin without any problem. Here is an extract of AndroidManifest.xml: <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> <service android:name="com.domain.plugin.PluginService"> <intent-filter> <action android:name="android.webkit.PLUGIN" /> </intent-filter> </service> </application> <uses-sdk android:minSdkVersion="7" /> <uses-permission android:name="android.webkit.permission.PLUGIN"></uses-permission> The actual Service class looks like so: public class PluginService extends Service { @Override public IBinder onBind(Intent arg0) { Log.d("PluginService", "onBind"); return null; } @Override public void onCreate() { Log.d("PluginService", "onCreate"); // TODO Auto-generated method stub super.onCreate(); AssetInstaller.getInstance(this).installAssets("/data/data/com.domain.plugin"); } } The AssetInstaller code is supposed to extract some files required by the actual plugin into the /data/data/com.domain.plugin directory, however wether onBind nor onCreate are called. But I get lot's of debug trace of the actual libnpplugin.so file I'm using. So the puzzle is when and under what circumstance is the Service bound or created in case of a browser plugin. As things look the service seems to be a dummy service. Having said that, is there another intent that can be executed at installation time probably? The only solution I see right now is installing the needed files from the native plugin code instead. Any ideas? I know this is quite a tricky question ;)

    Read the article

  • Can you overlay transparent images in Blackberry Apps?

    - by Greg
    I have a very simple application that has one screen and one button. The main screen has a verticalFieldManager with a BitmapField inside it, and one button beneath the bitmap. I want to be able to overlay another image on top of this when the user clicks a button. The overlay image is a PNG with transparent background, and this is important for design, so I can't use popupscreen or a new screen because the backgrounds are always white by default, and I've heard alpha doesn't really do the trick. I guess what I'm asking is if anyone knows a simple way to... A) take a standard verticalFieldManager and overlay a PNG on top of the inner contents B) overlay a PNG over the screen, no matter the contents The basic functionality of this app was intended to be - show an image. on click, show another overlaid on top. on click again, remove the popup image. I haven't found anything that addresses something like this online, but I have read of people doing similar things that utilize popupscreen and new screens in a way I don't need to do. Hopefully this makes sense. Thanks

    Read the article

  • blackberry maps do not show correct location on the device

    - by SWATI
    well frnds my code for maps works well and shows all pics and gradient paths very well on the simulator after simulating the gps ,but it does not works on the device.... The gps on device is working properly as google maps and other work related to gps are working perfectly fine my code if(GPS_Location.lati!=0.0 && GPS_Location.longi!=0.0) { User_latitude = ((GPS_Location.lati)*100000); User_longitude = ((GPS_Location.longi)*100000); User_La = String.valueOf(User_latitude).substring(0, String.valueOf(User_latitude).lastIndexOf('.')); User_Lo = String.valueOf(User_longitude).substring(0, String.valueOf(User_longitude).lastIndexOf('.')); if(param.equals("")) //for find business near me { document1 = "<location-document>" + "<location lon='"+User_Lo+"' lat='"+User_La+"' label='User' />"+ "<location lon='"+User_Lo+"' lat='"+User_La+"' label='"+"User"+"' />"+ "</location-document>"; } if(!param.equals("")) //for the directions { Business_latitude = Double.parseDouble(param.substring(0, param.lastIndexOf(','))); Business_longitude = Double.parseDouble(param.substring(param.lastIndexOf(',')+1,param.length())); Business_latitude = Business_latitude*100000; Business_longitude = Business_longitude*100000; Business_La = String.valueOf(Business_latitude).substring(0, String.valueOf(Business_latitude).lastIndexOf('.')); Business_Lo = String.valueOf(Business_longitude).substring(0, String.valueOf(Business_longitude).lastIndexOf('.')); document1 = "<location-document>" + "<GetRoute>"+ "<location lon='"+User_Lo+"' lat='"+User_La+"' label='User' />"+ "<location lon='"+Business_Lo+"' lat='"+Business_La+"' label='"+"User"+"' />"+ "</GetRoute>"+ "</location-document>"; } Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,document1)); } this code works on simulator but not fine on device. just points a pin indicating user and nothing else what to do????

    Read the article

  • Eclipse: would more CPU cores with HyperThreading help increase speed?

    - by Dylan
    I'm programming a very large project in Eclipse. Right now I use a dual core machine with 2GB RAM, but Eclipse is sometimes busy for minutes (refreshing/indexing/building), so I'm upgrading to a new machine (with 16GB RAM and an SSD). Now I must choose between an Intel 2500K or an Intel 2600K that has HyperThreading. The price difference is about $100. Would that be worth it, for Eclipse, or is more memory/faster drive much more important for Eclipse ? Can Eclipse make use of the HyperThreading at all?

    Read the article

  • eclipse gcov plugin

    - by Taani
    I am using gcov plugin in Eclipse CDT + cygwin compiler & linker to find code coverage. I installed gcov plugin from http://svn.sourceforge.jp/svnroot/ginkgo/trunk/org.ginko.gcov.update/ location and follow the below link to get coverage of my .c file. I was able to create .gcno and .gcda files. But double clicking on those files, opens the files in eclipse editor. I could not find the gcov editor. Also I couldn't see any code coverage results in my .c file. What is the wrong with my procedure?

    Read the article

  • BlackBerry - Custom Layout

    - by Rateesh
    Hi All, I am very much new to the Blacberry development environment. I am trying to make a simple calculator application. But when i implement buttons it is always displaying one below the another. I need to custom place the controls. Is there any way to make the layout custom so that i can place my controls as i wish. Thanks in advance, Rateesh

    Read the article

  • BlackBerry - RadioButtonField, hide border on select

    - by Jessica
    I have a screen with two RadioButtonField objects. By default, the first RadioButtonField shows a rectangle around it to show its selected, and the rectangle moves if you change the selection to the other RadioButtonField or other buttons and textboxes on the page. What I would like to know is...is there a way to hide this border that shows the selection/border?

    Read the article

  • Maven "Module" vs "Project" (Eclipse, m2eclipse plugin)

    - by Ricket
    I'm a beginner at Maven and I've played with it from a command line point of view a little, so now I was trying to use it in Eclipse; I installed the m2eclipse plugin to do so. But I'm stumped from the very beginning! Apparently I've missed a bit of terminology somewhere along the line. I can't keep track of all these new Maven terms... What is a Maven Project, and what is a Maven Module? These are my options when creating a new project in the Maven category in Eclipse.

    Read the article

  • Blackberry ListField Text Wrapping - only two lines.

    - by Diego Tori
    Within my ListField, I want to be able to take any given long String, and just be able to wrap the first line within the width of the screen, and just take the remaining string and display it below and ellipsis the rest. Right now, this is what I'm using to detect wrapping within my draw paint call: int totalWidth = 0; int charWidth = 0; int lastIndex = 0; int spaceIndex = 0; int lineIndex = 0; String firstLine = ""; String secondLine = ""; boolean isSecondLine = false; for (int i = 0; i < longString.length(); i++){ charWidth = Font.getDefault().getAdvance(String.valueOf(longString.charAt(i))); //System.out.println("char width: " + charWidth); if(longString.charAt(i) == ' ') spaceIndex = i; if((charWidth + totalWidth) > (this.getWidth()-32)){ //g.drawText(longString.substring(lastIndex, spaceIndex), xpos, y +_padding, DrawStyle.LEFT, w - xpos); lineIndex++; System.out.println("current lines to draw: " + lineIndex); /*if (lineIndex = 2){ int idx = i; System.out.println("first line " + longString.substring(lastIndex, spaceIndex)); System.out.println("second line " + longString.substring(spaceIndex+1, longString.length())); }*/ //firstLine = longString.substring(lastIndex, spaceIndex); firstLine = longString.substring(0, spaceIndex); //System.out.println("first new line: " +firstLine); //isSecondLine=true; //xpos = 0; //y += Font.getDefault().getHeight(); i = spaceIndex + 1; lastIndex = i; System.out.println("Rest of string: " + longString.substring(lastIndex, longString.length())); charWidth = 0; totalWidth = 0; } totalWidth += charWidth; System.out.println("total width: " + totalWidth); //g.drawText(longString.substring(lastIndex, i+1), xpos, y + (_padding*3)+4, DrawStyle.ELLIPSIS, w - xpos); //secondLine = longString.substring(lastIndex, i+1); secondLine = longString.substring(lastIndex, longString.length()); //isSecondLine = true; } Now this does a great job of actually wrapping any given string (assuming the y values were properly offsetted and it only drew the text after the string width exceeded the screen width, as well as the remaining string afterwards), however, every time I try to get the first two lines, it always ends up returning the last two lines of the string if it goes beyond two lines. Is there a better way to do this sort of thing, since I am fresh out of ideas?

    Read the article

  • BlackBerry - How to send image as a attachment

    - by rupesh
    Hi all i am new to this technology. i have configured ESS server with Microsoft Outlook for sending email from simulator. But i am not able to send image as a attachment from simulator to outlook. html attachement is working fine. Should i configure BES server with Microsoft Exchange for testing the image attachment. is it possible. can any one provide me suggestion.

    Read the article

  • BlackBerry - Exception with null message when sending sms using Connector

    - by vikram deshpande
    I used code given but I am getting "IOCancelledException" and "IOException". And IOCancelledException.getMessage() / IOException.getMessage() giving null string, it does not give error message. Please help me understaing reason. class SMSThread extends Thread { Thread myThread; MessageConnection msgConn; String message; String mobilenumber; public SMSThread(String textMsg, String mobileNumber) { message = textMsg; mobilenumber = mobileNumber; } public void run() { try { msgConn = (MessageConnection) Connector.open("sms://+" + mobilenumber); TextMessage text = (TextMessage) msgConn .newMessage(MessageConnection.TEXT_MESSAGE); text.setPayloadText(message); msgConn.send(text); msgConn.close(); } catch (IOCancelledException ioce) { System.out .println("IOCancelledException: " + ioce.getMessage()); } catch (IOException ioe) { System.out.println("IOException: " + ioe.getMessage()); } catch (Exception e) { System.out.println("Exception: " + e); } } }

    Read the article

  • Blackberry application works in simulator but not device

    - by Kai
    I read some of the similar posts on this site that deal with what seems to be the same issue and the responses didn't really seem to clarify things for me. My application works fine in the simulator. I believe I'm on Bold 9000 with OS 4.6. The app is signed. My app makes an HTTP call via 3G to fetch an XML result. type is application/xhtml+xml. In the device, it gives no error. it makes no visual sign of error. I tell the try catch to print the results to the screen and I get nothing. HttpConnection was taken right out of the demos and works fine in sim. Since it gives no error, I begin to reflect back on things I recall reading back when the project began. deviceside=true? Something like that? My request is simply HttpConnection connection = (HttpConnection)Connector.open(url); where url is just a standard url, no get vars. Based on the amount of time I see the connection arrows in the corner of the screen, I assume the app is launching the initial communication to my server, then either getting a bad result, or it gets results and the persistent store is not functioning as expected. I have no idea where to begin with this. Posting code would be ridiculous since it would be basically my whole app. I guess my question is if anyone knows of any major differences with device versus simulator that could cause something like http connection or persistent store to fail? A build setting? An OS restriction? Any standard procedure I may have just not known about that everyone should do before beginning device testing? Thanks

    Read the article

  • Securing Plugin Data in WordPress From Access by Other Plugins?

    - by farinspace
    There probably is some solution to this, whether it involves code running on just the wordpress installation or a combination of a wordpress installation and a master server I am not sure yet, but please remember not to have tunnel vision and consider any and all possible solutions: The scenario is this: A WordPress plugin (plugin-A) that manages some sort of valuable data (something that the admin would not want stolen), lets say, lead data with user's name and email addresses, the plugin uses its own db tables. Other than the obvious (which is the admin installing plugin-B, not knowing its malicious intent), what is to prevent another WordPress plugin (plugin-B) from accessing plugin-A data or hacking plugin-A files to circumvent security.

    Read the article

  • Blackberry - Disable Save option in BasicEditField ??

    - by chethan
    I am using a basiceditfield to take input from the user to do some simple string search. But if i type a few letters and wish to go back without continuing the search, it automatically asks me whether to save the contents of the field. I don want this to happen. Can i in any way disable the "Changes made!-save-discard-cancel" option in basiceditfield(or any editfield for that matter)????please help!!!

    Read the article

  • Blackberry - Custom size EditField

    - by Eric
    I am trying to put together a dialog that should look like this: Fill in the below fields ___________ likes ________________ where the "_" lines are the EditFields. I am sticking all the fields in a HorizontalFieldManager, which I add to the dialog. Unfortunately, the first EditField consumes all the space on the first line. I have tried to override the getPreferredWidth() method of the EditField by creating my own class extending BasicEditField, but have had no success. Surely there must be a simple way to force a certain size for an edit field. What am I missing?

    Read the article

  • Blackberry: Passing KML file to Google Maps

    - by Pria
    I want to know that can I pass KML as a string to google map application? Code snippet: //KML String String document = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><kml xmlns=\"http://www.opengis.net/kml/2.2\"><Document><Folder><name>Paths</name><open>0</open><Placemark><LineString><tessellate>1</tessellate><coordinates> -112.0814237830345,36.10677870477137,0 -112.0870267752693,36.0905099328766,0</coordinates></LineString></Placemark></Folder></Document></kml>"; //Invoke Google Maps int module = CodeModuleManager.getModuleHandle("GoogleMaps"); if (module == 0) { try { throw new ApplicationManagerException("GoogleMaps isn't installed"); } catch (ApplicationManagerException e) { System.out.println(e.getMessage()); } } String[] args = {document}; //Is this possible??? ApplicationDescriptor descriptor = CodeModuleManager.getApplicationDescriptors(module)[0]; ApplicationDescriptor ad2 = new ApplicationDescriptor(descriptor, args); try { ApplicationManager.getApplicationManager().runApplication(ad2, true); } catch (ApplicationManagerException e) { System.out.println(e.getMessage()); }

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >