Is the presence of the accused necessary in order for the court to act on a motion?

It is not necessary for the court to first acquire jurisdiction over the person of the accused to dismiss a case or grant other relief. The outright dismissal of the case even before the court acquires jurisdiction over the person of the accused is allowed, except in applications for bail, in which case, the presence of the accused is mandatory.