Results 1 to 30 of 97

Threaded View

  1. Collapse Details
     
    #27
    Muscle Furry 12 inch Dick juji's Avatar
    Join Date
    Dec 2011
    Posts
    17,977
    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:

    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's ugly code, however it can be ported to Javascript with Nativescript.

    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);
    It looks nice, you can integrate any elements as UI including getting phone state and incoming number.
    Last edited by juji; 03-18-2018 at 12:22 AM.


    Quote Originally Posted by Steffies Yelle View Post
    I'll kill myself live on cam as soon as there's proof I literlaly promise, I will sincerely kill myself as soon as I see elz's computer playing arma 3 maxed with all nvidia exclusive graphics
    Reply With Quote
     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •