This repository was archived by the owner on Sep 15, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,71 @@ angular.module('ngCordova.plugins.dialogs', [])
5959
6060 beep : function ( times ) {
6161 return navigator . notification . beep ( times ) ;
62+ } ,
63+
64+ activityStart : function ( message , title ) {
65+ var q = $q . defer ( ) ;
66+
67+ if ( cordova . platformId === 'android' ) {
68+ navigator . notification . activityStart ( title , message ) ;
69+ q . resolve ( ) ;
70+ } else {
71+ q . reject ( message , title ) ;
72+ }
73+
74+ return q . promise ;
75+ } ,
76+
77+ activityStop : function ( ) {
78+ var q = $q . defer ( ) ;
79+
80+ if ( cordova . platformId === 'android' ) {
81+ navigator . notification . activityStop ( ) ;
82+ q . resolve ( ) ;
83+ } else {
84+ q . reject ( ) ;
85+ }
86+
87+ return q . promise ;
88+ } ,
89+
90+ progressStart : function ( message , title ) {
91+ var q = $q . defer ( ) ;
92+
93+ if ( cordova . platformId === 'android' ) {
94+ navigator . notification . progressStart ( title , message ) ;
95+ q . resolve ( ) ;
96+ } else {
97+ q . reject ( message , title ) ;
98+ }
99+
100+ return q . promise ;
101+ } ,
102+
103+ progressStop : function ( ) {
104+ var q = $q . defer ( ) ;
105+
106+ if ( cordova . platformId === 'android' ) {
107+ navigator . notification . progressStop ( ) ;
108+ q . resolve ( ) ;
109+ } else {
110+ q . reject ( ) ;
111+ }
112+
113+ return q . promise ;
114+ } ,
115+
116+ progressValue : function ( value ) {
117+ var q = $q . defer ( ) ;
118+
119+ if ( cordova . platformId === 'android' ) {
120+ navigator . notification . progressValue ( value ) ;
121+ q . resolve ( ) ;
122+ } else {
123+ q . reject ( value ) ;
124+ }
125+
126+ return q . promise ;
62127 }
63128 } ;
64129 } ] ) ;
You can’t perform that action at this time.
0 commit comments