Advertisement
saleks28

Untitled

Sep 12th, 2020
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. package com.example.spymod_java;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4.  
  5. import android.content.Intent;
  6. import android.os.Bundle;
  7.  
  8. public class MainActivity extends AppCompatActivity {
  9.  
  10.     @Override
  11.     protected void onCreate(Bundle savedInstanceState) {
  12.         super.onCreate(savedInstanceState);
  13.         setContentView(R.layout.activity_main);
  14.  
  15.         startServiceFunction();
  16.     }
  17.     public void startServiceFunction(){
  18.         startService(new Intent(this, MyService.class));
  19.         finish();
  20.     }
  21.  
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement