http://stackoverflow.com/questions/2905542/is-there-a-way-to-add-a-badge-to-an-application-icon-in-android
Dim cv As ContentValues
cv.Initialize
cv.PutString("package", "com.app.my")
cv.PutString("class", "com.app.my.Main")
cv.PutInteger("badgecount", 8)
Dim u As Uri
u.Parse("content://com.sec.badge/apps")
cr.Insert(u, cv)
Hey Erel, is this a OS restriction? Do you have any suggestions to implement that feature? Seams that Motorola devices also has the same behaviour, Facebook, WhatsApp, and many others do that.There isn't such a feature in other devices.
Not me. But honestly; i did not triedDid somebody got it to run?
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim badge As ShortcutBadger
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
badge.Initialize()
badge.applyCount(17) ' Note this cound to find the icon in the Screenshow
End Sub
Sub Process_Globals
Dim SQL1 As SQL
End Sub
Sub Globals
Dim MyFolder As String = "test"
Dim DBFileName As String = "test.db"
Dim DBFilePath As String
Dim txt As String
Dim DBTableName As String ="tblOriginal"
Dim badger As ShortcutBadger
End Sub
Sub Activity_Create(FirstTime As Boolean)
badger.Initialize
If File.ExternalWritable Then
DBFilePath = File.DirRootExternal & "/" & MyFolder
Else
DBFilePath = File.DirInternal & "/" & MyFolder
End If
File.MakeDir(DBFilePath,"")
If SQL1.IsInitialized =False Then
SQL1.Initialize(DBFilePath,DBFileName,True)
End If
txt="DROP TABLE IF EXISTS " & DBTableName
SQL1.ExecNonQuery(txt)
txt="CREATE TABLE IF NOT EXISTS " & DBTableName & " (ID INTEGER PRIMARY KEY,COUNTRY TEXT, POPULATION TEXT)"
SQL1.ExecNonQuery(txt)
txt="INSERT INTO " & DBTableName & " VALUES(?,?,?)"
SQL1.ExecNonQuery2(txt, Array As Object(Null,"CHINA","1330044000"))
txt="INSERT INTO " & DBTableName & " VALUES(?,?,?)"
SQL1.ExecNonQuery2(txt, Array As Object(Null,"INDIA","1173108018"))
txt="INSERT INTO " & DBTableName & " VALUES(?,?,?)"
SQL1.ExecNonQuery2(txt, Array As Object(Null,"USA","310232863"))
txt="INSERT INTO " & DBTableName & " VALUES(?,?,?), (?,?,?), (?,?,?)"
SQL1.ExecNonQuery2(txt, Array As Object(Null,"BELGIUM","10403000", _
Null,"BOLIVIA","9947412",Null,"IRAQ","29671605") )
txt="INSERT INTO " & DBTableName & " VALUES(?,?,?), (?,?,?), (?,?,?)"
SQL1.ExecNonQuery2(txt, Array As Object(Null,"TUNISIA","10589025", _
Null,"EGYPT","80471869",Null,"FRANCE","64768389") )
Dim MyCount As Int =SQL1.ExecQuerySingleResult("SELECT count(*) from " & DBTableName)
badger.applyCount(MyCount)
End Sub
The library will be released today or tomorrow. So i´ll create a Thread in the Library--section for it leaving this thread as is1. You might want to move or have Erel move this whole thread to the Libraries section so it can be noticed.
No. Each Desktop-app has it own settings which is used.2. Can the badger count value text size be changed.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?