0

I have managed to make a call and send an SMS with sl4a for python but it is using the default selected SIM in android system settings.

Is there a way to force SIM 1 or 2 from inside the python code?

import sl4a

droid = sl4a.Android()

droid.phoneCallNumber("number") 
#works

droid.smsSend("number", "text")
#works
Klaus D.
  • 13,874
  • 5
  • 41
  • 48
john
  • 23
  • 1
  • 5
  • do you mean that all works? – MEdwin Jul 02 '19 at 10:40
  • Android has no native support for dual sims (yet). It has to be implemented by the vendor and each implementation differs. – Klaus D. Jul 02 '19 at 10:44
  • @MEdwin I mean it works for the default selected SIM – john Jul 02 '19 at 11:44
  • @KlausD.That makes sense. This is a MT65xx phone, but I'm not sure if you can alter settings like that via qpython3 – john Jul 02 '19 at 11:45
  • The ultimate solution for me would be if you could specify when you call the function which SIM to use to dial/send SMS but it looks like this is impossible – john Jul 02 '19 at 11:51

1 Answers1

0
import androidhelper
droid = androidhelper.Android()

To make a call

droid.phoneCall("Phone number")
4b0
  • 21,981
  • 30
  • 95
  • 142
  • 1
    Welcome to Stack Overflow. Your answer might be improved by explaining the code you've given (and how it solves the posters question). – bbnumber2 Jan 16 '21 at 00:36