package com.innovattic.logeverywhere;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Jelle on 6-7-2015.
 */
public class MainActivity extends Activity
{

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		ButterKnife.bind(this);
	}

	@OnClick(R.id.start_service)
	protected void startService()
	{
		startService(new Intent(this, LogService.class));
	}

	@OnClick(R.id.stop_service)
	protected void stopService()
	{
		stopService(new Intent(this, LogService.class));
	}

}

@@ -267,16 +267,88 @@
 vity%0A%7B%0A%0A
+%09private static final String TAG = MainActivity.class.getSimpleName();%0A%0A
 %09@Overri
@@ -502,24 +502,599 @@
 (this);%0A%09%7D%0A%0A
+//%09@OnClick(R.id.grant_permission)%0A//%09protected void grantPermission()%0A//%09%7B%0A//%09%09try %7B%0A//%09%09%09final java.lang.Process process = Runtime.getRuntime().exec(%0A//%09%09%09%09%09%22pm grant com.innovattic.logeverywhere android.permission.READ_LOGS%22%0A//%09%09%09);%0A//%09%09%09final BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));%0A//%09%09%09String line = %22%22;%0A//%09%09%09while ((line = reader.readLine()) != null) %7B%0A//%09%09%09%09Toast.makeText(this, line, Toast.LENGTH_SHORT).show();%0A//%09%09%09%09Log.e(TAG, line);%0A//%09%09%09%7D%0A//%09%09%7D catch (IOException e) %7B%0A//%09%09%09e.printStackTrace();%0A//%09%09%7D%0A//%09%7D%0A//%0A
 %09@OnClick(R.

Add (failed) attempt to grant ourselves READ_LOGS permission