ASK COMPATIBLE BATTERY : zte blade

by dimas mailist » Sat, 16 Apr 2011 11:47:10 GMT


Sponsored Links
 baterai zte blade (orange san fransisco) itu compatible dengan handphone apa
ya?
atau kalau beli orinya berapaan dan dimana?

thx

-- 
"



Other Threads

1. Null Pointer Exception while creating table

hi,
    I have implement this example. but i got an error.

    I have write the code just for create database, create table,
insert values in it.

    When I run application it displays nothing.

    But when i tried to open my database from command prompt Like:

    ls data/data/MyPackageNm

    Then it gives only a Lib folder rather than database and Lib both.

    So, i tried to found error via Log cat and put my code in try and
catch.

    I got an error while creating table.

    its gave Null Pointer exception.

    Please any one help me.

    My Log cat is like that and i have use this sample example as my
code.

    Thanks.

Log Cat:-

uid=10032 gids={}
09-29 15:36:09.727: DEBUG/dalvikvm(813): LinearAlloc 0x0 used 538516
of 4194304 (12%)
09-29 15:36:09.837: INFO/jdwp(822): received file descriptor 10 from
ADB
09-29 15:36:10.128: INFO/Niketa(822): database created
09-29 15:36:10.137: INFO/Niketa(822): database opened
09-29 15:36:10.137: INFO/Niketa(822): ------null
09-29 15:36:10.147: INFO/Niketa(822): +++++
+java.lang.NullPointerException
09-29 15:36:10.337: INFO/ActivityManager(52): Displayed activity
com.db/.DataBaseWork: 754 ms
09-29 15:36:15.507: DEBUG/dalvikvm(675): GC freed 44 objects / 1800
bytes in 151ms
09-29 15:36:15.507: DEBUG/dalvikvm(118): GC freed 3 objects / 72 bytes
in 143ms
09-29 15:36:15.527: DEBUG/dalvikvm(92): GC freed 1539 objects / 70560
bytes in


-----------------------------------------------------------------------------------------------------------------------------------------


My java code is:

package com.db;

//import java.io.FileNotFoundException;
import java.util.ArrayList;

import android.app.Activity;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.os.Bundle;
import android.util.Log;
import android.widget.ArrayAdapter;

public class DataBaseWork extends Activity {
        private final String MY_DATABASE_NAME = "LoginDB";
    private final String MY_DATABASE_TABLE = "Login1";
    private final String tag="Niketa";


    @Override
    public void onCreate(Bundle icicle) {
         super.onCreate(icicle);

         ArrayList<String> results = new ArrayList<String>();
         SQLiteDatabase myDB = null;
         try {

              /* Create the Database (no Errors if it already exists)
*/
              this.createDatabase(MY_DATABASE_NAME, 1, MODE_PRIVATE,
null);
              Log.i(tag,"database created");

              /* Open the DB and remember it */

              myDB = this.openDatabase(MY_DATABASE_NAME, null);
              Log.i(tag,"database opened ");

              /* Create a Table in the Database. */
              try
              {
              myDB.execSQL("CREATE TABLE IF NOT EXISTS "
                                  + "LoginDB.Login1"
                                  + " (UserNm TEXT, PassWd TEXT)"
                                  +";");
              Log.i(tag,"table created ");
              }
          /*    catch(SQLException e1)
              {
                  Log.i(tag,"SQL EXception"+e1);
              }*/


              catch(Exception e)
              {
                  Log.i(tag,"------"+e.getMessage());
                  Log.i(tag,"++++++"+e);
              }

            /*  catch(SQLiteException se)
              {
                  Log.i(tag,"SQLite Error--------"+se);
              }*/
              /* Add two DataSets to the Table. */
              myDB.execSQL("INSERT INTO "
                                  + MY_DATABASE_TABLE
                                  + " (UserNm, PassWd)"
                                  + " VALUES ('abc', 'def');");
              Log.i(tag,"value inserted ");


              /* Query for some results with Selection and Projection.
*/
              Cursor c = myDB.rawQuery("SELECT UserNm,PassWd" +
                                       " FROM " + MY_DATABASE_TABLE
                                       + ";",
                                       null);
              Log.i(tag,"value seleted ");

              /* Get the indices of the Columns we will need */
              int firstNameColumn = c.getColumnIndex("UserNm");
              int ageColumn = c.getColumnIndex("PassWd");

              /* Check if our result was valid. */
              if (c != null) {
                   /* Check if at least one Result was returned. */
                  if (c.isFirst()) {
                        int i = 0;

                        do {
                             i++;

                             String firstName =
c.getString(firstNameColumn);
                             int age = c.getInt(ageColumn);
                             String ageColumName =
c.getColumnName(ageColumn);

                             results.add("" + i + ": " + firstName
                                            + " (" + ageColumName + ":
" + age + ")");
                        } while (c!=null);
                   }
              }
         }
         catch (Exception e)
         {
                 Log.i(tag,"Error----->"+e);
         }
         finally
         {
              if (myDB != null)
                   myDB.close();
         }
         this.setListAdapter(new ArrayAdapter<String>(this,
                 android.R.layout.simple_list_item_1, results));
  }


        private void setListAdapter(ArrayAdapter<String> arrayAdapter)
        {
        }

        private SQLiteDatabase openDatabase(String my_database_name2, Object
object)
        {
                return null;
        }

        private void createDatabase(String my_database_name2, int i,
                        int modePrivate, Object object)
        {


        }
}

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

2. Customizing preferences editor

I have a preference setting that I need to customize so that the preference
will only accept ints.
The way I understand this is that I specify the android:dialogLayout with
the name of my custom layout:
<EditTextPreference
              android:key="distance_units_m"
           android:title="Distance"
               android:summary="Summary"
               android:dialogTitle="title"
   android:dialogLayout="@layout/preferences_distance"
               />

This is my customized EditText: it only accepts numbers up to 9999.
<?xml version="1.0" encoding="UTF-8"?>

<EditText
xmlns:android="http://schemas.android.com/apk/res/android"
android:numeric="integer"
android:maxLength="4"
android:hint="Enter distance (max 9999)"
/>
This works and shows up correctly.

I do not do anything else and my activity simply loads the XML resource.

The problem is that if I do specify my custom editor the data from the user
is not automatically saved anymore.
(Removing only the line with the dialogLayout makes it save as expected, so
that is correct)

Do I have to specify anything else in the XML to get it saved? Or do I now
have to program this?
(I would have thought that behind the scenes, the editor (whether it is
custom or not) is somehow created by a factory, and then all invocations
happen on the created object, thus making it no difference how the look/feel
of the custom editor is. But that is obviously not how it is done)

Any pointers?

Ludwig

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

3. How to use mock location in sdk 1.0????

4. ocr for andrion??

5. Log Reading Problem in sdk 0.9

6. Phone Listner API in Android?

7. problems calling Hessian service with HTTP post