why do I need a voip api to use functionality that's built into android
Printable View
why do I need a voip api to use functionality that's built into android
this is what I need I just don't know enough about the structure of an android project to get the fucking thing working
https://developer.android.com/refere...eListener.html
fuck java
Yeah, API levels and Permissions belong the Android systems are pain in the ass, even Java is outdated and shitty syntax to read like @Override and class with inside of function.
However, NativeScript is fucking awesome, basically if you port Java shitty code to Javascript which is very easy to do UI.
https://www.nativescript.org
You showed me PhoneStateListener, I make an example as incoming call like this:
It's ugly code, however it can be ported to Javascript with Nativescript.Code:private class CallStateListener extends PhoneStateListener {
@Override
public void onCallStateChanged(int state, String incomingNumber) {
}
}
tm = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(callStateListener, PhoneStateListener.LISTEN_CALL_STATE);
It looks nice, you can integrate any elements as UI including getting phone state and incoming number.Code:var callStateListener = android.telephony.PhoneStateListener.extend({
onCallStateChanged: function (state, incomingNumber) {
}
var application = require("application");
var tm = application.android.context.getSystemService(android.content.Context.TELEPHONY_SERVICE);
tm.listen(new callStateListener(), android.telephony.PhoneStateListener.LISTEN_CALL_STATE);
frankly I'd too irritated with the whole thing to spend any more time on it, but I'll give that a shot I think it's more or less the same thing dp recommended
So good
Thanks g
Uys
I got it working, sort of. I successfully spawned a background service, it detects incoming calls and sends a packet like it should. however
on the emulator, I need to specify an address, a broadcast address won't work. probably because the emulator thinks it's on cellular and you can't broadcast on a wan
on the actual phone, it only works if the app is in the foreground, the service doesn't seem to be listening after I hit the home button.
What good is a background server going to do if the notifier application on the phone doesn't work
I need to figure out how services work in more depth
I don't know, you're supposed to test what is ringing then send a log to server then send the notification to all specificed mobiles
I get the idea, but a dedicated web service isn't necessary, the broadcast works it's the ring detection that doesn't when the app is backgrounded
Fucking nerds.
I'd just like to remind everyone that nuffy steals my posts and uses them over on juggalo.com
Thats why Nuffy is married
I'm not married! How dare you.