[android-beginners] Re: Files reading

2008-09-11 Thread patelpower

hello mark,

thanks for the help now its working fine
thank you once again

regards
rakesh

On Sep 10, 5:47 pm, "Payal Amin" <[EMAIL PROTECTED]> wrote:
> you can try this
>
> FileContains = new File(PathName);
> File[] Filenames = FileContains.listFiles(
>                                                new FilenameFilter() {
>
> public boolean accept(File FileContains, String name) {
>
> return name.endsWith(".mp3") || name.endsWith(".MP3");
>
> }
> });
>
> Payal
>
> Hi mark,
>
>  thanks, but i am trying that java.io.file but its giving whatever
> files in the SDcard whether it could be .txt etc. but i need only mp3
> files list so if u have any idea than let ne know..
>
> my code is loke this
>
>        private File FileContains;
>
>        FileContains = new File(PathName);
>        if(FileContains.isDirectory()){
>        Filenames = FileContains.listFiles();
>        NoOfFiles = Array.getLength(Filenames);
>        }
>
> so from the above code it will give all the files list but i need only
> mp3 files so if u have any idea then let me know
>
> Thanks
> Rakesh
>
>
>
>
>
> > On Sep 10, 5:20 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> > > patelpower wrote:
> > > > Hello everyone,
>
> > > >  i want to read the mp3 files only from the sdcard so is there any API
> > > > so it could read only mp3 files and give the list of the files indise
> > > > the SDcard
>
> > > Look in the java.io package. You probably want File#listFiles(), perhaps
> > > one of the flavors that takes a filter parameter.
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > _The Busy Coder's Guide to Android Development_ Version 1.2 Published!- 
> > > Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: No repository found at https://dl-ssl.google.com/android/eclipse/

2008-09-11 Thread Mark

Okay, we struggled with this problem forever, the solution is:

You need to install Sun Java 6 (this is needed both to use the HTTPS
and to use the keystore, even if you are installing from HTTP or from
local file)

Follow the instructions here and make sure you also select the correct
Java version to use (as it states in the article)
https://help.ubuntu.com/community/Java

On Aug 28, 5:29 am, Filipe Abrantes <[EMAIL PROTECTED]> wrote:
> Hi Ralf,
>
> thanks for the reply!
>
> I did try that as well, but in the end (of the eclipse installation
> process) it complains it cannot connect to the keystore and fails:
>
> An error occurred during provisioning.
>   Cannot connect to keystore.
>   JKS
>
> Cheers,
> FilipeRalf wrote:
> > If you can't accesshttps://dl-ssl.google.com/android/eclipse/simply
> > try to use http:// instead of https://.
>
> > R/
>
> > On Tue, Aug 26, 2008 at 8:35 AM, Gies,Brad <[EMAIL PROTECTED]> wrote:
>
> >> I'm also had the same problem a couple of times (I installed Android on 2
> >> work machines and 2 home machines). In both of the cases where it didn't
> >> work properly the first time, trying again a couple of minutes later 
> >> worked.
> >> Maybe the repository is just very busy??
>
> >> Sincerely,
>
> >> Brad Gies
> >> -
> >> NLM Software
> >> Southfield, MI, USA
> >> -
>
> >> If you get today's work done today, but do it in a way that you can't
> >> possibly get tomorrow's work done tomorrow, then you lose.
>
> >> 
>
> >> From: android-beginners@googlegroups.com
> >> [mailto:[EMAIL PROTECTED] On Behalf Of ???
> >> Sent: Tuesday, August 26, 2008 10:58 AM
> >> To: android-beginners@googlegroups.com
> >> Subject: [android-beginners] Re: No repository found at
> >>https://dl-ssl.google.com/android/eclipse/
>
> >> if you can send the picture about what you discrible,I think I need it
>
> >> This e-mail or communication, including any attachments, is intended only
> >> for the person or entity to which it is addressed and may contain
> >> confidential and/or legally privileged material. Any review,retransmission,
> >> dissemination or other use of, or taking of any action in reliance upon,
> >> this information by persons or entities other than the intended recipient 
> >> is
> >> prohibited. If you received this message in error, please contact the 
> >> sender
> >> immediately and permanently delete all copies, electronic or other, you may
> >> have or from your computer. Any disclosure, copying, distribution, reliance
> >> or use of the contents or information received in error is strictly
> >> prohibited. The foregoing applies even if this notice is imbedded in a
> >> message that is forwarded or attached.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Trying to move from one Activity to a MapActivity -- and failing

2008-09-11 Thread [EMAIL PROTECTED]

Great!  That works -- thanks.
By way of understanding, is there a descriptor (like Quester.)
that should work for some  ??

--Ken

On Sep 11, 5:03 pm, "Mark Murphy" <[EMAIL PROTECTED]> wrote:
> > b) Pressing the button on the welcome screen /tries/ to invoke an
> > Intent to start the quester activity
> > but it throws an ActivityNotFoundException (details below); here's the
> > Intent code:
>
> >    private void checkLogin(QLogin loginActivity, String userId, String
> > passwd)
> >     {       // right now a stub always returning true:
> >         boolean authOk = authenticateUser(userId, passwd);
> >         if (!authOk){
> >                 Toast.makeText(this, "Unknown userid/password combo",
> > Toast.LENGTH_SHORT).show();
> >         } else {
> >                 Toast.makeText(this, "Trying to move to Quester Map",
> > Toast.LENGTH_SHORT).show();
> >                 Intent questerMapIntent = new Intent(".Quester.VIEW");
> >                 startActivity(questerMapIntent);
> >         }
> >     }
>
> Try the class variant of the Intent constructor, since this is all in one
> application:
>
> Intent questerMapIntent=new Intent(this, Quester.class);
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.2 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Trying to move from one Activity to a MapActivity -- and failing

2008-09-11 Thread Mark Murphy


>
> b) Pressing the button on the welcome screen /tries/ to invoke an
> Intent to start the quester activity
> but it throws an ActivityNotFoundException (details below); here's the
> Intent code:
>
>private void checkLogin(QLogin loginActivity, String userId, String
> passwd)
> {   // right now a stub always returning true:
> boolean authOk = authenticateUser(userId, passwd);
> if (!authOk){
> Toast.makeText(this, "Unknown userid/password combo",
> Toast.LENGTH_SHORT).show();
> } else {
> Toast.makeText(this, "Trying to move to Quester Map",
> Toast.LENGTH_SHORT).show();
> Intent questerMapIntent = new Intent(".Quester.VIEW");
> startActivity(questerMapIntent);
> }
> }

Try the class variant of the Intent constructor, since this is all in one
application:

Intent questerMapIntent=new Intent(this, Quester.class);

--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.2 Published!



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Trying to move from one Activity to a MapActivity -- and failing

2008-09-11 Thread [EMAIL PROTECTED]

Hi all,

I'm trying to create a simple example with 2 activities:
1.  A simple Welcome (the MAIN):  A simple welcome screen with a
button.
2.  A MapActivity (class=Quester) which simply displays a map.

a) The MapActivity (Quester) works by itself when the manifest gives
it the MAIN, like this





 

b) Pressing the button on the welcome screen /tries/ to invoke an
Intent to start the quester activity
but it throws an ActivityNotFoundException (details below); here's the
Intent code:

   private void checkLogin(QLogin loginActivity, String userId, String
passwd)
{   // right now a stub always returning true:
boolean authOk = authenticateUser(userId, passwd);
if (!authOk){
Toast.makeText(this, "Unknown userid/password combo",
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Trying to move to Quester Map",
Toast.LENGTH_SHORT).show();
Intent questerMapIntent = new Intent(".Quester.VIEW");
startActivity(questerMapIntent);
}
}
c) The complete manifest is:


http://schemas.android.com/apk/res/android";
package="com.herenow.android.quester">

















d)  The error output in LogCat is the following:

.getting started
09-11 20:39:50.307: INFO/jdwp(1377): received file descriptor 13 from
ADB
09-11 20:39:50.646: INFO/ActivityManager(47): Displayed activity
com.herenow.android.quester/.QLogin: 631 ms
09-11 20:39:55.736: DEBUG/dalvikvm(116): GC freed 3 objects / 72 bytes
in 69ms
09-11 20:39:55.746: DEBUG/dalvikvm(91): GC freed 880 objects / 43376
bytes in 61ms
09-11 20:39:56.666: INFO/NotificationService(47): enqueueToast
pkg=com.herenow.android.quester
[EMAIL PROTECTED]
duration=0
09-11 20:39:56.676: INFO/ActivityManager(47): Starting activity:
Intent { action=.Quester.VIEW }
09-11 20:39:56.687: DEBUG/AndroidRuntime(1377): Shutting down VM
09-11 20:39:56.687: WARN/dalvikvm(1377): threadid=3: thread exiting
with uncaught exception (group=0x40010e28)
09-11 20:39:56.696: ERROR/AndroidRuntime(1377): Uncaught handler:
thread main exiting due to uncaught exception
09-11 20:39:56.706: ERROR/AndroidRuntime(1377):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=.Quester.VIEW }
09-11 20:39:56.706: ERROR/AndroidRuntime(1377): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
1469)
09-11 20:39:56.706: ERROR/AndroidRuntime(1377): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1439)
09-11 20:39:56.706: ERROR/AndroidRuntime(1377): at
android.app.Activity.startActivityForResult(Activity.java:2527)
09-11 20:39:56.706: ERROR/AndroidRuntime(1377): at
android.app.Activity.startActivity(Activity.java:2571)

I've tried the following versions for the Intent descriptor (keeping
them coordinated in the code and the manifest):
Quester.VIEW
.Quester.VIEW
com.herenow.android.quester.Quester.VIEW
and
.Quester.VIEW in manifest and Quester.VIEW in code   .

So I'm missing one or more points here.
Can anyone help me out?
Many thanks in advance,
Ken


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: What's the replacement for showAlert() in Android 0.9

2008-09-11 Thread Megha Joshi
You can use AlertDialog:
See sample code below:
http://code.google.com/android/samples/ApiDemos/src/com/android/samples/app/AlertDialogSamples.html

If you don't want dialogs with buttons you can use Toast.makeText() instead.
http://code.google.com/android/reference/android/widget/Toast.html

2008/9/11 KH <[EMAIL PROTECTED]>

>
> This method is availabale in M5 but has been dropped in Android 0.9 --
>
> showAlert(CharSequence,int,CharSequence,CharSequence,boolean)
>
> I like to know the new equivalent in Android 0.9
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Getting Started

2008-09-11 Thread Megha Joshi
Core Java programming knowledge is enough to start learning Android. You can
start with reading the "Getting Started" section at:
http://code.google.com/android/documentation.html

Feel free to ask any questions .

2008/9/11 Zeeshan Ahmad <[EMAIL PROTECTED]>

>
> Hello everyone...
>
> I want to get started with android but am confused where to begin
> with. I suppose this is a group for beginners but reading the posts I
> get the impression as though everyone out here is pretty familiar with
> android.
>
> So where do I get started from.
> I am familiar with core JAVA programming. Is it necessary that I gain
> proficiency in JAVA before making it out with Android??
>
> Hoping to here from you people soon
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Getting Started

2008-09-11 Thread Zeeshan Ahmad

Hello everyone...

I want to get started with android but am confused where to begin
with. I suppose this is a group for beginners but reading the posts I
get the impression as though everyone out here is pretty familiar with
android.

So where do I get started from.
I am familiar with core JAVA programming. Is it necessary that I gain
proficiency in JAVA before making it out with Android??

Hoping to here from you people soon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: eclipse project opening problem

2008-09-11 Thread Mark Murphy

> Ignore my request. I didn't realize it would take so long for the emulator
> to boot up. How do you get any work done with such a long boot?

The first boot takes a while as it clones various disk images for your
use. You'll get the same slow boot when you use -wipe-data to nuke the
emulator's contents. Otherwise, though, the emulator starts up in
reasonable time.

--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.2 Published!



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: eclipse project opening problem

2008-09-11 Thread Rich Tretola
Ignore my request. I didn't realize it would take so long for the emulator
to boot up. How do you get any work done with such a long boot?
Rich

On Thu, Sep 11, 2008 at 12:40 PM, Jeff <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I am having a project opening problem.  I have tried all of the
> suggestion on opening a project, none have worked.
> I set a new workspace.  Built a project, ran the emulator but open/
> close project dropdowns are still disabled.  I can see the .project
> file.  I have tried importing samples but no luck.  Any Ideas?
>
> thanks,
> Jeff
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] eclipse project opening problem

2008-09-11 Thread Jeff

Hello,

I am having a project opening problem.  I have tried all of the
suggestion on opening a project, none have worked.
I set a new workspace.  Built a project, ran the emulator but open/
close project dropdowns are still disabled.  I can see the .project
file.  I have tried importing samples but no luck.  Any Ideas?

thanks,
Jeff

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: No repository found at https://dl-ssl.google.com/android/eclipse/

2008-09-11 Thread AndreAgosto

i have the same problem now.
Your problem was temporary?
How did you resolve it?

On 1 Set, 11:54, Filipe Abrantes <[EMAIL PROTECTED]> wrote:
> I have just rebooted but the problem persists,
>
> No repository found athttps://dl-ssl.google.com/android/eclipse/site.xml
>   Error reading update sitehttps://dl-ssl.google.com/android/eclipse/site.xml.
>   HANDSHAKE_FAILURE: locally generated; FATAL
>
> Anything has a clue on what this means?
>
> Cheers,
> FilipeAramor wrote:
> > I tried all of these options about 100 times.
> > Restarting fixed the issue.
>
> > On Aug 29, 6:54 pm, Filipe Abrantes <[EMAIL PROTECTED]> wrote:
>
> >> has anyone had success with this problem...
>
> >> I am getting this error repeatedly even if I try installing through
> >> http:// or .zip file locally:
>
> >> An error occurred during provisioning.
> >> Cannot connect to keystore.
> >> JKS
>
> >> Cheers,
> >> Filipe
>
> >> Gies,Brad wrote:
>
> >>> I’m also had the same problem a couple of times (I installed Android
> >>> on 2 work machines and 2 home machines). In both of the cases where it
> >>> didn’t work properly the first time, trying again a couple of minutes
> >>> later worked. Maybe the repository is just very busy??
>
> >>> Sincerely,
>
> >>> Brad Gies
> >>> -
> >>> NLM Software
> >>> Southfield, MI, USA
> >>> -
>
> >>> If you get today's work done today, but do it in a way that you can't
> >>> possibly get tomorrow's work done tomorrow, then you lose.
>
> >>> 
>
> >>> *From:* android-beginners@googlegroups.com
> >>> [mailto:[EMAIL PROTECTED] *On Behalf Of *???
> >>> *Sent:* Tuesday, August 26, 2008 10:58 AM
> >>> *To:* android-beginners@googlegroups.com
> >>> *Subject:* [android-beginners] Re: No repository found at
> >>>https://dl-ssl.google.com/android/eclipse/
>
> >>> if you can send the picture about what you discrible,I think I need it
>
> >>> This e-mail or communication, including any attachments, is intended
> >>> only for the person or entity to which it is addressed and may contain
> >>> confidential and/or legally privileged material. Any
> >>> review,retransmission, dissemination or other use of, or taking of any
> >>> action in reliance upon, this information by persons or entities other
> >>> than the intended recipient is prohibited. If you received this
> >>> message in error, please contact the sender immediately and
> >>> permanently delete all copies, electronic or other, you may have or
> >>> from your computer. Any disclosure, copying, distribution, reliance or
> >>> use of the contents or information received in error is strictly
> >>> prohibited. The foregoing applies even if this notice is imbedded in a
> >>> message that is forwarded or attached.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] What's the replacement for showAlert() in Android 0.9

2008-09-11 Thread KH

This method is availabale in M5 but has been dropped in Android 0.9 --

showAlert(CharSequence,int,CharSequence,CharSequence,boolean)

I like to know the new equivalent in Android 0.9

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Porting J2ME applications

2008-09-11 Thread Dana Li
Hi Katsumi,

It's a very good question.

We developed this platform to allow tons of J2ME applications running on
Android without code change.

This application is not from SUN, it's from Netmite.

We are looking for partners and help them to promote their J2ME applications
to Android.

Please feel free to email me what we could do for you.

Dana

On Wed, Sep 10, 2008 at 5:56 PM,  <[EMAIL PROTECTED]>wrote:

>
> Hi Dana,
>
> Can we use it without any lisence free?
> or need some lisence with SUN or anyone?
>
> Regards,
> Katsumi
>
> Dana Li wrote:
> > Hi Kartik,
> >
> > It's a great question. We have developed an application to allow you run
> > J2ME applications on Android without code change.
> >
> > Please download the new version of Android J2ME MIDP RUNNER based on the
> new
> > Android SDK 0.9.
> >
> > http://www.netmite.com/android
> >
> >
> > Please let me know if you have more questions.
> >
> > Thanks
> > Dana
> >
> >
> >
> > On 9/10/08, Kartik Bansal <[EMAIL PROTECTED]> wrote:
> >>
> >> i have some applications built on j2me. how do i port it to android.
> >>
> >
> >
>
>
> >
>


-- 
Dana

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---