I want to knock up a mock app showing a dialpad that looks as similar as possible to the dialpad of the native phone (starting with ios).
Not sure how to do the layout so it’ll look OK on all types of phone - any ideas? I hope it’s mostly a question of where to start!
PS - there’s a generic (non-Nativescript) example here: https://codepen.io/mattsich/pen/dYWxmN maybe I could just take most of that and pop it into my app? Could be as simple as that?
As layout is concerned you could just use GridLayout and lay buttons as in example like your provided,
as for logic you could use this plugin:
hope it helps
OK, need to have a play with GridLayout, then, cheers!
I’ve looked at nativescript-phone and am optimistic there. One thing that I’ve not yet worked out how to do is to get the phone number of the device that I’m running on. I was assuming that the phone plugin would have it, but it doesn’t. Neither (I think) does the sim plugin (nativescript-telephony) which is further frustrating as it appears not to work on the simulator. Perhaps the contacts plugin will do the trick, but I’m not exactly sure if “my number” is always available…
Reading telephone number requires special permissions, use this plugin for that purpose.
That’s the one I tried. I think my problem is with the permissions and it not working on the simulator - or maybe it does, but I’ve not enabled it?
Obviously your Simulator will not have telephone information, you need to test it with real device.
Well, it could emulate a real phone, but I understand
Hopefully will some action very soon now…
…and yes, that works just fine!