Thursday, December 15, 2011

Top 25 Companies for Work-Life Balance in 2011

When it comes to balancing work with personal life see what companies rate the highest
according to employees.

Top 25 Winners
Ratings Scale: 5.0 - 4.01 = “Very Satisfied” 4.0 - 3.51 = “Satisfied”
Note: All ratings are for 04/01/10 - 03/31/11
 
How the Top 25 Were Selected

The Top Companies for Work-Life Balance list is based on employee feedback shared in company reviews on Glassdoor. Each company
review survey consists of 20 questions that capture employees’ attitudes about workplace factors, including Senior Leadership, Communication,
Employee Morale, Career Opportunities, Work-Life Balance, Compensation and Benefits, Recognition and Feedback, and Fairness and
Respect. The final ranking of each company on this list was determined by its overall work-life balance rating for the 12-month period ending
March 31, 2011.



Read more here.

2012 Best Places to Work – Employees’ Choice Awards

Best Places to Work – Employees' Choice Awards

Glassdoor is excited to announce our fourth annual Employees' Choice Awards for Best Places to Work. Our Top 50 winners were selected by the people who know these companies best — their employees! based on the input of those people who know these companies best — the employees! Criteria include employer ratings, such as career advancement and compensation, and CEO approval ratings. The ranking is determined based on the results of a 20-question survey that captures employees’ attitudes about: Career Opportunities, Communication, Compensation & Benefits, Employee Morale, Recognition & Feedback, Senior Leadership, Work/Life Balance, and Fairness & Respect.

Below is the list of top 50 Winners for the year 2012.

Employer Ratings Scale: 3.51-4.0 = “Satisfied” 4.01-5.0 = “Very Satisfied”



















































































Read more here.

Wednesday, December 14, 2011

Delete the whole Contacts from the android mobile

AIM:
To delete all contacts from the contacts of android phone.
Solution:
By executing the below lines will delete  all contacts from phone book permenently.

Cursor cur = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, null,null, null, null);
while (cur.moveToNext()) {
try {
    String lookupKey = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));
    Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_LOOKUP_URI,lookupKey);                            System.out.println("The uri is " + uri.toString());
    int deletedContacts=cr.delete(uri, null, null);
    log.i("","No.of deleted Contacts: "+deletedContacts);
  } catch (Exception e) {
    System.out.println(e.getStackTrace());
           }
This works on android 2.2 and above.
Please dont forget to add these permissions in Manifest.xml

 <uses-permission android:name="android.permission.READ_CONTACTS" />
 <uses-permission android:name="android.permission.WRITE_CONTACTS" />
      

delete all call history by a particular number in android phone

AIM:
To delete all call history associated with a particular number from the original call history of android phone.
Solution:
By executing the below lines will delete  all call history by a particular number will gets erased permenently.


        String strUriCalls = "content://call_log/calls"; // URI for CallLog in 2.2 and above
        Uri UriCalls = Uri.parse(strUriCalls);
        String queryString = "NUMBER='" + number + "'";
        Log.v("Number", queryString);
        int noofDeletedRows = getContentResolver().delete(UriCalls, queryString, null);
        Log.v("Number", "Deleted Rows deleted"+noofDeletedRows +" with the specified number:" + number);
Works on version 2.2 and above.

Removes the specified Call row permently from the CallLog in ANDROID

AIM : To removes the specified Call row from the Call Log in ANDROID
Solution:
The following method does the function. It requires "CALL LOG ID" of a particular callLog row.

        String strUriCalls = "content://call_log/calls";
        Uri UriCalls = Uri.parse(strUriCalls);
        String queryString = Calls._ID + "='" + rowID + "'";
        Log.v("Number", queryString);
        int i = getContentResolver().delete(UriCalls, queryString, null);
        Log.v("Number", "Deleted Rows:" + i);
We Can read the CALL LOG ID of  particular row(call) in android call hisory.
By using the following lines.


Cursor c = contentResolver.query(Uri.parse("content://call_log/calls"),null,null, null,android.provider.CallLog.Calls.DEFAULT_SORT_ORDER);
        // Retrieve the column-indixes of phoneNumber, date and calltype
        int numberColumn = c.getColumnIndex(android.provider.CallLog.Calls.NUMBER);
        int dateColumn = c.getColumnIndex(android.provider.CallLog.Calls.DATE);
        // type can be: Incoming, Outgoing or Missed
        int typeColumn = c.getColumnIndex(android.provider.CallLog.Calls.TYPE);
        int durationColumn = c.getColumnIndex(android.provider.CallLog.Calls.DURATION);
       
        // Will hold the calls, available to the cursor
       
                // Loop through all entries the cursor provides to us.
        if(c.moveToFirst()){
            do{
                String callerPhoneNumber = c.getString(numberColumn);
                Long callDate = c.getLong(dateColumn);
                int callType = c.getInt(typeColumn);
                int duration = c.getInt(durationColumn);
               
                 switch(callType){
                    case android.provider.CallLog.Calls.INCOMING_TYPE:
           
           break;
                    case android.provider.CallLog.Calls.MISSED_TYPE:
                       
                        break;
                    case android.provider.CallLog.Calls.OUTGOING_TYPE:

                        break;
                }
           
                String cName=c.getString(c.getColumnIndex(android.provider.CallLog.Calls.CACHED_NAME));
                String cId=c.getString(c.getColumnIndex(android.provider.CallLog.Calls._ID));
                                       }while(c.moveToNext());
        }
   
SImilarly,you can read all properties of a calllog programatically.
It works on all above 2.2 + versions.

Create an auto-Scrolling Marquee TextView in android

AIM:
Create a  textview that scroll text if text is not fit in the specified width,without need to focus just like Android Market app description screen.

Solution:
This solution able to scroll text inside a TextView without it required to be focused. For some strange reason there isn't an easy way to do this natively.

Generally, textview will marque the text when it is focused only.
By using the below code,the textview will automatically scroll even without focus to textview.

Step 1: Create an autoscrolltextview by extending textview (ScrollingTextView.java)
public class ScrollingTextView extends TextView {

    public ScrollingTextView(Context context, AttributeSet attrs,
            int defStyle) {
        super(context, attrs, defStyle);
    }

    public ScrollingTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ScrollingTextView(Context context) {
        super(context);
    }

    @Override
    protected void onFocusChanged(boolean focused, int direction,
            Rect previouslyFocusedRect) {
        if (focused) {
            super.onFocusChanged(focused, direction, previouslyFocusedRect);
        }
    }

    @Override
    public void onWindowFocusChanged(boolean focused) {
        if (focused) {
            super.onWindowFocusChanged(focused);
        }
    }

    @Override
    public boolean isFocused() {
        return true;
    }
}

Step 2:  Use this XML tag in your XML layout.
   <com.test.autoscroll.ScrollingTextView
                android:id="@+id/actionbar_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingLeft="10dip"
                android:paddingRight="10dip"
                android:textSize="16dip"
                android:textStyle="bold"
                android:lines="1"
                android:scrollHorizontally="true"
                android:ellipsize="marquee"
                 android:text="autoscrollable textview without focus to textview...working...."
                android:marqueeRepeatLimit="marquee_forever"
                />
This will get you the scrolling marquee behavior desired out of the TextView control!
 

Android Developers Blog

Ram's shared items

Amazon Product Ads