Wenn du es einbauen willst, kannst du es machen:
MainActivity.java:
package com.tool.uri2fhem;
import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Uri data = getIntent().getData();
if (data.equals(null)) { } else {
String host = data.getHost();
Intent intent = new Intent("li.klass.fhem.constants.Actions.EXECUTE_COMMAND");
intent.putExtra("COMMAND", host);
startService(intent);
}
finish();
}
}
AndroidManifest.xml:
<activity
android:name="com.tool.uri2fhem.MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoDisplay" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="fhem" />
</intent-filter>
</activity>
Eventuell musst du die Activity umbenennen :)