Possibility of porting Android to the CECT P168C

by Carlos » Tue, 10 Mar 2009 14:41:26 GMT


Sponsored Links
 Do you guys think it is possible?

the phone can be bought here  http://www.dealextreme.com/details.dx/sku.5179 

I couldn't find the phone CPU specs..
--~--~---------~--~----~------------~-------~--~----~

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



Possibility of porting Android to the CECT P168C

by Ken » Mon, 13 Apr 2009 02:10:45 GMT


 i am interested if this is possible to
--~--~---------~--~----~------------~-------~--~----~

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


Sponsored Links


Other Threads

1. Need Help for Storing the Values

Hi I want to store the values which I am fetching from this code, I
have stated the problem where I think I can save the numbers, please
help. I have here copied the layout I want I am able to capture the
current phonebook and can display the phonebook, now I want to store
the numbers in particular values that I can later pass for Calling.
But I need this activity as a SubActivity which passes variable to
some other subactivity.

Thanks in Advance
NUBH

P.S. : The Code works fine, but its slow someone suggested to put the
methods outside the onCreate() please suggest.




The Layout:

<TableLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip"
        android:text="Please Save the Speed Dials"/>
    <ListView android:id="@+id/listView"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"/>

<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip"
        android:text="Number 1:"/>
<Spinner
         android:id="@+id/spinner"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content" />
<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip"
        android:text="Number 2:"/>
<Spinner
         android:id="@+id/spinner1"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content" />

<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip"
        android:text="Number 3:"/>
<Spinner
         android:id="@+id/spinner2"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content" />
<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip"
        android:text="Number 4:"/>
<Spinner
         android:id="@+id/spinner3"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
          />
<TableRow android:layout_marginTop="10dip">
<Button android:text="Save"
         android:id="@+id/SaveBtn"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"/>
<Button android:text="Cancel"
         android:id="@+id/CancelBtn"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content" />

</TableRow>

</TableLayout>

& the Code:

public class HelloSpinner extends Activity
{
        // Here we initiate the spinners and provide a result
        public void onCreate(Bundle savedInstanceState)
        {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
                // We define what we want to show here
                //@SuppressWarnings("unused")
                //String[] PROJECTION = new String[]
                //{
                                //      People._ID, People.NAME
                //};
                Spinner spinner = (Spinner) findViewById(R.id.spinner);
                Spinner spinner1 = (Spinner) findViewById(R.id.spinner1);
                Spinner spinner2 = (Spinner) findViewById(R.id.spinner2);
                Spinner spinner3 = (Spinner) findViewById(R.id.spinner3);

                spinner.setOnItemSelectedListener(new
MyOnItemSelectedListener());
                Cursor cur = getContentResolver().query(People.CONTENT_URI,
null, null, null, null);
                SimpleCursorAdapter adapter3 = new
SimpleCursorAdapter(this,
                                android.R.layout.simple_spinner_item,
                                // Use a template
                                // that displays
a
                                // text view
                                cur,
                                // Give the cursor to the list adapter
                                new String[] {People.NAME},
                                // Map the NAME column in the
                                // people database to...
                                new int[] {android.R.id.text1});
                                //      The "text1" view defined in
                                // the XML template
 
adapter3.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                                spinner.setAdapter(adapter3);

                                spinner1.setOnItemSelectedListener(new
MyOnItemSelectedListener1());
                        Cursor cur1 =
getContentResolver().query(People.CONTENT_URI, null, null, null,
null);
                                SimpleCursorAdapter adapter2 = new
SimpleCursorAdapter(this,
                                                
android.R.layout.simple_spinner_item,
                                                // Use a template
                                                // that displays
a
                                                // text view
                                                cur1,
                                                // Give the cursor to the list 
adapter
                                                new String[] {People.NAME},
                                                // Map the NAME column in the
                                                // people database to...
                                                new int[] {android.R.id.text1});
                                                //      The "text1" view 
defined in
                                                // the XML template
 
adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                                                spinner1.setAdapter(adapter2);

                                spinner2.setOnItemSelectedListener(new
MyOnItemSelectedListener2());
                            Cursor cur3 =
getContentResolver().query(People.CONTENT_URI, null, null, null,
null);
                                SimpleCursorAdapter adapter1 = new
SimpleCursorAdapter(this,
 
android.R.layout.simple_spinner_item,
                                                // Use a template
                                                // that displays
a
                                                // text view
                                                cur3,
                                                // Give the cursor to the list
adapter
                                                new String[] {People.NAME},
                                                // Map the NAME column in the
                                                // people database to...
                                                new int[] {android.R.id.text1});
                                                //      The "text1" view 
defined in
                                                // the XML template
 
adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                                                spinner2.setAdapter(adapter1);

                            spinner3.setOnItemSelectedListener(new
MyOnItemSelectedListener3());
                            Cursor cur4 =
getContentResolver().query(People.CONTENT_URI, null, null, null,
null);
                               SimpleCursorAdapter adapter = new
SimpleCursorAdapter(this,
 
android.R.layout.simple_spinner_item,
                                           // Use a template
                                           // that displays
a
                                           // text view
                                           cur4,
                                           // Give the cursor to the list
adapter
                                           new String[] {People.NAME},
                                           // Map the NAME column in the
                                           // people database to...
                                           new int[] {android.R.id.text1});
                                                //      The "text1" view 
defined in
                                                // the XML template
 
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                                                spinner3.setAdapter(adapter);

        } // The create method ends

                // This is method for first spinner
                public class MyOnItemSelectedListener implements
OnItemSelectedListener
                {
                        public void onItemSelected(AdapterView<?> parent,
                                        View view, int pos, long id)
                        {
                                //
                                        Toast.makeText(parent.getContext(),
                                        "The Person is " +
                                        
parent.getItemAtPosition(pos).toString(),
                                        Toast.LENGTH_LONG).show();
                        }
                        public void onNothingSelected(AdapterView<?> parent)
                        {
                                // Do nothing.
                        }
                }

                //      This is method for second spinner
                public class MyOnItemSelectedListener1 implements
OnItemSelectedListener
                {
                        public void onItemSelected(AdapterView<?> parent,
                                        View view, int pos, long id)
                        {
                                // The value saves here
                                Toast.makeText(parent.getContext(),
                                                "The Person is " +
                                                
parent.getItemAtPosition(pos).toString(),
                                                Toast.LENGTH_LONG).show();
                        }
                        public void onNothingSelected(AdapterView<?> parent)
                        {
                                // Do nothing.
                        }
                }

                // This is method for third spinner
                public class MyOnItemSelectedListener2 implements
OnItemSelectedListener
                {
                        public void onItemSelected(AdapterView<?> parent,
                                        View view, int pos, long id)
                        {
                                // The value saves here
                                                
Toast.makeText(parent.getContext(),
                                                                "The Person is 
" +
                                                                
parent.getItemAtPosition(pos).toString(),
                                                                
Toast.LENGTH_LONG).show();
                        }
                        public void onNothingSelected(AdapterView<?> parent)
                        {
                                // Do nothing.
                        }
                }

                // This is method for fourth spinner
                public class MyOnItemSelectedListener3 implements
OnItemSelectedListener
                {
                        public void onItemSelected(AdapterView<?> parent,
                                        View view, int pos, long id)
                        {
                                // The value saves here
                                                
Toast.makeText(parent.getContext(),
                                                                "The Person is 
" +
                                                                
parent.getItemAtPosition(pos).toString(),
                                                                
Toast.LENGTH_LONG).show();
                        }
                        public void onNothingSelected(AdapterView<?> parent)
                        {
                                // Do nothing.
                        }
                }

}// the class ends here

-- 

2. Announcing RoboGuice 1.0

Hello Android developers,

I'd like to announce the final release of RoboGuice 1.0!

http://code.google.com/p/roboguice

RoboGuice is a framework that brings the simplicity and ease of Dependency 
Injection to Android, using Google's own Guice library.  If you've ever used 
Spring (the #1 enterprise framework on Java, now more popular than J2EE itself) 
or Guice, you already know how convenient this style of programming can be.

To give you an idea, take a look at this simple example of a typical Android 
activity:

class AndroidWay extends Activity {
    TextView name;
    ImageView thumbnail;
    LocationManager loc;
    Drawable icon;
    String myName;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        name      = (TextView) findViewById(R.id.name);
        thumbnail = (ImageView) findViewById(R.id.thumbnail);
        loc       = (LocationManager) 
getSystemService(Activity.LOCATION_SERVICE);
        icon      = getResources().getDrawable(R.drawable.icon);
        myName    = getString(R.string.app_name);
        name.setText( "Hello, " + myName );
    }
}


This example is 18 lines of code.  If you're trying to read through onCreate(), 
you have to skip over 5 lines of boilerplate initialization to find the only 
one that really matters: name.setText().  And complex activities can end up 
with a lot more of this sort of initialization code.

Compare this to the same app, written using RoboGuice:

class RoboWay extends GuiceActivity {
    @InjectView(R.id.name)             TextView name;
    @InjectView(R.id.thumbnail)        ImageView thumbnail;
    @InjectResource(R.drawable.icon)   Drawable icon;
    @InjectResource(R.string.app_name) String myName;
    @Inject                            LocationManager loc;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        name.setText( "Hello, " + myName );
    }
}

In this example, onCreate() is much easier to take in at a glance.  All the 
platform boilerplate is stripped away and you're left with just your own app's 
business logic.  Do you need a SystemService?  Inject one.  Do you need a View 
or Resource?  Inject those, too, and RoboGuice will take care of the details.  

RoboGuice's goal is to make your code be about your app, rather than be about 
all the initialization and lifecycle code you typically have to maintain in 
Android.

RoboGuice has been in development since August 2009, and 0.9 entered release 
candidacy in December and has been stabilizing ever since. After three months 
and a few finishing touches, we now believe it's ready to expose to a larger 
audience.

We know that RoboGuice won't be for everybody.  Although RoboGuice never 
prevents you from doing things the Android way, some people will still prefer 
seeing everything spelled out explicitly in their code.  And other people who 
write extremely high performance applications such as games may not want to 
incur the small overhead imposed by yet another framework.  But for people who 
want to build simple and straightforward code that's easily testable and easy 
to read, I encourage you to give RoboGuice a try.

We hope you like it.  Stop by our discussion forums if you'd like to have any 
help getting started.

Cheers,
Mike


PS. We're beginning work on RoboGuice 1.1 now, which will include more 
injectible objects, better unit testing support, and hopefully some general 
usability improvements as well.  I'd love to hear your thoughts on other things 
you'd like to see in the next release. 





-- 

3. Dalvik VM : Memory Section of Zygote

4. Can set constant rate into wifi driver of Dev 1?

5. How to pass album art while using native media player

6. Any way to get some equivalent to the adb log while the device is not plugged into computer?

7. Resuming View with about 200KB of drawable resources: android.view.InflateException and java.lang.OutOfMemoryError