×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    47

    Vibrate and Gauge problems - 6212

    Hi all,

    I looked up the function to make the phone vibrate. The code compiles and runs as expected on the emulator but does not function AT ALL on the physical phone. Here is the code used:

    Code:
    public void targetDetected(TargetProperties[] targetProperties)
    	{
    		//no targets found
    		if(targetProperties.length == 0)
    		{
                        welcomePage.append("No data stored.");
    			return;	//exit method as nothing found.
    		}
                    else
                    {
                        Thread thread = new Thread();
                        thread.start();
                    Display.getDisplay(this).vibrate(1000);
    
    ***********************MORE CODE FOLLOWING*********************************************
    I thought the issue might have been a concurrency problem so I created a new thread as you can see in the code above, still no success on the physical device.

    I also created a gauge to use as a progress bar. Once again it works as expected on the emulator but the bar only gets updated when all the data has been retrieved, which makes the loading screen obsolete. Similar issue to my vibrate problem, I thought creating a new thread may solve the problem but it didn't, everything is fine on the emulator but the physical phone is refusing to work as expected.

    Why am I having these issues with the physical device when the emulator works as expected? To clarify, I'm using NetBeans v 6.8 IDE and the Nokia 6212 NFC emulator and transferring the .jar onto the physical 6212 via Nokia PC Suite v 7.1.40.6.

    Thanks all.

  2. #2
    Registered User
    Join Date
    Nov 2009
    Posts
    47

    Re: Vibrate and Gauge problems - 6212

    Vibration problem solved, so thought I would post the solution for anyone trying to find an answer like I was.
    The phone will not vibrate if it is plugged into your computer via the USB cable, don't know why but when I test the application when it is disconnected from the computer it vibrates when expected.
    The gauge problem still persists however.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Vibrate and Gauge problems - 6212

    Hello,
    I also created a gauge to use as a progress bar. Once again it works as expected on the emulator but the bar only gets updated when all the data has been retrieved, which makes the loading screen obsolete
    Please explain the issue in details.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Registered User
    Join Date
    Nov 2009
    Posts
    47

    Re: Vibrate and Gauge problems - 6212

    I have created a screen that just has a gauge in it. I have created a loop which loads in items. After each item has been loaded, the gauge is updated dynamically. For example, I have 10 items to load in, when one item is loaded the bar is 10% full, when 2 items have been loaded in, the bar is 20% full etc.
    This function works as expected when I test it on the emulator but when I transfer the software onto the physical phone, the gauge behaves differently. The gauge does appear to increase but you can hardly see it filling. You see it empty and sometimes you see it full....so it appears that it is either moving very fast, so fast that you can't see the individual increments or the bar is not being updated on screen and only displays when the bar is empty and when it is full.
    In short, I'm almost certain the variables are being updated and working as expected but the screen is not being updated when the variables are updated, so, even though the internal values for the gauge is incrementing, the visual representation of the values are not being displayed.

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Vibrate and Gauge problems - 6212

    How are you increasing the value?

    are you doing this inside the Thread loop?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Vibrate and Gauge problems - 6212
    By slugger_2003 in forum Mobile Java General
    Replies: 2
    Last Post: 2010-04-20, 07:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •