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
class WriteToFile{ | |
BufferedWriter bw; | |
public void writeFile1(String number){ | |
File fout = new File(Environment.getExternalStorageDirectory() + "/numbers0300.cvs"); | |
FileOutputStream fos = null; | |
try { | |
fos = new FileOutputStream(fout); | |
bw = new BufferedWriter(new OutputStreamWriter(fos)); | |
bw.write(number + ","); | |
Log.i(TAG, "writeFile1: " + number); |
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
package com.example.alitamoor.downloadersampleapplication; | |
import android.media.MediaPlayer; | |
import android.os.AsyncTask; | |
import android.os.Environment; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.widget.ProgressBar; |
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
RequestQueue queue = Volley.newRequestQueue(context); | |
//for POST requests, only the following line should be changed to | |
StringRequest sr = new StringRequest(Request.Method.GET, "http://headers.jsontest.com/", | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
Log.e("HttpClient", "success! response: " + response.toString()); | |
} | |
}, |
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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout 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" | |
android:background="@drawable/login_bg" | |
tools:context=".activities.LoginActivity"> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
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
<receiver | |
android:name=".textonphoto.AdsControler.UnlockReceiver.java" | |
android:enabled="true"> | |
<intent-filter> | |
<action android:name="android.intent.action.BOOT_COMPLETED" /> | |
<action android:name="android.intent.action.SCREEN_OFF" /> | |
<action android:name="android.intent.action.SCREEN_ON" /> | |
<action android:name="android.intent.action.USER_PRESENT" /> | |
<category android:name="android.intent.category.DEFAULT"></category> | |
</intent-filter> |
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
private long lastPressedTime; | |
private static final int PERIOD = 2000; | |
@Override | |
public boolean onKeyDown(int keyCode, KeyEvent event) { | |
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) { | |
switch (event.getAction()) { | |
case KeyEvent.ACTION_DOWN: | |
if (event.getDownTime() - lastPressedTime < PERIOD) { | |
finish(); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.tutorialscafe.readallsms"> | |
<uses-permission android:name="android.permission.READ_CONTACTS" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
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
private String storeImage(Bitmap bitmap,String fileName){ | |
String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/FilterImages"; | |
File dir = new File(dirPath); | |
if(!dir.exists()){ | |
dir.mkdir(); | |
} | |
File file = new File(dirPath,fileName); | |
try{ | |
FileOutputStream fileOutputStream = new FileOutputStream(file); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout 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" | |
android:background="@drawable/main_bg" | |
tools:context="pk.camict.jovial.eidmubarakprofile.FrameChosserActivity" | |
android:gravity="center"> |
NewerOlder