Browsed by
Author: arifhasnat

Android how to add collapsing toolbar with layout body touch collapse and expand

Android how to add collapsing toolbar with layout body touch collapse and expand

1 . <?xml version=”1.0″ encoding=”utf-8″?> <android.support.design.widget.CoordinatorLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” tools:context=”com.adn.activities.root.HomeActivity”> <android.support.design.widget.AppBarLayout android:id=”@+id/appbar_layout” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:theme=”@style/AppTheme.AppBarOverlay” > <android.support.design.widget.CollapsingToolbarLayout android:id=”@+id/collapsing_toolbar” android:layout_width=”match_parent” android:layout_height=”match_parent” app:layout_scrollFlags=”scroll|exitUntilCollapsed” app:contentScrim=”?attr/colorPrimary” app:expandedTitleMarginStart=”48dp” app:expandedTitleMarginEnd=”64dp” android:fitsSystemWindows=”true” > <LinearLayout android:orientation=”vertical” android:layout_width=”match_parent” android:layout_height=”wrap_content”> <android.support.v7.widget.Toolbar android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”?actionBarSize” android:background=”?attr/colorPrimary” app:popupTheme=”@style/AppTheme.PopupOverlay” > <!–<ImageView–> <!–android:src=”@drawable/logo”–> <!–android:layout_width=”@dimen/count_60dp”–> <!–android:layout_height=”wrap_content” />–> </android.support.v7.widget.Toolbar> </LinearLayout> </android.support.design.widget.CollapsingToolbarLayout> <EditText android:id=”@+id/search_bar” android:background=”@drawable/corner_radious” android:layout_width=”match_parent” android:editable=”false” android:layout_height=”@dimen/count_40dp” android:paddingLeft=”@dimen/count_10dp” android:drawableLeft=”@drawable/search_gray_24″ android:hint=”Search for Products, Brands and More ” android:textSize=”@dimen/count_12dp” android:drawablePadding=”@dimen/count_10dp” android:textColorHint=”@color/dark_gray” android:textColor=”@color/dark_gray” android:layout_marginLeft=”@dimen/count_10dp” android:layout_marginRight=”@dimen/count_10dp” android:layout_marginBottom=”@dimen/count_5dp” /> </android.support.design.widget.AppBarLayout> <include layout=”@layout/content_home2″ /> </android.support.design.widget.CoordinatorLayout> 2. In content layout add…

Read More Read More

Android show collapsing toolbar layout title only when collapsed

Android show collapsing toolbar layout title only when collapsed

final CollapsingToolbarLayout collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout); AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.appBarLayout); appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { boolean isShow = true; int scrollRange = -1; @Override public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) { if (scrollRange == -1) { scrollRange = appBarLayout.getTotalScrollRange(); } if (scrollRange + verticalOffset == 0) { collapsingToolbarLayout.setTitle(“Title”); isShow = true; } else if(isShow) { collapsingToolbarLayout.setTitle(” “); //carefull there should a space between double quote otherwise it wont work isShow = false; } } }); Source : stackoverflow

itunesconnect supported screenshoot sizes

itunesconnect supported screenshoot sizes

The following resolutions are acceptable to iTunes connect: iPhone 3+4 (3.5 Inch) 640 x 960 iPhone 5 (4 Inch) 640 x 1136 iPhone 6 (4.7 Inch) 750 x 1334 iPhone 6 Plus (5.5 Inch) 1242 x 2208 You need the screenshot in this resolution, the phone scales them down to 1080 x 1920 iPhone X 1125 x 2436 iPad (Air and Mini Retina) 1536 x 2048 iPad Pro (12.9 Inch) 2048 x 2732 Apple Watch 312 x 390 pixels (only…

Read More Read More

Android navigation/ toolbar back

Android navigation/ toolbar back

Step one : put these in oncreate method getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true);     @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_details); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); } Step two : Give action to go specific page or actions @Override public boolean onOptionsItemSelected(MenuItem item) { Intent intent = new Intent(fromActivity.this, toActivity.class); startActivity(intent); return super.onOptionsItemSelected(item); } @Override public void onBackPressed() { super.onBackPressed(); Intent intent = new Intent(fromActivity.this, toActivity.class); startActivity(intent); }

ERROR ITMS-90717: “Invalid App Store Icon. The App Store Icon in the asset catalog in ‘CoinAtmFinder.app’ can’t be transparent nor contain an alpha channel.”

ERROR ITMS-90717: “Invalid App Store Icon. The App Store Icon in the asset catalog in ‘CoinAtmFinder.app’ can’t be transparent nor contain an alpha channel.”

It may be causes for 2 reasons – If image is transparent or if alpha channel  .   Solution for transparent :  Simply remove transparent or convert .png image to .jpg/.jpeg format . Solution for alpha channel :   Copy and Paste the App Store icon to the desktop. Open the image. Click File Menu->Duplicate. Save it by unticking the Alpha channel. Replace the current App Store icon with this one. Validate and upload. Source : https://stackoverflow.com/questions/46585809/error-itms-90717-invalid-app-store-icon

SSLcommerz payment gateway integration (Sandbox)

SSLcommerz payment gateway integration (Sandbox)

Step 1 : Go to this link https://developer.sslcommerz.com/registration/ and register . Step 2 : Login account with https://sandbox.sslcommerz.com/manage/ Step 3 : Go to console and click developer tab . you can now download android sdk file . You will find .aar file . Now follow the steps . You also get a manual but it’s not enough for android studio . or Download it from here : ANDROID_190617   Place the ssl-payment-sdk-v4.aar file in your project’s lib folder. To include the SDK file…

Read More Read More

EOFException: End of input at line 1 column 1 path $ 

EOFException: End of input at line 1 column 1 path $ 

EOFException: End of input at line 1 column 1 path $  or Retofit2 error java.io.EOFException: End of input at line 1 column 1 Reasons: This error message indicates a completely empty response, not the one you have indicated. If it’s an error you should be using errorBody() to get access to the data. If this is a normal response then you should yell at your server for returning no content when content was expected. But if you cannot change the server, consider using a…

Read More Read More

Retrofit take List data as POST request body in android rest api call

Retrofit take List data as POST request body in android rest api call

Step 1 :  create a request model that will take request body data package com.adn.api.order; import com.adn.Model.DBModel.AddToCartProductModel; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; public class Order { @SerializedName(“customer_id”) String customer_id; @SerializedName(“firstname”) String firstname; @SerializedName(“lastname”) String lastname; @SerializedName(“email”) String email; @SerializedName(“products”) ArrayList<AddToCartProductModel> products; @SerializedName(“telephone”) String telephone; @SerializedName(“postcode”) String postcode; @SerializedName(“payment_method”) String payment_method; @SerializedName(“total_price”) String total_price; @SerializedName(“address”) String address; @SerializedName(“city”) String city; @SerializedName(“order_status”) String order_status; //Don’t forget to create/generate the getter and setter] public Order(String customer_id, String firstname, String lastname, String email, ArrayList<AddToCartProductModel> products,…

Read More Read More

How to remote git repository from xCode project completely and create new repository

How to remote git repository from xCode project completely and create new repository

Git keeps all of its files in the .git directory. Just remove that one and init again. If you can’t find it, it’s because it is hidden. In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options, then click on the View tab and click on the Show hidden files, folders and drives radio button. On a Mac OS: Open a Terminal (via Spotlight: press CMD + SPACE, type terminal and press Enter) and do this command: defaults write com.apple.finder…

Read More Read More

Rest api development with lumen – part 1 : Environment setup

Rest api development with lumen – part 1 : Environment setup

Step 1 : Open command line tool or terminal for mac/ linux  and run this command for lumen installer . If you have not composer installed then download and install it from here ; https://getcomposer.org/ and install lumen intaller globally Step 2 : Create a lumen project with following command Step 3 : Go the project directory and run the project Step 4 :  Database file setup . Open .env file and setup database file . For mysql it looks like – If you have no database create database for localhost . You need to install XAMP/WAMP . change the database name , password and username . And Environment and database setup done .

Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

Sometimes application may be big in execution or heavy that time multidex should be enabled . Here is the full process to enable multidex in android   Enable Multidesk

Android create border radius for Button , Views , EditText and others

Android create border radius for Button , Views , EditText and others

Step – 1: Create xml layout in drawable folder <?xml version=”1.0″ encoding=”utf-8″?> <selector xmlns:android=”http://schemas.android.com/apk/res/android” > <item android:state_pressed=”true” > <shape android:shape=”rectangle” > <corners android:radius=”3dip” /> <stroke android:width=”1dip” android:color=”#5e7974″ /> <gradient android:angle=”-90″ android:startColor=”#345953″ android:endColor=”#689a92″ /> </shape> </item> <item android:state_focused=”true”> <shape android:shape=”rectangle” > <corners android:radius=”3dip” /> <stroke android:width=”1dip” android:color=”#5e7974″ /> <solid android:color=”#58857e”/> </shape> </item> <item > <shape android:shape=”rectangle” > <corners android:radius=”3dip” /> <stroke android:width=”1dip” android:color=”#5e7974″ /> <gradient android:angle=”-90″ android:startColor=”#8dbab3″ android:endColor=”#58857e” /> </shape> </item> </selector> Step 2 : Implement on anywhere like button and…

Read More Read More

Android Fragment basic code structure

Android Fragment basic code structure

public class BasicFragment extends Fragment { @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.basic_fragment_layout, container, false); return view; } }

IOS best network image download library – SDWebImage , Swift 3/4

IOS best network image download library – SDWebImage , Swift 3/4

Sometimes network image doest not download and for that app may crash . To avoid this you can use SDWebImage library as like Picasso android library which will show a default placeholder image until file downloaded . To implement SDWebImage – Step 1 : paste the pod file in podfile of your project (If you don’t create pod file . create it with ‘pod init’ command in your project directory) pod ‘SDWebImage’, ‘~> 4.0’ Run command pod install Step 2…

Read More Read More

Android back pressed to exit the app dialog and exit app

Android back pressed to exit the app dialog and exit app

@Override public void onBackPressed() { super.onBackPressed(); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this); alertDialogBuilder.setMessage(“Are you sure you want to exit the app?”); alertDialogBuilder.setPositiveButton(“yes”, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface arg0, int arg1) { Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY); startActivity(intent); finishAffinity(); finish(); System.exit(0); } }); alertDialogBuilder.setNegativeButton(“No”, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { finish(); } }); AlertDialog alertDialog = alertDialogBuilder.create(); alertDialog.show(); }

Android custom date picker

Android custom date picker

Step -1 : Create a custom fragment import android.annotation.SuppressLint; import android.app.DatePickerDialog; import android.app.Dialog; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.view.View; import android.widget.DatePicker; import android.widget.EditText; import java.text.SimpleDateFormat; import java.util.Calendar; @SuppressLint(“ValidFragment”) public class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener { public static final String DATE_FORMAT = “dd-MM-yyyy”; EditText mView; private DatePickerDialog datepic; public DatePickerFragment(View v) { mView = (EditText) v; } Calendar c; public DatePickerFragment() { } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the current date as the default date in the…

Read More Read More

IOS Swift 3/4 show alert for specific time duration

IOS Swift 3/4 show alert for specific time duration

   let alert = UIAlertController(title: “”, message: “alert disappears after 30 seconds”, preferredStyle: .alert)             self.present(alert, animated: true, completion: nil)             // change to desired number of seconds (in this case3 0 seconds)             let when = DispatchTime.now() + 30             DispatchQueue.main.asyncAfter(deadline: when){                 // your code with delay          …

Read More Read More

Android Beautiful Spinner view without Custom adapter

Android Beautiful Spinner view without Custom adapter

To make this just bind spinner with cardview . and make it like the code bellow . now it will looks beautiful .   <android.support.v7.widget.CardView android:layout_width=”match_parent” android:layout_height=”@dimen/count_40dp” android:layout_marginLeft=”@dimen/count_5dp” android:layout_marginRight=”@dimen/count_5dp” android:layout_marginTop=”@dimen/count_10dp”> <Spinner android:id=”@+id/gender” android:layout_width=”match_parent” android:layout_height=”match_parent” /> </android.support.v7.widget.CardView>

Android Custom spinner .

Android Custom spinner .

Step -1 : Create new Adapter . public class CustomSpinnerAdapter extends BaseAdapter implements SpinnerAdapter { private final Context context; private ArrayList<String> asr; public CustomSpinnerAdapter(Context context1, ArrayList<String> asr) { this.context = context1; this.asr=asr; } public int getCount() { return asr.size(); } public Object getItem(int i) { return asr.get(i); } public long getItemId(int i) { return (long)i; } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { TextView txt = new TextView(context); txt.setPadding(16, 16, 16, 16); txt.setTextSize(18); txt.setGravity(Gravity.CENTER_VERTICAL); txt.setText(asr.get(position)); txt.setTextColor(Color.parseColor(“#000000”)); return…

Read More Read More

Firebase: A config file was found, but it indicates a project ID “priokotha-92c0e” that you dont appear to have access to. Request access or delete the file in order to proceed with the connection process.

Firebase: A config file was found, but it indicates a project ID “priokotha-92c0e” that you dont appear to have access to. Request access or delete the file in order to proceed with the connection process.

This error will occur if you are signed in to Android Studio and the Firebase Console with different accounts. In Android Studio, click on the small profile icon in the upper right corner to see your sign-in account. Do the same for the Firebase Console tab of your browser. If they are different, sign out and sign in to make them the same.    

ERROR:’keytool’ is not recognized as an internal or external command, operable program or batch file

ERROR:’keytool’ is not recognized as an internal or external command, operable program or batch file

Step 1 : Download JDK : http://www.oracle.com/technetwork/java/javase/downloads/index.html and install it . Step 2 : Set the path on environment path . To do this My Computer – > Properties -> System variable -> Edit Path , click new and past jre bin path location . Check that the directory the keytool executable is in is on your path. (For example, on my Windows 7 machine, it’s in C:\Program Files (x86)\Java\jre6\bin.)   keytool path may be different . find the keytool…

Read More Read More

Android firebase Phone verification authentication – OTP

Android firebase Phone verification authentication – OTP

Step 1 : Go to firebase console . Go SIGN-IN METHOD and enable phone authentication option .   Step 2 : Open your build.gradle (app) and paste this firebase ui gradle and sync . Check firebase version code . It may vary . compile ‘com.firebaseui:firebase-ui-auth:3.1.0’ compile ‘com.google.android.gms:play-services-auth:11.4.2’ Step 3 : private static final int RC_SIGN_IN = 123; Step 4 : Paste this on OnCreate method . FirebaseAuth auth = FirebaseAuth.getInstance(); if (auth.getCurrentUser() != null) { AuthUI.EXTRA_DEFAULT_NATIONAL_NUMBER.toString(); // SavedData.user = auth.getCurrentUser().toString();…

Read More Read More

Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

It may causes for several reasons – I have found 2 reason and solution .  Problem 1 : If you use firebase service and it’s gradle version are older version . Or google play service , gms service are not updated version that can create this problem . Solution : Update all gradle version updated and same version for firebase . Problem 2 :  If multidex not enabled Solution :  Android Multi-dex Enable  

unable to boot device due to insufficient system resources. xcode

unable to boot device due to insufficient system resources. xcode

Problem : unable to boot device due to insufficient system resources. xcode Please see Simulator Help for information on adjusting system settings to allow more simulated devices to boot at once. maxUserProcs: 709, runningUserProcs: 614, enforcedProcBuffer: 144 Solution : Open Terminal and run the command sudo launchctl limit maxproc 2000 2500  Explanation : xCode restricts to run more device but it has 2000 max device run capability. sudo launchctl limit maxproc [limit for one user] [total limit]

Firebase for android – Insert value as a list data

Firebase for android – Insert value as a list data

Part : one – Go to firebase console and click database . If you want to insert database without authentication then go to database->rules tab and { “rules”: { “.read”: “auth == null”, “.write”: “auth == null” } } Part 2 : Create Model . I used Notes Model /** * Created by ADN Digital on 12/24/2017. */ public class Notes { public String id; public String title; public String description; public String date; public String day; public String currentDate; public…

Read More Read More

শেষ হাসি

শেষ হাসি

কে জানে কোন হাসি আমার শেষ হাসিটা ছিল , কোন সীমানায় দৃষ্টি আমার সপ্নে ভূলেছিল ।

ফেরা

ফেরা

সব পাখি দিন শেষে নীড়ে আসে ফিরে ঘরময় ভালোবাসা রয়েছে যে ঘিরে । কিছু পাখি দল ছেড়ে দূরে চলে যায় জানেনি কেউ অবেলায় কেন এ বিদায় ।

Binary Search Algorithm – Deep thinking with Java

Binary Search Algorithm – Deep thinking with Java

import java.util.Scanner;   class BinarySearch { public static void main(String args[]) { int c, first, last, middle, n, search, array[];   Scanner in = new Scanner(System.in); System.out.println(“Enter number of elements”); n = in.nextInt(); array = new int[n];   System.out.println(“Enter ” + n + ” integers”);     for (c = 0; c < n; c++) array = in.nextInt();   System.out.println(“Enter value to find”); search = in.nextInt();   first = 0; last = n – 1; middle = (first + last)/2;…

Read More Read More

Android beautiful dialog and alert libraries

Android beautiful dialog and alert libraries

1 . Lovely dialog is a nice dialog third party android library . There has some good functionality that makes it awesome .   2 . Sweet alert   is also a nice dialog and alert library . It’s also have animation that makes it beautiful .   3 .android material dialog  is now default dialog for android . It’s also simple and nice .    4.  Pretty dilog    is good for it’s nice close button . 5. No Internet Dialog   is very good for…

Read More Read More

IOS – Main Thread Checker: UI API called on a background thread: -[UIApplication delegate] PID: 902, TID: 13120, Thread name: (none), Queue name: NSOperationQueue 0x604000037a20 (QOS: UNSPECIFIED), QoS: 0 Backtrace:

IOS – Main Thread Checker: UI API called on a background thread: -[UIApplication delegate] PID: 902, TID: 13120, Thread name: (none), Queue name: NSOperationQueue 0x604000037a20 (QOS: UNSPECIFIED), QoS: 0 Backtrace:

Solution : use DispatchQueue.main.async { // Correct }     Updating UI from a Completion Handler Long-running tasks such as networking are often executed in the background, and provide a completion handler to signal completion. Attempting to read or update the UI from a completion handler may cause problems. let task = URLSession.shared.dataTask(with: url) { (data, response, error) in if let data = data { self.label.text = “\(data.count) bytes downloaded” // Error: label updated on background thread } } task.resume()…

Read More Read More

Firebase for android : Read list of data from database and show on recyclerview

Firebase for android : Read list of data from database and show on recyclerview

Part -1 : Take that we have some data field on child node named “user” . We will first retrieve all data and then we will show it on recyclerview. , public class UserListActivity extends AppCompatActivity { private DatabaseReference mDatabase; ArrayList<User> userArrayList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_user_list); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); mDatabase = FirebaseDatabase.getInstance().getReference(); mDatabase.child(“user”).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot snapshot) { Toast.makeText(UserListActivity.this, snapshot.toString(), Toast.LENGTH_SHORT).show(); @Override public void onCancelled(DatabaseError databaseError) { System.out.print(databaseError.toString()); } });…

Read More Read More

Firebase for android : Part One – Project setup

Firebase for android : Part One – Project setup

First of all you can get total setup manual from here . https://firebase.google.com/docs/android/setup I am describing here step by step : Part 1 : First create an android project . If already have then no need . We need project package name . Part 2 :  Go to firebase console to create a project . You need a gmail account . https://console.firebase.google.com/ . Add new project . Give project name and enter create project . I named test-project .   Part…

Read More Read More

IOS application development with swift : Part-1 download xCode and environment setup

IOS application development with swift : Part-1 download xCode and environment setup

It’s easy if you have a Mac book . But before to be a iOS application developer you need to have mac and iPhone for debug application but you can also use simulator for debug purpose . Let’s start for environment setup –   1 . First Download xCode from https://developer.apple.com/xcode/ 2 . You need an apple account to download this . 3 . After downloading just double click to install it . 4 . After successfully installed open it ….

Read More Read More

Trick : How to upgrade android gradle version from lower to higher or vice-versa

Trick : How to upgrade android gradle version from lower to higher or vice-versa

1 . It’s easy just create an new dummy app as like test_app . 2. Go the build.gradle and copy and replace the following code   apply plugin: ‘com.android.application’ android { compileSdkVersion 26 defaultConfig { applicationId “com.adndigitalbd.test” minSdkVersion 16 targetSdkVersion 26 versionCode 1 versionName “1.0” testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner” } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ } } } dependencies { implementation fileTree(dir: ‘libs’, include: [‘*.jar’]) implementation ‘com.android.support:appcompat-v7:26.1.0’ implementation ‘com.android.support.constraint:constraint-layout:1.0.2’ implementation ‘com.android.support:design:26.1.0’ testImplementation ‘junit:junit:4.12’ androidTestImplementation ‘com.android.support.test:runner:1.0.1’ androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.1’ }…

Read More Read More

Git commands

Git commands

1 . Know remote repository name git config –get remote.origin.url 2 . Remote Branch current git branch 3 . Remote branch all git branch –all 4 . Git initialization git init (you need to do it first to run any git command) 5 . Add all code or changes git add –all 6 . Git commit git commit -m “commit name” 7 . Git remote repository add git remote add origin “url” 8. Git push git push origin master (master…

Read More Read More

PhoneGap or Cordova iOS build and import to Xcode

PhoneGap or Cordova iOS build and import to Xcode

Open Terminal and go to project folder like cd: Desktop/newProject run the command on terminal cordova platform add ios  and run the command cordova build  It will create  a platform folder in the project directory and inside project directory you will find iOS . import iOS on xCode and build as same as other xCode project .    

!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

Open Terminal and run this command that will add the source on master branch on cocoapod repos .   $ cd ~/.cocoapods/repos $ git clone https://github.com/CocoaPods/Specs.git master     if again issuing already has master branch and it’s not empty and completely remove cocoapod and install from new . How to uninstall cocoapod completely and install new

How to uninstall cocoapod completely and install new

How to uninstall cocoapod completely and install new

1. Uninstall CocoaPods (choose to uninstall all versions): 1 sudo gem uninstall cocoapods 2. Remove old master repo: 1 sudo rm -fr ~/.cocoapods/repos/master 3. Install CocoaPods with sudo: 1 sudo gem install cocoapods 4. Setup CocoaPods and Master repo: 1 pod setup Source i collected 

আসবে সকাল

আসবে সকাল

কে জানে কোন হাসির ছলে ব্যাথার রেখা ধরে , কোন মোহনায় তপ্ত রোদে থাকবে মরে পরে ।   কেউ দেখেনি ওই জড়তায় কত স্বপন লুকানো এই ষ্টাগলের উল্টো পিঠে কত যে ভয় জড়ানো ।   কোন বাকা পথ – পথ হারিয়ে , পথ চলা দেয় শেষ করে রাত পেরিয়ে ভোর এলেও , ফের আধারে যায় চলে ।   সব সকালেই হয় না দেখা ভোরের সুর্য্যদয় কোন জয়েই যায় না মুছে কিছু পরাজয় ।   একদিন এক বৃষ্টি দিনে নাইবা হল…

Read More Read More

Android Encryption and Decryption String with AES/DES .

Android Encryption and Decryption String with AES/DES .

Base Class :  import android.util.Base64; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.GeneralSecurityException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; /** * Created by ADN Digital on 1/17/2018. */ public class EncryptionDecryption { public static String encrypt(String value, String key) throws UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException { byte[] value_bytes = value.getBytes(“UTF-8”); byte[] key_bytes = getKeyBytes(key); return Base64.encodeToString(encrypt(value_bytes, key_bytes, key_bytes), 0); } public static byte[] encrypt(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, byte[]…

Read More Read More