-
Notifications
You must be signed in to change notification settings - Fork 0
/
timerMod.bas
66 lines (50 loc) · 1.59 KB
/
timerMod.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Service
Version=6.3
@EndOfDesignText@
#Region Service Attributes
#StartAtBoot: True
#End Region
Sub Process_Globals
Dim no As Notification
End Sub
Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
StartServiceAt("timerMod", DateTime.Now+(60*1000), True) 'دستور تکرار سرویس
If File.Exists(library.dir,"start") Then
If File.ReadString(library.dir,"start") = 1 Then
chk
End If
End If
End Sub
Sub Service_Destroy
End Sub
Sub chk
Dim timeNow,time As String
Dim mt As KJ_MaterialToast
timeNow = (DateTime.GetHour(DateTime.Now)*60)+DateTime.GetMinute(DateTime.Now)
time=File.ReadString(library.dir,"time")
If File.ReadString(library.dir,"start") = 1 Then
If timeNow=time Then
'aaa
no.Initialize
no.Icon="icon"
no.Sound=True
no.OnGoingEvent=False 'کاربر بتونه کنسلش کنه
no.AutoCancel=True
no.Vibrate=True
no.Light=False
no.SetInfo(" دعای خیر ماها بدرقه رزمنده ها" ," رزمنده ها منتظر دعای خیر شما هستن ... ",doa)
no.Notify(1)
Else If timeNow="780" Then
mt.Initialize("یادمون نره برا رزمنده های اسلام دعا کنیم",mt.LENGTH_LONG,mt.TYPE_INFO)
Else If timeNow="1080" Then
mt.Initialize("شادی روح شهدای مدافع حرم صلوات",mt.LENGTH_LONG,mt.TYPE_INFO)
Else If timeNow="600" Then
mt.Initialize("یادمون نره برا رزمنده های اسلام دعا کنیم",mt.LENGTH_LONG,mt.TYPE_INFO)
End If
End If
End Sub