Re: [android-beginners] custom listview add button above listeview

2010-07-29 Thread Nick Richardson
Perhaps i'm not understanding what you're saying, but why can you not do it
with your xml layout?





Here's an example XML that seems to work, maybe you can tailor it to your
needs?
http://schemas.android.com/apk/res/android";
  android:id="@+id/MainPageLayout"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical" >





On Thu, Jul 29, 2010 at 5:25 PM, calmchess wrote:

> Hi I'm using a  custom list view by extending  a class with
> BaseAdapter this works well displays all my data however i want to add
> a single button above the listview without useing addheader but I
> don't know how to add it to the baseAdapter or getView method if i add
> the button to main.xml each cell of the listview is populated with a
> button this is undesireable i only want 1 button above the
> listview.please help me to add the button. the below code is for
> refrence
>
> public class customlistview extends Activity implements
> OnClickListener{
>ListView l1;
> private static class EfficientAdapter extends BaseAdapter  {
>private LayoutInflater mInflater;
>private ArrayList> ret=null;
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: Launching an "About" screen from Preferences

2010-07-29 Thread Mark Murphy
On Thu, Jul 29, 2010 at 9:15 PM, Bret Foreman  wrote:
> I removed the intent filter and still got the FC with the
> ActivityNotFoundException. Is there a better way to debug this stuff
> rather than trial and error?

I can't find where what you're doing is documented, so I have no idea
what the right behavior is. Do you have a link to where it describes
this  child element of ?

Regardless, I see where I went wrong before.

Your error is:

E/AndroidRuntime(  376): android.content.ActivityNotFoundException: No
Activity
found to handle Intent { act=com.shipmate.AboutShipMateActivity }

Notice the "act=com.shipmate.AboutShipMateActivity" part. That says
the Intent it is trying to use has an *action* of
com.shipmate.AboutShipMateActivity. So, add an  with an
 of com.shipmate.AboutShipMateActivity to your activity, and
you should have better luck.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] play mp4 files within application

2010-07-29 Thread Kyle
I've created an application that loads a website using WebView.
Everything works fine except that I'm unable to play any video files
within the application. So, what I'm looking for help on is getting my
application to launch the mediaplayer when clicking on a link with
a .mp4 video. Any help and tips would be much appreciated!


Thanks,
-Kyle

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Launching an "About" screen from Preferences

2010-07-29 Thread Bret Foreman
I removed the intent filter and still got the FC with the
ActivityNotFoundException. Is there a better way to debug this stuff
rather than trial and error?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: InstantiationException when starting IntentService

2010-07-29 Thread Wall-E
I found my "errors" or mistakes.  So I found out that I was setting
the constructor incorrectly which as DanH stated is why the
InstantiationException is thrown. I had:

public _Constructor(String name)
{
super(name);
}

WHICH IS INCORRECT.

The proper way is to not include a String name argument, such as:

public _Constructor()
{
super(name);
}

While we are on the subject of IntentServices, a few things that threw
me off were the following:

I implemented the onCreate() and onStartCommand(...) methods and it
was entering those with no problem but for some reason it wasn't
entering the onHandleIntent(Intent intent) method at all.
I found out that it was because you had to call super.onCreate() and
super.onStartCommand().

By the way all these tips were on other threads but I failed to
connect the solutions to the problem but now they are all in one
thread.

Thanks.



On Jul 29, 12:47 pm, DanH  wrote:
> InstantiationException occurs when an exception is thrown out of a
> constructor.  Generally there should be another exception reported as
> causing the InstantiationException, and the stack trace should point
> to the specific lines that are in error.  Stack trace is your friend,
> and you should be grateful -- their are poor children programming on
> Symbian devices who have no stack trace.
>
> On Jul 29, 11:24 am, Wall-E  wrote:
>
>
>
> > I am trying to start an IntentService inside my Broadcast Receiver
> > ( so inside of onReceive() ):
>
> >     public class SmsMessageReceiver extends BroadcastReceiver
> >     {
> >         .
> >         .
> >         .
> >         public void onReceive(.)
> >         {
> >              .
> >              .
> >              .
> >              Intent mServiceIntent = new Intent(context,
> > SmsParserService.class );
> >              mServiceIntent.putExtra("phoneNumber", fromAddress);
> >              mServiceIntent.putExtra("smsMessage",
> > message.getMessageBody());
> >                context.startService(mServiceIntent);
> >         }
>
> >     }
>
> >     So if I change the IntentService class to a regular Service class,
> > although it has funny behavior, it still goes into the
> > onStartCommand(...) and onCreate() methods, but for the IntentService,
> > before going into any of those methods it throws an
> > InstantiationException and in the detailMessage it just says
> > "com.tvismobile.SmsParserService" which is what my Service is labeled
> > as in the Manifest file.
>
> > Is there something special you have to do to get IntentService
> > started?
>
> > Any help is appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] custom listview add button above listeview

2010-07-29 Thread calmchess
Hi I'm using a  custom list view by extending  a class with
BaseAdapter this works well displays all my data however i want to add
a single button above the listview without useing addheader but I
don't know how to add it to the baseAdapter or getView method if i add
the button to main.xml each cell of the listview is populated with a
button this is undesireable i only want 1 button above the
listview.please help me to add the button. the below code is for
refrence

public class customlistview extends Activity implements
OnClickListener{
ListView l1;
 private static class EfficientAdapter extends BaseAdapter  {
private LayoutInflater mInflater;
private ArrayList> ret=null;

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] read flat file from resources

2010-07-29 Thread Nick Richardson
If you need to write info to a file, you can simply create a new file and
write to that instead.

So for example: on first run, read info from your resource and write it to a
new file.  On every subsequent run, check to see if the new file exists, and
read/write your data there instead.

On Thu, Jul 29, 2010 at 3:35 PM, Mark Murphy wrote:

> On Thu, Jul 29, 2010 at 6:33 PM, Droid  wrote:
> > I want to read words from a flat text file in res. Is that possible -
> > snippet of code please?
>
> getResources().openRawResource(R.raw.your_file_name)
>
> > Also, can I write to a similar file in resources.
>
> No, sorry.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: Launching an "About" screen from Preferences

2010-07-29 Thread Mark Murphy
Try getting rid of the .

On Thu, Jul 29, 2010 at 7:45 PM, Bret Foreman  wrote:
> I changed the manifest to look as below and it still exits with the
> same error.
>
>      
>                
>                         android:name="android.intent.category.DEFAULT"/>
>                
>                
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Launching an "About" screen from Preferences

2010-07-29 Thread Bret Foreman
I changed the manifest to look as below and it still exits with the
same error.

  





-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] read flat file from resources

2010-07-29 Thread Mark Murphy
On Thu, Jul 29, 2010 at 6:33 PM, Droid  wrote:
> I want to read words from a flat text file in res. Is that possible -
> snippet of code please?

getResources().openRawResource(R.raw.your_file_name)

> Also, can I write to a similar file in resources.

No, sorry.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] read flat file from resources

2010-07-29 Thread Droid
I want to read words from a flat text file in res. Is that possible -
snippet of code please?
Also, can I write to a similar file in resources. Guessing no because
of encryption etc.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Big Issue with running and testing app on phone while still being connected to PC

2010-07-29 Thread Victoria Busse
Thanks ;) I fixed this error :D

On Thu, Jul 29, 2010 at 10:26 PM, Nick Richardson  wrote:

> Your error is here:
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): Caused by:
> java.lang.NullPointerException
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> com.mobilevideoeditor.moved.EditGalleryView.init_phone_video_grid(EditGalleryView.java:78)
>
> Line 78 of EditGalleryView.java is throwing an NPE.
>
> On Tue, Jul 27, 2010 at 5:04 PM, Victoria Busse <
> victoriasarabu...@gmail.com> wrote:
>
>> Hi there,
>>
>> I have a huge problem testing my app on my HTC Wildfire. It was working
>> fine until recently, but now I always get a force close error when I run or
>> debug a new version of the app.
>>
>> When I try to run the app on the emulator it still works, when I
>> disconnect the phone from the PC, the app also runs on the phone (including
>> all changes)... I was working on a xml file when this happened. If someone
>> could help me out here, that would be great...because this is really weird
>> and I really don't know what I should do now...
>>
>> Thanks in advance...
>>
>> This is the logcat output I get from the phone:
>>
>> 07-28 00:54:56.707: ERROR/AndroidRuntime(14315): Uncaught handler: thread
>> main exiting due to uncaught exception
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315):
>> java.lang.RuntimeException: Unable to start activity
>> ComponentInfo{com.mobilevideoeditor.moved/com.mobilevideoeditor.moved.GalleryView}:
>> java.lang.RuntimeException: Unable to start activity
>> ComponentInfo{com.mobilevideoeditor.moved/com.mobilevideoeditor.moved.EditGalleryView}:
>> java.lang.NullPointerException
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.access$2200(ActivityThread.java:126)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.os.Handler.dispatchMessage(Handler.java:99)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.os.Looper.loop(Looper.java:123)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.main(ActivityThread.java:4603)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> java.lang.reflect.Method.invokeNative(Native Method)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> java.lang.reflect.Method.invoke(Method.java:521)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> dalvik.system.NativeStart.main(Native Method)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): Caused by:
>> java.lang.RuntimeException: Unable to start activity
>> ComponentInfo{com.mobilevideoeditor.moved/com.mobilevideoeditor.moved.EditGalleryView}:
>> java.lang.NullPointerException
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.startActivityNow(ActivityThread.java:2411)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:648)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.widget.TabHost.setCurrentTab(TabHost.java:320)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.widget.TabHost.addTab(TabHost.java:213)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> com.mobilevideoeditor.moved.GalleryView.onCreate(GalleryView.java:33)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): ... 11 more
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): Caused by:
>> java.lang.NullPointerException
>> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
>> com.mobilevideoeditor.moved.EditGalleryView.init_phone_video_grid(EditGalleryView.java:78)

Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Nick Richardson
Join the club... I've made $8 in three weeks from mine.  At this rate, i'll
pay for my market account about the time it starts to snow :)

On Thu, Jul 29, 2010 at 2:39 PM, Justin Anderson wrote:

> I figured I would let him figure out Step 5 the hard way  ;-)
>
> Unless you have an absolutely freaking amazing app there is no profit.  I
> have an app on the market that I think is pretty cool.  There is a free
> version and a donate key for $0.99 that unlocks a few extra features.
>
> I've made about $170 or so since last October...  With the amount of time I
> put in to it I think I am making less than a penny per hour.  But I do it
> for the fun of programming and because it is an app that I wanted on my
> phone and couldn't find any that fully suited my needs...
>
>
>
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
> On Thu, Jul 29, 2010 at 3:34 PM, Nick Richardson <
> richardson.n...@gmail.com> wrote:
>
>> Indeed it would - I was hoping celluri would pick that part up on his own,
>> but you had to go and ruin the surprise!! :)
>>
>> On Thu, Jul 29, 2010 at 1:58 PM, Justin Anderson > > wrote:
>>
>>> > Step 4: 
>>> That would be onActivityResult()... taken directly from the link you
>>> posted
>>>
>>> --
>>> There are only 10 types of people in the world...
>>> Those who know binary and those who don't.
>>> --
>>>
>>>
>>> On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson <
>>> richardson.n...@gmail.com> wrote:
>>>
 Step 1: Create new activity
 Step 2: Create intent to launch that activity
 Step 3: startActivityForResult()
 Step 4: 
 Step 5: Profit!


 http://developer.android.com/reference/android/app/Activity.html#StartingActivities


 On Wed, Jul 28, 2010 at 7:57 PM, cellurl  wrote:

> Can you elaborate a bit please? Intent covers so much material.
> Thank you very much!
> Jim
>
>
> On Jul 25, 10:36 am, Paul Turchenko  wrote:
> > Use intent to pick a picture and start activity for result
> >
> > On Jul 24, 10:47 pm, cellurl  wrote:
> >
> > > How do I launch some external application to show phone pictures
> and
> > > let users pick one?
> >
> > > The picture will serve as a background in my app.
> > > So all in all, I just need their selection. e.g. the path/name once
> > > they have chosen it.
> >
> > > Something simple would be nice ;-)
> >
> > > thanks
> > > jim
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



 --
 //Nick Richardson
 //richardson.n...@gmail.com

 --
 You received this message because you are subscribed to the Google
 Groups "Android Beginners" group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Beginners" group.
>>>
>>> NEW! Try asking and tagging your question on Stack Overflow at
>>> http://stackoverflow.com/questions/tagged/android
>>>
>>> To unsubscribe from this group, send email to
>>> android-beginners+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-beginners?hl=en
>>>
>>
>>
>>
>> --
>> //Nick Richardson
>> //richardson.n...@gmail.com
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> android-beginners+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questio

Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Justin Anderson
I figured I would let him figure out Step 5 the hard way  ;-)

Unless you have an absolutely freaking amazing app there is no profit.  I
have an app on the market that I think is pretty cool.  There is a free
version and a donate key for $0.99 that unlocks a few extra features.

I've made about $170 or so since last October...  With the amount of time I
put in to it I think I am making less than a penny per hour.  But I do it
for the fun of programming and because it is an app that I wanted on my
phone and couldn't find any that fully suited my needs...



--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Thu, Jul 29, 2010 at 3:34 PM, Nick Richardson
wrote:

> Indeed it would - I was hoping celluri would pick that part up on his own,
> but you had to go and ruin the surprise!! :)
>
> On Thu, Jul 29, 2010 at 1:58 PM, Justin Anderson 
> wrote:
>
>> > Step 4: 
>> That would be onActivityResult()... taken directly from the link you
>> posted
>>
>> --
>> There are only 10 types of people in the world...
>> Those who know binary and those who don't.
>> --
>>
>>
>> On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson <
>> richardson.n...@gmail.com> wrote:
>>
>>> Step 1: Create new activity
>>> Step 2: Create intent to launch that activity
>>> Step 3: startActivityForResult()
>>> Step 4: 
>>> Step 5: Profit!
>>>
>>>
>>> http://developer.android.com/reference/android/app/Activity.html#StartingActivities
>>>
>>>
>>> On Wed, Jul 28, 2010 at 7:57 PM, cellurl  wrote:
>>>
 Can you elaborate a bit please? Intent covers so much material.
 Thank you very much!
 Jim


 On Jul 25, 10:36 am, Paul Turchenko  wrote:
 > Use intent to pick a picture and start activity for result
 >
 > On Jul 24, 10:47 pm, cellurl  wrote:
 >
 > > How do I launch some external application to show phone pictures and
 > > let users pick one?
 >
 > > The picture will serve as a background in my app.
 > > So all in all, I just need their selection. e.g. the path/name once
 > > they have chosen it.
 >
 > > Something simple would be nice ;-)
 >
 > > thanks
 > > jim

 --
 You received this message because you are subscribed to the Google
 Groups "Android Beginners" group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en

>>>
>>>
>>>
>>> --
>>> //Nick Richardson
>>> //richardson.n...@gmail.com
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Beginners" group.
>>>
>>> NEW! Try asking and tagging your question on Stack Overflow at
>>> http://stackoverflow.com/questions/tagged/android
>>>
>>> To unsubscribe from this group, send email to
>>> android-beginners+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-beginners?hl=en
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> android-beginners+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>
>
>
> --
> //Nick Richardson
> //richardson.n...@gmail.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Nick Richardson
Indeed it would - I was hoping celluri would pick that part up on his own,
but you had to go and ruin the surprise!! :)

On Thu, Jul 29, 2010 at 1:58 PM, Justin Anderson wrote:

> > Step 4: 
> That would be onActivityResult()... taken directly from the link you posted
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
> On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson <
> richardson.n...@gmail.com> wrote:
>
>> Step 1: Create new activity
>> Step 2: Create intent to launch that activity
>> Step 3: startActivityForResult()
>> Step 4: 
>> Step 5: Profit!
>>
>>
>> http://developer.android.com/reference/android/app/Activity.html#StartingActivities
>>
>>
>> On Wed, Jul 28, 2010 at 7:57 PM, cellurl  wrote:
>>
>>> Can you elaborate a bit please? Intent covers so much material.
>>> Thank you very much!
>>> Jim
>>>
>>>
>>> On Jul 25, 10:36 am, Paul Turchenko  wrote:
>>> > Use intent to pick a picture and start activity for result
>>> >
>>> > On Jul 24, 10:47 pm, cellurl  wrote:
>>> >
>>> > > How do I launch some external application to show phone pictures and
>>> > > let users pick one?
>>> >
>>> > > The picture will serve as a background in my app.
>>> > > So all in all, I just need their selection. e.g. the path/name once
>>> > > they have chosen it.
>>> >
>>> > > Something simple would be nice ;-)
>>> >
>>> > > thanks
>>> > > jim
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Beginners" group.
>>>
>>> NEW! Try asking and tagging your question on Stack Overflow at
>>> http://stackoverflow.com/questions/tagged/android
>>>
>>> To unsubscribe from this group, send email to
>>> android-beginners+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-beginners?hl=en
>>>
>>
>>
>>
>> --
>> //Nick Richardson
>> //richardson.n...@gmail.com
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> android-beginners+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Big Gmail client Archive/Delete/Older buttons

2010-07-29 Thread Nick Richardson
There is no way to move those buttons in the stock gmail client.  You would
have to write your own if you wanted to achieve this.

On Thu, Jul 29, 2010 at 2:11 PM, Robert Reid  wrote:

> While I like having quick access to the Archive, Delete, and Older
> buttons I feel that they take up too much real estate when in
> landscape mode.  I'm wondering if there is any way to make the buttons
> 'shorter' (taking less vertical space) or to hide them.
> Alternatively, it would be nice if they appeared only at the top or
> bottom of the message (so that they are contained within the
> scrollable portion of the display).
>
> Rob
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Big Issue with running and testing app on phone while still being connected to PC

2010-07-29 Thread Nick Richardson
Your error is here:
07-28 00:54:56.727: ERROR/AndroidRuntime(14315): Caused by:
java.lang.NullPointerException
07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
com.mobilevideoeditor.moved.EditGalleryView.init_phone_video_grid(EditGalleryView.java:78)

Line 78 of EditGalleryView.java is throwing an NPE.

On Tue, Jul 27, 2010 at 5:04 PM, Victoria Busse  wrote:

> Hi there,
>
> I have a huge problem testing my app on my HTC Wildfire. It was working
> fine until recently, but now I always get a force close error when I run or
> debug a new version of the app.
>
> When I try to run the app on the emulator it still works, when I disconnect
> the phone from the PC, the app also runs on the phone (including all
> changes)... I was working on a xml file when this happened. If someone could
> help me out here, that would be great...because this is really weird and I
> really don't know what I should do now...
>
> Thanks in advance...
>
> This is the logcat output I get from the phone:
>
> 07-28 00:54:56.707: ERROR/AndroidRuntime(14315): Uncaught handler: thread
> main exiting due to uncaught exception
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315):
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.mobilevideoeditor.moved/com.mobilevideoeditor.moved.GalleryView}:
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.mobilevideoeditor.moved/com.mobilevideoeditor.moved.EditGalleryView}:
> java.lang.NullPointerException
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.access$2200(ActivityThread.java:126)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.os.Looper.loop(Looper.java:123)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.main(ActivityThread.java:4603)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> dalvik.system.NativeStart.main(Native Method)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): Caused by:
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.mobilevideoeditor.moved/com.mobilevideoeditor.moved.EditGalleryView}:
> java.lang.NullPointerException
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.startActivityNow(ActivityThread.java:2411)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:648)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.widget.TabHost.setCurrentTab(TabHost.java:320)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.widget.TabHost.addTab(TabHost.java:213)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> com.mobilevideoeditor.moved.GalleryView.onCreate(GalleryView.java:33)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): ... 11 more
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): Caused by:
> java.lang.NullPointerException
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> com.mobilevideoeditor.moved.EditGalleryView.init_phone_video_grid(EditGalleryView.java:78)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> com.mobilevideoeditor.moved.EditGalleryView.onCreate(EditGalleryView.java:62)
> 07-28 00:54:56.727: ERROR/AndroidRuntime(14315): at
> android.app.Instrume

Re: [android-beginners] Re: Bluetooth Debugging on phones

2010-07-29 Thread Nick Richardson
I have had no problems reading messages from Log.* via logcat from either
the emulator or my phone connected via USB.

Are you perhaps filtering out your own log messages with the logcat command?
 Probably not since you said it works on the emulator.

One more obvious point: make sure "USB Debugging" is enabled in
Settings->Applications->Development

On Tue, Jul 27, 2010 at 12:48 PM, DonFrench  wrote:

> Well, I use Eclipse and view the log file with the LogCat View, which
> works great -- other than the well-known problem with occasionally
> having to reset adb or restart eclipse to get the log file refreshed.
> I can't imagine that using the command line creates some other problem
> but I haven't tried it.
>
>
> On Jul 27, 2:01 am, Megh  wrote:
> > Ah, sorry.
> >
> > Debugging statements like: Log.e(TAG, "++ ON START ++");
> > that would show up on the LogCat when using the emulator, don't work
> > when the phone is plugged in and the app is running on it.
> >
> > I'm wondering if this is true, or it's just me missing something.
> > Also, does anyone have any other recommendations for using debugging
> > statements?
> >
> > On Jul 23, 7:07 pm, Nick Richardson  wrote:
> >
> > > Your question is quite vague.  I have never had an issue connecting my
> N1 to
> > > the debugger via Eclipse.
> >
> > > What exactly is your problem?
> >
> > > On Fri, Jul 23, 2010 at 9:06 AM, Megh  wrote:
> > > > Hi, can anyone recommend the best way to debug Bluetooth
> applications?
> > > > I'm running it on Nexus Ones because Bluetooth isn't supported on the
> > > > emulator but this makes it rather difficult to debug. I'm hoping
> > > > someone knows something about it that I don't! Thanks and much
> > > > appreciated.
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Beginners" group.
> >
> > > > NEW! Try asking and tagging your question on Stack Overflow at
> > > >http://stackoverflow.com/questions/tagged/android
> >
> > > > To unsubscribe from this group, send email to
> > > > android-beginners+unsubscr...@googlegroups.com
> 
> >
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-beginners?hl=en
> >
> > > --
> > > //Nick Richardson
> > > //richardson.n...@gmail.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Trying to delete google account programmatically from my app.

2010-07-29 Thread RichardC
In the file you linked above the class AccountManagerService is marked
as @hide in the java doc - that means it's an internal class.

Also there is no reference to AccountManagerService on the
developer.android.com.

Either of these should indicate to you that what you are trying to do
is unsupported.

On Jul 29, 10:03 pm, Nick Richardson 
wrote:
> Usually a good place to start is to find out what's causing it to crash.
>  Use logcat and look for "caused by" in the exception.
>
> My money's on a NullPointerException.
>
>
>
>
>
>
>
> On Tue, Jul 27, 2010 at 9:24 PM, parul  wrote:
> > Please help me how to delete google accounts from "accounts and sync".
> > I'm trying to call this code in my app:
>
> > AccountManagerService ams = new AccountManagerService(mContext);
> > ams.onServiceChanged(null,true);
>
> > Its crashing at object creation. If anybody is aware of any other way
> > to delete account plz let me know.
>
> > ==
> > onServiceChanged() method is defined in AccountManagerService.java.
> > AccountManagerService.java (frameworks\base\core\java\android
> > \accounts)
>
> > public void onServiceChanged(AuthenticatorDescription desc, boolean
> > removed) {
> >    boolean accountDeleted = false;
> >    SQLiteDatabase db = mOpenHelper.getWritableDatabase();
> >    Cursor cursor = db.query(TABLE_ACCOUNTS,
> >            new String[]{ACCOUNTS_ID, ACCOUNTS_TYPE, ACCOUNTS_NAME},
> >            ACCOUNTS_TYPE + "=?", new String[]{desc.type}, null, null,
> > null);
> >    try {
> >        while (cursor.moveToNext()) {
> >            final long accountId = cursor.getLong(0);
> >            final String accountType = cursor.getString(1);
> >            final String accountName = cursor.getString(2);
> >            Log.d(TAG, "deleting account " + accountName + " because
> > type "
> >                    + accountType + " no longer has a registered
> > authenticator");
> >            db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId,
> > null);
> >            accountDeleted = true;
> >        }
> >    } finally {
> >        cursor.close();
> >        if (accountDeleted) {
> >            sendAccountsChangedBroadcast();
> >        }
> >    }
> > 
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
>
> > NEW! Try asking and tagging your question on Stack Overflow at
> >http://stackoverflow.com/questions/tagged/android
>
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-beginners?hl=en
>
> --
> //Nick Richardson
> //richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Big Gmail client Archive/Delete/Older buttons

2010-07-29 Thread Robert Reid
While I like having quick access to the Archive, Delete, and Older
buttons I feel that they take up too much real estate when in
landscape mode.  I'm wondering if there is any way to make the buttons
'shorter' (taking less vertical space) or to hide them.
Alternatively, it would be nice if they appeared only at the top or
bottom of the message (so that they are contained within the
scrollable portion of the display).

Rob

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Trying to delete google account programmatically from my app.

2010-07-29 Thread Nick Richardson
Usually a good place to start is to find out what's causing it to crash.
 Use logcat and look for "caused by" in the exception.

My money's on a NullPointerException.

On Tue, Jul 27, 2010 at 9:24 PM, parul  wrote:

> Please help me how to delete google accounts from "accounts and sync".
> I'm trying to call this code in my app:
>
> AccountManagerService ams = new AccountManagerService(mContext);
> ams.onServiceChanged(null,true);
>
> Its crashing at object creation. If anybody is aware of any other way
> to delete account plz let me know.
>
> ==
> onServiceChanged() method is defined in AccountManagerService.java.
> AccountManagerService.java (frameworks\base\core\java\android
> \accounts)
>
> public void onServiceChanged(AuthenticatorDescription desc, boolean
> removed) {
>boolean accountDeleted = false;
>SQLiteDatabase db = mOpenHelper.getWritableDatabase();
>Cursor cursor = db.query(TABLE_ACCOUNTS,
>new String[]{ACCOUNTS_ID, ACCOUNTS_TYPE, ACCOUNTS_NAME},
>ACCOUNTS_TYPE + "=?", new String[]{desc.type}, null, null,
> null);
>try {
>while (cursor.moveToNext()) {
>final long accountId = cursor.getLong(0);
>final String accountType = cursor.getString(1);
>final String accountName = cursor.getString(2);
>Log.d(TAG, "deleting account " + accountName + " because
> type "
>+ accountType + " no longer has a registered
> authenticator");
>db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId,
> null);
>accountDeleted = true;
>}
>} finally {
>cursor.close();
>if (accountDeleted) {
>sendAccountsChangedBroadcast();
>}
>}
> 
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Justin Anderson
> Step 4: 
That would be onActivityResult()... taken directly from the link you posted

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Thu, Jul 29, 2010 at 2:53 PM, Nick Richardson
wrote:

> Step 1: Create new activity
> Step 2: Create intent to launch that activity
> Step 3: startActivityForResult()
> Step 4: 
> Step 5: Profit!
>
>
> http://developer.android.com/reference/android/app/Activity.html#StartingActivities
>
>
> On Wed, Jul 28, 2010 at 7:57 PM, cellurl  wrote:
>
>> Can you elaborate a bit please? Intent covers so much material.
>> Thank you very much!
>> Jim
>>
>>
>> On Jul 25, 10:36 am, Paul Turchenko  wrote:
>> > Use intent to pick a picture and start activity for result
>> >
>> > On Jul 24, 10:47 pm, cellurl  wrote:
>> >
>> > > How do I launch some external application to show phone pictures and
>> > > let users pick one?
>> >
>> > > The picture will serve as a background in my app.
>> > > So all in all, I just need their selection. e.g. the path/name once
>> > > they have chosen it.
>> >
>> > > Something simple would be nice ;-)
>> >
>> > > thanks
>> > > jim
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> android-beginners+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>
>
>
> --
> //Nick Richardson
> //richardson.n...@gmail.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: How can my app let people pick a picture that I use as background in my app?

2010-07-29 Thread Nick Richardson
Step 1: Create new activity
Step 2: Create intent to launch that activity
Step 3: startActivityForResult()
Step 4: 
Step 5: Profit!

http://developer.android.com/reference/android/app/Activity.html#StartingActivities


On Wed, Jul 28, 2010 at 7:57 PM, cellurl  wrote:

> Can you elaborate a bit please? Intent covers so much material.
> Thank you very much!
> Jim
>
>
> On Jul 25, 10:36 am, Paul Turchenko  wrote:
> > Use intent to pick a picture and start activity for result
> >
> > On Jul 24, 10:47 pm, cellurl  wrote:
> >
> > > How do I launch some external application to show phone pictures and
> > > let users pick one?
> >
> > > The picture will serve as a background in my app.
> > > So all in all, I just need their selection. e.g. the path/name once
> > > they have chosen it.
> >
> > > Something simple would be nice ;-)
> >
> > > thanks
> > > jim
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
//Nick Richardson
//richardson.n...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: My column '_id' does not exist?

2010-07-29 Thread brucko
Mitch,

you must be querying somewhere to get your cursor. When doing the
query, you must ensure that it includes the "_id" column from the db.
SimpleCursorAdapter will use this to differentiate rows.

Geoff

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Contents of dex

2010-07-29 Thread kypriakos

Good thanks - I was able to use the dedexer last night and it worked
like a champ.
Able to view the complete fs of the classes archive ...

On Jul 28, 5:44 pm, fadden  wrote:
> On Jul 27, 9:03 pm, Mark Murphy  wrote:
>
> > On Tue, Jul 27, 2010 at 11:50 PM, kypriakos  wrote:
> > > is there a way to view what is enclosed (file list) in the dex file?
>
> >http://dedexer.sourceforge.net/
>
> Also "dexdump" (which comes installed on development devices) 
> andhttp://code.google.com/p/smali/.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Directory names

2010-07-29 Thread kypriakos

Thanks Mark - I  know all about the Linux file system behavior - ls vs
ls -a etc. So I guess my question was answered indirectly, the
emulator
File Explorer does not display dotted files and it "emulates" an 'ls'.

On Jul 28, 6:03 pm, Mark Murphy  wrote:
> On Wed, Jul 28, 2010 at 11:39 AM, kypriakos  wrote:
> > I have been experimenting with the file system that the emulator
> > presents and I noticed that although I can create files with 'normal'
> > names (ex. test, src), I don't seem to be able to create dotted
> > names, such as .test, .src. Is there a restriction on dir names
> > (other than the common rules that apply on most OSs)?
>
> You can create them. You can't see them. Directories with leading
> periods are normally suppressed from directory listings. This has been
> standard Linux behavior for a very long time.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] how to self-close an Activity

2010-07-29 Thread TreKing
On Thu, Jul 29, 2010 at 6:39 AM, cellurl  wrote:

> I want to auto-close my "about-window" after 10 seconds
>

Why? Do you not trust the user to do this? What if they're not done with it?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Keeping some data in memory during onDestroy->onCreate

2010-07-29 Thread DanH
1) Display the values on the screen and have the user write them down.

2) Learn how to write to a file.

3) Use a constantly-running server to store them.

On Jul 29, 10:37 am, Bret Foreman  wrote:
> I want to monitor the velocity of a phone. I can do this by looking at
> accelerometer data over the last 30 seconds, saving about one sample
> every 0.1 seconds (300 samples) and applying a sliding filter to the
> data. If I create a service to do this, what's the best way to
> preserve the state of the filter (600 doubles) between an onDestroy
> and a subsequent onCreate? I can set up an SQLite table to hold the
> values but that's a lot of extra coding and processing overhead. Is
> there a better way?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: InstantiationException when starting IntentService

2010-07-29 Thread DanH
InstantiationException occurs when an exception is thrown out of a
constructor.  Generally there should be another exception reported as
causing the InstantiationException, and the stack trace should point
to the specific lines that are in error.  Stack trace is your friend,
and you should be grateful -- their are poor children programming on
Symbian devices who have no stack trace.

On Jul 29, 11:24 am, Wall-E  wrote:
> I am trying to start an IntentService inside my Broadcast Receiver
> ( so inside of onReceive() ):
>
>     public class SmsMessageReceiver extends BroadcastReceiver
>     {
>         .
>         .
>         .
>         public void onReceive(.)
>         {
>              .
>              .
>              .
>              Intent mServiceIntent = new Intent(context,
> SmsParserService.class );
>              mServiceIntent.putExtra("phoneNumber", fromAddress);
>              mServiceIntent.putExtra("smsMessage",
> message.getMessageBody());
>                context.startService(mServiceIntent);
>         }
>
>     }
>
>     So if I change the IntentService class to a regular Service class,
> although it has funny behavior, it still goes into the
> onStartCommand(...) and onCreate() methods, but for the IntentService,
> before going into any of those methods it throws an
> InstantiationException and in the detailMessage it just says
> "com.tvismobile.SmsParserService" which is what my Service is labeled
> as in the Manifest file.
>
> Is there something special you have to do to get IntentService
> started?
>
> Any help is appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Launching an "About" screen from Preferences

2010-07-29 Thread Justin Anderson
Put a '.' in front of the activity name in your manifest...  That should fix
it.

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Thu, Jul 29, 2010 at 9:35 AM, Bret Foreman wrote:

> I have this in preferences.xml:
>
> android:summary="@string/preferences_about_info_summary"
> android:key="AboutInformation">
> android:action="com.shipmate.AboutShipMateActivity" />
>
>
> And this is the manifest:
>
>
>
> android:name="android.intent.category.DEFAULT"/>
>
>
>
> The activity code looks like this:
>
> public class AboutShipMateActivity extends Activity {
>@Override
>protected void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.aboutshipmate);
>}
>
> }
>
> I'm getting an FC with the following logcat message:
>
> E/AndroidRuntime(  376): android.content.ActivityNotFoundException: No
> Activity
> found to handle Intent { act=com.shipmate.AboutShipMateActivity }
>
> Any ideas what's wrong?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] how to self-close an Activity

2010-07-29 Thread Justin Anderson
To auto close after a specified period of time, use a Timer... and then call
finish(), as Mark suggested, when the timer expires.


On Jul 29, 2010 5:44 AM, "Mark Murphy"  wrote:

Call finish():

http://developer.android.com/reference/android/app/Activity.html#finish()


On Thu, Jul 29, 2010 at 7:39 AM, cellurl  wrote:
> I want to auto-close my "ab...
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.9 Available!


-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" g...

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] InstantiationException when starting IntentService

2010-07-29 Thread Wall-E
I am trying to start an IntentService inside my Broadcast Receiver
( so inside of onReceive() ):


public class SmsMessageReceiver extends BroadcastReceiver
{
.
.
.
public void onReceive(.)
{
 .
 .
 .
 Intent mServiceIntent = new Intent(context,
SmsParserService.class );
 mServiceIntent.putExtra("phoneNumber", fromAddress);
 mServiceIntent.putExtra("smsMessage",
message.getMessageBody());
   context.startService(mServiceIntent);
}

}

So if I change the IntentService class to a regular Service class,
although it has funny behavior, it still goes into the
onStartCommand(...) and onCreate() methods, but for the IntentService,
before going into any of those methods it throws an
InstantiationException and in the detailMessage it just says
"com.tvismobile.SmsParserService" which is what my Service is labeled
as in the Manifest file.

Is there something special you have to do to get IntentService
started?

Any help is appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Keeping some data in memory during onDestroy->onCreate

2010-07-29 Thread Bret Foreman
I want to monitor the velocity of a phone. I can do this by looking at
accelerometer data over the last 30 seconds, saving about one sample
every 0.1 seconds (300 samples) and applying a sliding filter to the
data. If I create a service to do this, what's the best way to
preserve the state of the filter (600 doubles) between an onDestroy
and a subsequent onCreate? I can set up an SQLite table to hold the
values but that's a lot of extra coding and processing overhead. Is
there a better way?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Launching an "About" screen from Preferences

2010-07-29 Thread Bret Foreman
I have this in preferences.xml:





And this is the manifest:







The activity code looks like this:

public class AboutShipMateActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aboutshipmate);
}

}

I'm getting an FC with the following logcat message:

E/AndroidRuntime(  376): android.content.ActivityNotFoundException: No
Activity
found to handle Intent { act=com.shipmate.AboutShipMateActivity }

Any ideas what's wrong?

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Map Key

2010-07-29 Thread TreKing
On Wed, Jul 28, 2010 at 11:18 PM, NBS  wrote:

> Now I am using a generated map key on my system to work.
> But I dont know what this value will be if I have to upload to the market.
>

It's whatever you generated for you signing key.

Read this:
http://code.google.com/android/add-ons/google-apis/mapkey.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Map Key

2010-07-29 Thread TreKing
On Wed, Jul 28, 2010 at 11:18 PM, NBS  wrote:

> Now I am using a generated map key on my system to work.
> But I dont know what this value will be if I have to upload to the market.
>

It's whatever you generated for your signing key.

Read this:
http://code.google.com/android/add-ons/google-apis/mapkey.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: OutputStream on assets file

2010-07-29 Thread Bret Foreman
Ah, I see. Cats will be chasing dogs and elected officials will speak
the truth.

Seriously, reading the forums I've seen a lot of people with a similar
issue. They have a bunch of application data that eventually needs to
live in the SQLite database. Google should create an Eclipse plug-in
that allows a user to upload a SQLite table to Google's backup service
and then restore it to a device during application installation.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Re: SQLiteConstraintException: error code 19: constraint failed when deleting from sqlite

2010-07-29 Thread Martin Obreshkov
I don't think this is the case. When i try to delete album that contains
songs i got
java.sql.SQLException: album has songs cannot be deleted
at org.sqlite.DB.execute(DB.java:275)
at org.sqlite.DB.executeUpdate(DB.java:281)
at org.sqlite.PrepStmt.executeUpdate(PrepStmt.java:77)

On Thu, Jul 29, 2010 at 3:16 PM, DanH  wrote:

> SELECT RAISE(FAIL,'album has songs cannot be deleted')");
>
> On Jul 29, 5:43 am, manigault  wrote:
> > Hi all, i have simple relation between songs and albums one to many.
> > I created the album table like this
> > CREATE TABLE albums
> > (id INTEGER PRIMARY KEY ASC,
> > name TEXT,
> > additional TEXT)
> >
> > My song table is like this
> > StringBuilder sqlQuery = new StringBuilder();
> > CREATE TABLE songs
> > (id INTEGER PRIMARY KEY ASC,
> > album_fk INTEGER NOT NULL,
> > title TEXT,
> > url TEXT,
> > duration BIGINT NOT NULL)
> >
> > and i have trigger to check when i wan't to delete an album if there
> > are songs in it
> > CREATE TRIGGER trigger_on_delete
> > BEFORE DELETE ON albums
> > FOR EACH ROW BEGIN
> > SELECT RAISE(FAIL,'album has songs cannot be deleted')");
> > WHERE (SELECT album_fk FROM songs WHERE album_fk = OLD.id) IN NOT
> > NULL;)
> > END
> >
> > and everything is ok and its working fine. But sometimes i got this
> > error
> > Exception: android.database.sqlite.SQLiteConstraintException: error
> > code 19: constraint failed
> > Stack Trace :
> > android.database.sqlite.SQLiteStatement.native_execute(Native Method)
> > android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:
> > 66)
> > when i am trying to delete an album. I know what #define
> > SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */ stands
> > for but i can't what constraints can be violated when deleting an
> > album.
> > I can't reproduce this so i can't debug it to find out what's the
> > problem any ideas what could go wrong and cause such error. I've tried
> > playing with string encoding but i think that's not the problem.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
When I raise my flashing sword, and my hand takes hold on judgment, I will
take vengeance upon mine enemies, and I will repay those who haze me. Oh,
Lord, raise me to Thy right hand and count me among Thy saints.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: SQLiteConstraintException: error code 19: constraint failed when deleting from sqlite

2010-07-29 Thread DanH
SELECT RAISE(FAIL,'album has songs cannot be deleted')");

On Jul 29, 5:43 am, manigault  wrote:
> Hi all, i have simple relation between songs and albums one to many.
> I created the album table like this
> CREATE TABLE albums
> (id INTEGER PRIMARY KEY ASC,
> name TEXT,
> additional TEXT)
>
> My song table is like this
> StringBuilder sqlQuery = new StringBuilder();
> CREATE TABLE songs
> (id INTEGER PRIMARY KEY ASC,
> album_fk INTEGER NOT NULL,
> title TEXT,
> url TEXT,
> duration BIGINT NOT NULL)
>
> and i have trigger to check when i wan't to delete an album if there
> are songs in it
> CREATE TRIGGER trigger_on_delete
> BEFORE DELETE ON albums
> FOR EACH ROW BEGIN
> SELECT RAISE(FAIL,'album has songs cannot be deleted')");
> WHERE (SELECT album_fk FROM songs WHERE album_fk = OLD.id) IN NOT
> NULL;)
> END
>
> and everything is ok and its working fine. But sometimes i got this
> error
> Exception: android.database.sqlite.SQLiteConstraintException: error
> code 19: constraint failed
> Stack Trace :
> android.database.sqlite.SQLiteStatement.native_execute(Native Method)
> android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:
> 66)
> when i am trying to delete an album. I know what #define
> SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */ stands
> for but i can't what constraints can be violated when deleting an
> album.
> I can't reproduce this so i can't debug it to find out what's the
> problem any ideas what could go wrong and cause such error. I've tried
> playing with string encoding but i think that's not the problem.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] how to self-close an Activity

2010-07-29 Thread Mark Murphy
Call finish():

http://developer.android.com/reference/android/app/Activity.html#finish()

On Thu, Jul 29, 2010 at 7:39 AM, cellurl  wrote:
> I want to auto-close my "about-window" after 10 seconds, but don't
> have a clue how to do it
> Any help appreciated.
> -jp
>
>
> -Translate.java---
> public class Translate extends Activity implements OnClickListener {
>   public void onClick(View v) {
>      switch (v.getId()) {
>         case R.id.about_button1:
>            Intent i1 = new Intent(this, About1.class);
>            startActivity(i1);
>            break;
> ...
>
> --About1.java---
>
> public class About1 extends Activity {
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.submitting);
> ...
> ---
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] how to self-close an Activity

2010-07-29 Thread cellurl
I want to auto-close my "about-window" after 10 seconds, but don't
have a clue how to do it
Any help appreciated.
-jp


-Translate.java---
public class Translate extends Activity implements OnClickListener {
   public void onClick(View v) {
  switch (v.getId()) {
 case R.id.about_button1:
Intent i1 = new Intent(this, About1.class);
startActivity(i1);
break;
...

--About1.java---

public class About1 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.submitting);
...
---




-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] SQLiteConstraintException: error code 19: constraint failed when deleting from sqlite

2010-07-29 Thread manigault
Hi all, i have simple relation between songs and albums one to many.
I created the album table like this
CREATE TABLE albums
(id INTEGER PRIMARY KEY ASC,
name TEXT,
additional TEXT)

My song table is like this
StringBuilder sqlQuery = new StringBuilder();
CREATE TABLE songs
(id INTEGER PRIMARY KEY ASC,
album_fk INTEGER NOT NULL,
title TEXT,
url TEXT,
duration BIGINT NOT NULL)

and i have trigger to check when i wan't to delete an album if there
are songs in it
CREATE TRIGGER trigger_on_delete
BEFORE DELETE ON albums
FOR EACH ROW BEGIN
SELECT RAISE(FAIL,'album has songs cannot be deleted')");
WHERE (SELECT album_fk FROM songs WHERE album_fk = OLD.id) IN NOT
NULL;)
END

and everything is ok and its working fine. But sometimes i got this
error
Exception: android.database.sqlite.SQLiteConstraintException: error
code 19: constraint failed
Stack Trace :
android.database.sqlite.SQLiteStatement.native_execute(Native Method)
android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:
66)
when i am trying to delete an album. I know what #define
SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */ stands
for but i can't what constraints can be violated when deleting an
album.
I can't reproduce this so i can't debug it to find out what's the
problem any ideas what could go wrong and cause such error. I've tried
playing with string encoding but i think that's not the problem.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en