Monday 14 November 2011

lAYOUT

<RelativeLayout android:id="@+id/relativeLayout8" android:layout_width="wrap_content" android:layout_below="@+id/relativeLayout7" android:layout_marginLeft="70dip" android:layout_marginTop="-5dip" android:layout_height="27dip">
                <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/TextView05" android:layout_alignParentLeft="true" android:background="@drawable/freak_off"></TextView>
                <Spinner android:id="@+id/spinner1" android:layout_marginLeft="165dip" android:layout_width="160dip" android:layout_height="15dip" android:layout_marginTop="8dip"></Spinner>
            </RelativeLayout>

Wednesday 9 November 2011

how to get own sim no.

TelephonyManager tMgr =(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);

double mPhoneNumber = tMgr.getLine1Number();

get loagitute and latitute

 LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
   
   Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);

double longitude = location.getLongitude();
   double       latitude = location.getLatitude();