Nexus One Starting to Show Up in Third Party Retail Outlets

by Defriando Riza » Wed, 26 May 2010 23:10:32 GMT


Sponsored Links
 nexus1 dijual ditoko retail.. check this out..

 http://phandroid.com/2010/05/26/nexus-one-starting-to-show-up-in-third-party-retail-outlets/ 

Sent From MY GreenY

-- 
"



Other Threads

1. How do I update my activity on receiving intent in BroadcastReceiver

HI ,

I'm trying the understand how an application can receive intent in
BroadcastReceiver & how it can inform the Activity abt the information
received in the intent.

For this purpose I have created an activity which has a TextView. In
OnCreate of the Activity I'm using AlarmManager to start sending
intents every 10 sec to broadcast receiver of my application. On
receiving this intent I would like to update the text view with the
current time.

NotificationManager instead of trying to directly updating the UI.

Can some one pls let me know how I can achieve this.

Code snippets:
public class myFaves extends Activity
{
public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mCurrentTime = (TextView) findViewById(R.id.curtime_label);
       startUpdatingCurrentTime();
    }

protected void onPause()
    {
        super.onPause();
        cancelUpdatingCurrentTime();
    }

private void startUpdatingCurrentTime()
{
    Intent intent = new Intent(MyTimer.this, MyTimerReceiver.class);
    PendingIntent sender = PendingIntent.getBroadcast(MyTimer.this, 0,
intent, 0);

     // We want the alarm to go off every second from now.
     long firstTime = SystemClock.elapsedRealtime();
     firstTime += 10000;

     // Schedule the alarm!
     AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
     am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime,
10000, sender);

     Calendar calendar = Calendar.getInstance();
     calendar.setTimeInMillis(System.currentTimeMillis());
     mCurrentTime.setText( calendar.getTime().toString());
}

public void cancelUpdatingCurrentTime()
{
    Intent intent = new Intent(MyTimer.this, MyTimerReceiver.class);
    PendingIntent sender = PendingIntent.getBroadcast(MyTimer.this, 0,
intent, 0);

    // And cancel the alarm.
    AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
    am.cancel(sender);
}
}


public class MyTimerReceiver extends BroadcastReceiver
{
        protected static final String LOG_TAG = "MyTimer";


        @Override
        public void onReceive(Context context, Intent intent)
        {
                Log.d(LOG_TAG, "onReceive");
                                // How do I update the TextView with
current time in my activity?
        }

}
--~--~---------~--~----~------------~-------~--~----~

2. How to add Diff Views in Expandable List?

I need to add a table layout with an expandable list as a child in one of
the children of an expandable list.That is in the apis already provided we
have a single level expandable list.I want to add table as the child.And in
turn in the table i have an expandable list.How do i acheive this?

I tried the code below:

@Override
    public View getChildView(int groupPosition, int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {

        if (groupPosition == 1 && childPosition == 0) {
                TableLayout tableLayout = new TableLayout(context);
                TableLayout.LayoutParams lp = new TableLayout.LayoutParams(
                        ViewGroup.LayoutParams.FILL_PARENT, 500);
                lp.setMargins(40, 0, 0, 0);
                tableLayout.setLayoutParams(lp);
                TableRow tableRow = new TableRow(context);
                ExpandableListView expandableListView = new
ExpandableListView(
                        context);
                //expandableListView.setLayoutParams(params);
                ExpandableListAdapter mySubListAdapter = new
MySubListExpandableListAdapter(
                        context);

                expandableListView.setAdapter(mySubListAdapter );
                tableRow.addView(expandableListView);
                tableLayout.addView(tableRow);
                return tableLayout;
         }else {
            Log.i(getClass().getName(), "In getChildView ");
            TextView textView = getGenericView();
            textView.setText(getChild(groupPosition,
childPosition).toString());
            return textView;
        }
}


Also how do I enable logging in these Overriden methods.I dont see the
logs.I able to see the logs in the other methods.

Thanks for your time.

--~--~---------~--~----~------------~-------~--~----~

3. Clockwise or Counter-clockwise fling

4. source code file

5. How to package application for upload to websites from Eclipse IDE?

6. Where are all the apps

7. Motorola Q skin now available for Android Emulator!