Class DirectoryEntry
java.lang.Object
com.codename1.call.directory.DirectoryEntry
One number the app can name or block.
Numbers must be sorted, and they are numbers
Both platforms require the identification and blocking lists to be handed
over in ascending numerical order, and reject the whole list -- not
the offending row -- when they are not. That is why the number here is a
long rather than a string: a string list sorts lexicographically, which
puts +1999... before +12..., and the resulting rejection names no row.
The number is the full international number without the leading +, so
+1 415 555 1212 is 14155551212. CallDirectory sorts what it is
given, so an app need not.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryEntry(long number, String label) An entry that gives a number a name.DirectoryEntry(long number, String label, boolean blocked) An entry that names a number, blocks it, or both. -
Method Summary
-
Constructor Details
-
DirectoryEntry
An entry that gives a number a name.- Parameters:
number- the full international number without+label- what to show when it calls
-
DirectoryEntry
An entry that names a number, blocks it, or both.- Parameters:
number- the full international number without+label- what to show when it calls, or null to only blockblocked- whether the call should be rejected without ringing
-
-
Method Details
-
getNumber
public long getNumber()The full international number without+. -
getLabel
What to show when it calls, or null. -
isBlocked
public boolean isBlocked()Whether calls from it are rejected without ringing.
-