[android-developers] Re: Notification sound from file inside the app package ?

2010-01-22 Thread Retrodis
You should store your mp3 in res/raw and a quick and easy way to
reference it would be

notification.sound = Uri.parse("android.resource://
com.yourpackagename.appname/" +R.raw.your_sound_file);


On Jan 22, 3:01 pm, elpix1  wrote:
> Hi,
>
> Is it possible to play a notification sound from a sound file
> inside the application package ?
>
> Where should this file be stored in the apk  (/res/raw or /assets)
> and what should be the URI to pass to the notification ?
>
> notification.sound = Uri.parse(... ? ...);
>
> Best regards.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Pass event to parent view?

2010-01-26 Thread Retrodis
You can add the onClickListener to the parent layout

On Jan 26, 12:34 am, kknight  wrote:
> I have a layout which contains five TextView. When user clicks any of
> the five TextView, it will do the same thing: open another activity.
> So, the OnClickerListener behavior to the five TextView is the same.
> Is it possible that I only add OnClickListerner to one view, e.g. to
> layout, so I don't have to add OnClickListerner to each of the five
> TextView? Put it another way, if none of the children components
> receives CLICK event, will the CLICK event passed through to their
> parent, the layout?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Internet Connection

2010-01-28 Thread Retrodis
ConnectivityManager cm = (ConnectivityManager) this.getSystemService
(Context.CONNECTIVITY_SERVICE);
NetworkInfo ni = cm.getActiveNetworkInfo();
if(ni != null) {

}

On Jan 28, 9:46 am, "Sasikumar.S"  wrote:
> Thank u for ur reply.
>
> On Thu, Jan 28, 2010 at 3:15 PM, Chander Pechetty wrote:
>
>
>
>
>
> > use ConnectivityManager and probably add the permission -
> > ACCESS_NETWORK_STATE to manifest file
>
> > On Jan 28, 12:31 pm, "Sasikumar.S"  wrote:
> > > Thank You for ur reply Jian,
>
> > > I will check it and tell to you.
>
> > > On Thu, Jan 28, 2010 at 12:55 PM, Jian Chen 
> > wrote:
> > > > ah, then let us come to the question how to check internet connection
> > is
> > > > not enabled or not.
> > > > Hope that below code will help.
> > > > @Override
> > > > public void onStart() {
> > > >     super.onStart();
> > > >     ConnectivityManager cMgr = (ConnectivityManager)
> > > > this.getSystemService(Context.CONNECTIVITY_SERVICE); #1
> > > >     NetworkInfo netInfo = cMgr.getActiveNetworkInfo(); #2
> > > >     this.status.setText(netInfo.toString());
> > > > }
>
> > > > ConnectivityManager can help u know current network status.
>
> > > > 在 2010年1月28日 下午3:16,Sasikumar.S 写道:
>
> > > > Hi alligator,
>
> > > >> Thank u for ur reply.
>
> > > >> I know how to create a alert dialog..
> > > >> I need how to check whether internet connection is enabled or not?..
>
> > > >> 2010/1/28 alligator 
>
> > > >>> I think an alertdiaglog can do it.
>
> > > >>>        Dialog dialog=new AlertDialog.Builder(this)
> > > >>>        .setTitle("about")
> > > >>>        .setMessage("author:ddd\n")
> > > >>>        .setPositiveButton("OK", new DialogInterface.OnClickListener()
> > > >>> {
> > > >>>                public void onClick(DialogInterface dialog, int
> > > >>> whichButton){
> > > >>>                        return;
> > > >>>                }
> > > >>>        })
> > > >>>        .create();
> > > >>>        dialog.show();
>
> > > >>> On 1月28日, 下午1时40分, "Sasikumar.S"  wrote:
> > > >>> > Hi,
>
> > > >>> > How to find whether internet connection is working or not in
> > android
> > > >>> > emulator?...
>
> > > >>> > I'm doing one RSS Program.
> > > >>> > When internet connection is not enable the RSS feed is not fetching
> > the
> > > >>> data
> > > >>> > and it is showing error.
> > > >>> > So if internet connection is not enable i need to display a alert
> > that
> > > >>> > "Internet Connection Not Enabled"
>
> > > >>> > How to do this?...
>
> > > >>> > --
> > > >>> > Thanks & Regards
> > > >>> > Sasikumar.S
>
> > > >>> --
> > > >>> You received this message because you are subscribed to the Google
> > > >>> Groups "Android Developers" group.
> > > >>> To post to this group, send email to
> > android-developers@googlegroups.com
> > > >>> To unsubscribe from this group, send email to
> > > >>> android-developers+unsubscr...@googlegroups.com > > >>>  cr...@googlegroups.com>
> >  > nsubscr...@googlegroups.com>
>
> > > >>> For more options, visit this group at
> > > >>>http://groups.google.com/group/android-developers?hl=en
>
> > > >> --
> > > >> Thanks & Regards
> > > >>  Sasikumar.S
>
> > > --
> > > Thanks & Regards
> > > Sasikumar.S
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Thanks & Regards
> Sasikumar.S

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Help about Alarm Clock

2010-02-02 Thread Retrodis
I don't think you can access the phones default alarms in the Alarms
app but you could build your own with AlarmManager

http://d.android.com/reference/android/app/AlarmManager.html

That should help

On Feb 2, 8:09 am, Ali Murtaza  wrote:
> Hi
>
> I want to make an application in which i want to set the alarm, so that my
> application set the alarm directly...
>
> for example
>
> I am creating a reminder applicatioin in which i want to set the alarm on a
> specific time and specific date...
>
> please help me to tell me the class use in this case.
>
> thanks
>
> --
> Ali Murtaza
>
> BCSF06M021
> Research Assistant
> Data Virtulization Ware House
> PUCIT, Lahore, Pakistan
> ali.murt...@pucit.edu.pk

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en