Android SqlLite DB?

by to...@webpro.com » Mon, 04 Jan 2010 14:52:25 GMT


Sponsored Links
 Hi, I am new to the Android Development process and I have on
question. Is there a way to access a non local sqlLite server or do
the db's have to be kept on the phone itself? If so what would be the
best way to pull data from an external db? Write a server side app
that pulls the data from the db and creates an XML file and saves it
to the server then read the XML file from the android app?

Thanks in advance for your pointers and suggestions!

Tommy

--



Android SqlLite DB?

by Kumar Bibek » Mon, 04 Jan 2010 15:34:28 GMT


 Hi,

You db has to be on the phone. You can of course access an online DB
server from your phone, but in such a case, you would have to write a
server side app as you have mentioned.

This depends. If your app uses data that changes dynamically, you will
have to use the server side app, else, you can use the local db that
you create on the phone

Thanks and Regards,
Kumar Bibek




--


Sponsored Links


Other Threads

1. Cupcake Keyboard Crash in Landscape mode

If I enable the "Orientation" preference in the "Sound & Display"
settings and I use the device in landscape mode I get the following
crash in Cupcake when I hit the Enter key:

05-28 19:48:40.250: ERROR/AndroidRuntime(364):
java.lang.IndexOutOfBoundsException: getChars (6 ... 0) has end before
start
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.text.SpannableStringBuilder.checkRange
(SpannableStringBuilder.java:935)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.text.SpannableStringBuilder.getChars
(SpannableStringBuilder.java:847)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.text.TextUtils.getChars(TextUtils.java:69)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.text.SpannableStringBuilder.<init>(SpannableStringBuilder.java:
59)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.text.SpannableStringBuilder.subSequence
(SpannableStringBuilder.java:839)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.widget.TextView.extractTextInternal(TextView.java:4405)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.widget.TextView.reportExtractedText(TextView.java:4443)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.widget.TextView.finishBatchEdit(TextView.java:4585)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.widget.TextView.endBatchEdit(TextView.java:4567)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
com.android.internal.widget.EditableInputConnection.endBatchEdit
(EditableInputConnection.java:54)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
com.android.internal.view.IInputConnectionWrapper.executeMessage
(IInputConnectionWrapper.java:334)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
com.android.internal.view.IInputConnectionWrapper
$MyHandler.handleMessage(IInputConnectionWrapper.java:57)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.os.Looper.loop(Looper.java:123)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-28 19:48:40.250: ERROR/AndroidRuntime(364):     at
dalvik.system.NativeStart.main(Native Method)

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

2. Button ID

I want to make UI Events but Eclipse underlines something in red:

Button button = (Button)findViewById([b]R.id[/b].corky);

I have a button whit the name "Ok"
what I'm doing wrong?

Full class:

package stijn.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Test extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button button = (Button)findViewById(R.id.corky);
        button.setOnClickListener(this);
    }

    public void onClick(View v) {
        // do something when the button is clicked
      }
}

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

3. how to create a new emulator instance

4. how to go to command prompt of emulator(very very urgently needed)

5. Android Camera Garbage Collection.

6. ERROR: Application requires API version 2. Device API version is 1

7. Starting services on Android Boot