title: NativeScript JobScheduler JobService.class is undefined
body: <p>I have weird error while i'm trying to create component in the <code>JobScheduler</code></p>
  
  <p>At the first line when setting a component value i get this error:</p>
  
  <pre><code>ERROR TypeError: Cannot read property 'MyJobService' of undefined
  </code></pre>
  
  <p>Both of the files are in the same folder, and its all worked yesterday.</p>
  
  <ul>
  <li>I cleaned up the platforms folder just to be sure, because i dragged some pics to the <code>drawble</code> folders in the <code>app_Resources</code> and i had to build the project again  and maybe something has changed. but it did not helped.</li>
  </ul>
  
  <p>What can cause this problem ? am i missing something ? </p>
  
  <p>JobScheduler.js :</p>
  
  <pre><code>function scheduleJob(context) {
          var component = new android.content.ComponentName(context, com.tns.notifications.MyJobService.class);
          const builder = new android.app.job.JobInfo.Builder(1, component);
  
          builder.setPeriodic(15 * 60 * 1000);
          builder.setOverrideDeadline(0);
  
  
          const jobScheduler = context.getSystemService(android.content.Context.JOB_SCHEDULER_SERVICE);
          console.log("Job Scheduled: " + jobScheduler.schedule(builder.build()));
  
  }
  
  module.exports.scheduleJob = scheduleJob;
  </code></pre>
  
  <p>MyJobService.js :</p>
  
  <pre><code>android.app.job.JobService.extend("com.tns.notifications.MyJobService", {
      onStartJob: function(params) {       
          console.log("Job execution ...");            
  
          var utils = require("utils/utils");
          var context = utils.ad.getApplicationContext();
  
              var builder = new android.app.Notification.Builder(context);
              console.log("setting notification head and body")
  
                  builder.setContentTitle("notification triggered ")
                  .setAutoCancel(true)
                  .setColor(android.R.color.holo_purple)//getResources().getColor(R.color.colorAccent))
                  .setContentText("body)
                  .setVibrate([100, 200, 100])
                  .setSmallIcon(android.R.drawable.btn_star_big_on);
  
  
              var mainIntent = new android.content.Intent(context, com.tns.NativeScriptActivity.class); 
  
              var mNotificationManager = context.getSystemService(android.content.Context.NOTIFICATION_SERVICE);
  
              const channelId = "my_channel_01";
              const name = "Channel name";
              const description = "Channel description";
              const importance = android.app.NotificationManager.IMPORTANCE_LOW;
              if (android.os.Build.VERSION.SDK_INT &gt;= 26) {
                  console.log("api level is good",android.os.Build.VERSION.SDK_INT)
              }
              const mChannel = new android.app.NotificationChannel(channelId, name,importance);
  
  
              mChannel.setDescription(description);
              mChannel.enableLights(true);
  
              mChannel.enableVibration(true);
              mNotificationManager.createNotificationChannel(mChannel);
              builder.setChannelId(channelId);
              mNotificationManager.notify(1, builder.build());
  
              return false;
          },
  
          onStopJob: function() {
              console.log("Stopping job ...");
  
          }
  
      });
  </code></pre>