Skip to content

Instantly share code, notes, and snippets.

@luisadha
Last active February 13, 2024 09:08
Show Gist options
  • Save luisadha/4f489b71e5a18c4a154fbdaec88aee6e to your computer and use it in GitHub Desktop.
Save luisadha/4f489b71e5a18c4a154fbdaec88aee6e to your computer and use it in GitHub Desktop.
cat AndroidManifest.xml | YOUR_APP_NAME="com.google.adharudin14.aplikasisaya" mush -o AndroidManifest.xml.update
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{YOUR_APP_NAME}}">
<uses-sdk android:targetSdkVersion="17" android:minSdkVersion="17" />
<application>
<service
android:name=".{{YOUR_DAYDREAM_CLASS}}"
android:exported="true"
android:label="@string/my_daydream_name">
<intent-filter>
<action android:name="android.service.dreams.DreamService" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- <meta-data
android:name="android.service.dream"
android:resource="@xml/dream_info" /> -->
</service>
</application>
</manifest>
package {{PACKAGE_NAME}};
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
/**
* Main (and only) screen of the app.
*/
public class MainActivity extends Activity {
/**
* Create activity with new CLASSFILE
*
* @param savedInstanceState
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(new {{YOURS_DAYDREAM_CLASS}}(this));
}
}
@luisadha
Copy link
Author

@luisadha
Copy link
Author

File2 pemgembangan aplikasi Daydream

@fmway
Copy link

fmway commented Feb 13, 2024

File2 pemgembangan aplikasi Daydream

Aplikasi buat apa, bang?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment