Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainActivity extends AppCompatActivity {
- IMyAidl iMyAidl;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
- setSupportActionBar(toolbar);
- Intent intent = new Intent("br.com.packapps.aidlserver.CALL");
- intent.setPackage("br.com.packapps.aidlserver");
- bindService(intent, serviceConnection, BIND_AUTO_CREATE);
- }
- private ServiceConnection serviceConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName name, IBinder service) {
- iMyAidl = IMyAidl.Stub.asInterface(service);
- }
- @Override
- public void onServiceDisconnected(ComponentName name) {
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement