This file contains hidden or 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
| compile 'com.android.volley:volley:1.0.0' | |
| compile 'com.squareup.retrofit2:retrofit:2.2.0' | |
| compile 'com.squareup.retrofit2:converter-gson:2.2.0' | |
| compile 'com.android.support:design:25.3.1' | |
| compile 'com.google.code.gson:gson:2.7' | |
| compile 'com.android.support:cardview-v7:25.3.1' | |
| compile 'com.android.support:recyclerview-v7:25.3.1' | |
| compile 'com.squareup.picasso:picasso:2.5.2' | |
| compile 'com.google.android.gms:play-services-maps:10.2.1' | |
| compile 'com.google.android.gms:play-services-location:10.2.1' |
This file contains hidden or 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
| Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView); | |
| Picasso.with(context) | |
| .load(url) | |
| .resize(50, 50) | |
| .centerCrop() | |
| .into(imageView) | |
| Picasso.with(context) | |
| .load(url) |
This file contains hidden or 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
| NotificationManager manager; | |
| private void createNotification() { | |
| NotificationCompat.Builder mBuilder = | |
| new NotificationCompat.Builder(this) | |
| .setSmallIcon(R.drawable.notification) | |
| .setContentTitle("My notification") | |
| .setOngoing(true) | |
| .setContentText("Hello World!"); | |
| Intent notificationIntent = new Intent(this, MainActivity.class); |
This file contains hidden or 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
| <?php | |
| if($_SERVER['REQUEST_METHOD']=='POST'){ | |
| $username = $_POST['username']; | |
| $email = $_POST['email']; | |
| $password = $_POST['password']; | |
| define('HOST','localhost'); | |
| define('USER','root'); | |
| define('PASS','root'); |
This file contains hidden or 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
| <!DOCTYPE HTML> | |
| <html> | |
| <body> | |
| <form method="post" action="volleyRegister.php"> | |
| Name: <input type="text" name="username"><br> | |
| E-mail: <input type="text" name="email"><br> | |
| Password: <input type="text" name="password"><br> | |
| <input type="submit"> | |
| </form> |
This file contains hidden or 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
| Getting JSON Response from a link..... | |
| implementation 'com.android.volley:volley:1.1.1' | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| if (progressDialog != null) { | |
| progressDialog.show(); |
This file contains hidden or 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
| if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) | |
| == PackageManager.PERMISSION_DENIED) { | |
| ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, MY_CAMERA_REQUEST_CODE); | |
| } | |
| @Override | |
| public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | |
| super.onRequestPermissionsResult(requestCode, permissions, grantResults); | |
| if (requestCode == MY_CAMERA_REQUEST_CODE) { |
This file contains hidden or 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
| Realm realm; | |
| Realm.init(this); | |
| realm = Realm.getDefaultInstance(); | |
| realm.executeTransaction(new Realm.Transaction() { | |
| @Override | |
| public void execute(Realm realm) { | |
| try { |
This file contains hidden or 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
| final Handler handler = new Handler(); | |
| handler.postDelayed(new Runnable() { | |
| @Override | |
| public void run() { | |
| //Do something after 100ms | |
| } | |
| }, 100); |
OlderNewer