Google Maps - Traffic View

by javame_android » Wed, 09 Dec 2009 18:42:57 GMT


Sponsored Links
 Hi,

I would like to know how to use Traffic View or how to get the traffic
details from GPS. Have I to use Traffic View only or is their any
other way that can let me know about Traffic in my route.



Thanks & Regards
Sunil

--



Other Threads

1. Enable/Disable Broadcastreceiver from widget

Hi
I need some help registering and unregistering a broadcastReceiver from a 
widget.
When my widget is pressed i start a service with the following code

public void onStart( Intent intent, int startId )
{ 
SharedPreferences sharedPreferences = 
getApplicationContext().getSharedPreferences(SignalSpot.SHARED_PREFS_NAME, 
0);
boolean enabled = sharedPreferences.getBoolean("enabled", false);
Log.i(TAG,"Enabled: "+enabled);
//
SharedPreferences.Editor editor = sharedPreferences.edit();
       Log.i(TAG,"Just before if");
        if (!enabled) {
            try
            {IntentFilter filter = new IntentFilter();
        filter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
        SignalReceiver receiver = new SignalReceiver();
            Log.i(TAG,"Not enabled. Attempting to enable");
            registerReceiver(receiver, filter);
            Log.i(TAG,"Registered reciver");
            editor.putBoolean("enabled", true);
            editor.commit();
            Log.i(TAG,"Commited value");
            Toast.makeText(getApplicationContext(), "Signal Spot Enabled", 
Toast.LENGTH_LONG).show();
            Log.i(TAG,"Toast");
            }
            catch (Exception e)
            {
            Toast.makeText(getApplicationContext(), "Cannot Enable Signal 
Spot.\n" +
            "It May already be enabled. Please Try Again", 
Toast.LENGTH_LONG).show();}
        } else {
            try{
            SignalReceiver receiver = new SignalReceiver();
            Log.i(TAG,"Enabled. Attempting to disable");
            unregisterReceiver(receiver);
            Log.i(TAG,"Unregistered receiver");
            editor.putBoolean("enabled", false);
            editor.commit();
            Log.i(TAG,"Commited value");
            Toast.makeText(getApplicationContext(), "Signal Spot Disabled", 
Toast.LENGTH_LONG).show();
            Log.i(TAG,"Toast");
            }
            catch (Exception e)
            {Log.i(TAG,e.getMessage());
            Toast.makeText(getApplicationContext(), "Cannot disable Signal 
Spot.\n" +
            "It May not yet be enabled. Please Try Again", 
Toast.LENGTH_LONG).show();}
            
        }
 }

the problem is that each time i run this service i initialize SignalReceiver 
(my broadcastreceiver) so i am not registering and unregistering the 
same broadcastreceiver.
Is there any way around this or a better way to do this?
Thanks in advance.

-- 

2. Gyroscope heading change affects y axis

I've been playing around with the gyroscope on the Nexus S. I notice
that if the phone is not held parallel to the ground, rapid changes in
heading (z-axis) result in changes in the roll (y-axis). I would've
thought that gyro output would be relative to the phone's orientation.
Do I need to somehow compensate for the phone's orientation when
calculating roll?

-- 

3. How to define mp3 file in manifest?

4. Multiple Callbacks from native to java

5. Trouble running Android NDK

6. NullPointerExceptions calling IMarketBillingService

7. Broadcast to a specific class in another app