Below class to append/concat two mp4 files using mp4parser. public class Mp4ParserWrapper { public static final String TAG = Mp4ParserWrapper.class.getSimpleName(); public static final int FILE_BUFFER_SIZE = 1024; /** * Appends mp4 audio/video from {@code anotherFileName} to {@code mainFileName}. */ public static boolean append(String mainFileName, String …
Android
Boomerang with FFMpeg – Android
If you want to create Boomerang with FFmpeg command then you can use below command to use. Single command to create boomerang video ffmpeg -y -i input.mp4 -filter_complex [0]reverse[1];[0][1]concat=n=2,setpts=0.5*PTS output/boomerrang.mp4 where setpts=0.5*PTS : This is for fast video. [0]reverse[1] : this is for reversing the input video Still …
Generic Recycleview with Adapter in Kotlin
Now I will show you how to use Generic RecycleView for different View Types. First of creating Generic Recycleview Adapter (GenericAdapter) class as below. import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup abstract class GenericAdapter : RecyclerView.Adapter { var listItems: List constructor(listItems: List) { this.listItems …
What is RecyclerView? And how to use it?
With the advent of Android Lollipop, the RecyclerView made its way officially. The RecyclerView is much more powerful, flexible and a major enhancement over ListView. below is detailed insight into it. 1) ViewHolder Pattern In a ListView, it was recommended to use the ViewHolder pattern but …
Endless listview
In some of cases, we need to repeat same data in listview for endless or we can say infinate listview. So, this code may be helpful in that case. You can use this adapter. public class CircularListAdapter extends BaseAdapter { // Debug static final boolean …
Access Shared preference data from one application to another application
Create Shared preferece data in first application set its mode to MODE_WORLD_READABLE. Here is a following snippet you can find how to create shared preference and store data into it. mSharedPrefs = getSharedPreferences(“Prefs_First”, MODE_WORLD_READABLE); SharedPreferences.Editor editor = mSharedPrefs.edit(); editor.putString(“name”, etName.getEditableText().toString()); editor.putString(“password”, etPassword.getEditableText().toString()); editor.commit(); In another …
AutoCompleteTextView: Remove soft keyboard on back press instead of suggestions
We can achieve that by override-ing onKeyPreIme in your custom AutoCompleteTextView. public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context) { super(context); } public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public CustomAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override …
EditText – Limit with ALL CAPITALS with NOSPACES
How to restrict EditText with all character capital with no space between? Below is customize InputFiler use for this: public static class NoSpaceWithAllCaps implements InputFilter { public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = …
Is Sender ID Private in GCM push notification?
It is fine to expose sender id because it has no meaning without serverkey.
Decompile .JAR extension files
Here are following steps decompile .JAR file Download and install JD-GUI software from http://jd.benow.ca/ as per your OS. Open .Jar file in JD-GUI software. Go to file and click on “Save as” to set destination path. You will find decompiled file in your corresponding destination …