This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
ConnectivityReceiver.java | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upload image folder and save path in db: | |
________________________________________ | |
//add_contestNew | |
app.post("/add_contestNew", function (req, res) { | |
var contest_name = req.query.contest_name; | |
var date = req.query.date; | |
var domain = req.query.domain; | |
var duration = req.query.duration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void getHashkey() { | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
Log.i("Base64", Base64.encodeToString(md.digest(), Base64.NO_WRAP)); | |
} | |
} catch (PackageManager.NameNotFoundException e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Adapter; | |
import android.app.Dialog; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.support.v7.widget.CardView; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.LayoutInflater; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.androiddeft.com/android-storing-and-accessing-file-from-external-storage-tutorial/ | |
if (android.os.Environment.getExternalStorageState().equals( | |
android.os.Environment.MEDIA_MOUNTED)) { | |
//Check for the file | |
File appFolder = new File(Environment.getExternalStorageDirectory() + File.separator | |
+ context.getString(R.string.app_name)); | |
boolean exist = appFolder.exists(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
push the code | |
git branch | |
git checkout branchname | |
git status | |
git log -n1 | |
git add class name | |
git commit | |
git push origin HEAD:refs/for/q-common | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Need to know about exclude | |
exclude group:"com.squareup.retrofit2" , module :"retrofit" | |
exclude group:"com.squareup.retrofit2" , module :"converter-gson" | |
// Library Creation | |
https://jitpack.io/com/github/iniyan455/MyTestLibrary/0.1.0/build.log | |
//Deeplinking | |
https://github.com/hamidsn/deferred-deeplink/tree/master/app/src/main/java/sample/deeplinking/deferred/receiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Need to know about exclude | |
exclude group:"com.squareup.retrofit2" , module :"retrofit" | |
exclude group:"com.squareup.retrofit2" , module :"converter-gson" | |
// Library Creation | |
https://jitpack.io/com/github/iniyan455/MyTestLibrary/0.1.0/build.log | |
//Deeplinking | |
https://github.com/hamidsn/deferred-deeplink/tree/master/app/src/main/java/sample/deeplinking/deferred/receiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Connect device with android studio using usb mode | |
Connect your phone to your desktop with usb. | |
make sure your desktop have the adb utility and a suitable driver for your phone is installed. | |
adb start-server ; adb devices | |
##make sure device is connected. | |
adb shell pm list packages|grep -i "keyword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ignore file | |
# Built application files | |
*.apk | |
*.aar | |
*.ap_ | |
*.aab | |
# Files for the ART/Dalvik VM | |
*.dex |
OlderNewer