mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-28 20:57:42 +00:00
38 lines
996 B
Java
38 lines
996 B
Java
package org.kde.connect;
|
|
|
|
import android.app.Activity;
|
|
import android.content.Intent;
|
|
import android.net.nsd.NsdServiceInfo;
|
|
import android.os.Bundle;
|
|
import android.view.Menu;
|
|
import android.view.View;
|
|
import android.view.View.OnClickListener;
|
|
|
|
public class MainActivity extends Activity {
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_main);
|
|
|
|
findViewById(R.id.button2).setOnClickListener(new OnClickListener() {
|
|
@Override
|
|
public void onClick(View view) {
|
|
|
|
Intent service = new Intent(MainActivity.this, BackgroundService.class);
|
|
startService(service);
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
// Inflate the menu; this adds items to the action bar if it is present.
|
|
getMenuInflater().inflate(R.menu.main, menu);
|
|
return true;
|
|
}
|
|
|
|
}
|