Skip to content

Instantly share code, notes, and snippets.

View gohilbhagirath90's full-sized avatar

Bhagirathsinh Gohil gohilbhagirath90

  • eInfochips
  • Ahmedabad, Gujarat, India
View GitHub Profile
@gohilbhagirath90
gohilbhagirath90 / Usage.java
Created July 31, 2018 16:38 — forked from abombss/Usage.java
A roboguice provider for creating a User-Agent string on android
public class MyModule extends AbstractModule {
@Override
void configure() {
bind(String.class).annotatedWith(UserAgent.class).to(UserAgentProvider.class);
}
}
public class MyComponent {
String userAgent;
===============================================================================
For Adding Any Appllication in Android Source
===============================================================================
For : TestApp
Create TestApp directory into below path
vendor/<vendor>/proprietary/prebuilt/target/product/<device>/system/app/
cd vendor/<vendor>/proprietary/prebuilt/target/product/<device>/system/app/
===============================================================================
Auto start deamon on stoping
===============================================================================
FILE : ./device/qcom/common/rootdir/etc/init.qcom.rc
# Added deamon_service
service deamon_service /system/bin/deamon
class late_start
user root
oneshot
adb shell dumpsys media.camera
@gohilbhagirath90
gohilbhagirath90 / Camera2Activity.java
Created December 14, 2016 06:23 — forked from natevogt/Camera2Activity.java
Quick-n-Dirty Camera2 Activity
package com.natevogtphoto.camera2test;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.graphics.ImageFormat;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraCaptureSession.CaptureCallback;
@gohilbhagirath90
gohilbhagirath90 / vlc.html
Created January 20, 2016 10:52 — forked from mylesjao/vlc.html
vlc web plugin sample. only for IE and Firefox
<!DOCTYPE html>
<html>
<body>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</head>
<object
@gohilbhagirath90
gohilbhagirath90 / circle.xml
Last active June 15, 2019 10:20
list item with left side half circle android
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@android:color/white" />
<size
android:height="50dp"
android:width="50dp" />
</shape>
public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
@gohilbhagirath90
gohilbhagirath90 / Set Property from android application
Created September 9, 2015 09:10
Set System Properties from android application
==> Add in AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:sharedUserId="android.uid.system"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.example"
>
==> Android Source :
// For Properties permission
// Properties which start with "debug." have both SYSTEM & SHELL permisiion to edit
@gohilbhagirath90
gohilbhagirath90 / Remove hardware & software fetures from aosp android
Last active March 19, 2024 09:35
Remove hardware & software fetures from aosp android
For Remove Hardware features check following files in android source :
1. Check the device.mk file for your device(Like : device/<vendor>/<device>.mk)
2. Check the common.mk file for your device(Like : device/<vendor>/common/common.mk)
There both files is probably a line like the following:
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \