cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Velecký (JIRA) <>
Subject [jira] [Created] (CB-2603) Toast notification API for Android
Date Sun, 03 Mar 2013 20:41:13 GMT
Jan Velecký created CB-2603:

             Summary: Toast notification API for Android
                 Key: CB-2603
             Project: Apache Cordova
          Issue Type: Wish
          Components: Android
            Reporter: Jan Velecký
            Assignee: Joe Bowser
            Priority: Minor

This is not hard change in cordova sources i think. I use this primitive class with addJavascriptInterface:
    public class MyToaster {
        private DroidGap mGap;
        private Toast toastik;

        public MyToaster(DroidGap gap) {
                mGap = gap;

	public void show(String message, boolean lng) {
        	(toastik = Toast.makeText(mGap, message, lng ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT)).setGravity(Gravity.CENTER,
0, 0);
So i can use long i short during toast notifications. In results, user have more native UI
feel on Android and on the other hand – it's very practise for text notifications of information

With this, PhoneGap will be again better. :-)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message