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 static String getUsersCountry() { | |
LocationManager locationManager = (LocationManager) | |
RadioApp.getContext().getSystemService(Context.LOCATION_SERVICE); | |
Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); | |
Geocoder gcd = new Geocoder(RadioApp.getContext(), Locale.getDefault()); | |
List<Address> addresses; | |
try { | |
addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1); //1 - is number of result you want you write it any integer value. But as you require country name 1 will suffice. | |
if (addresses.size() > 0) | |
System.out.println(addresses.get(0).getCountryName()); |
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 com.osama.google; | |
import android.os.AsyncTask; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
import org.json.JSONException; | |
import org.json.JSONObject; |
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 com.osama.google; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.os.Build; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<gradient android:startColor="?attr/background" | |
android:endColor="?attr/background" | |
android:angle="270" /> | |
<corners android:radius="10dp" /> | |
<stroke android:width="5px" | |
android:color="?attr/colorAccent" |
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 com.downloader.videodownloader; | |
import android.Manifest; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.os.Build; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.app.AppCompatActivity; |
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 com.downloader.videodownloader; | |
import android.Manifest; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; |
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 com.downloader.videodownloader; | |
import android.Manifest; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.os.Build; | |
import android.support.annotation.NonNull; | |
import android.os.Bundle; | |
import android.widget.Toast; |
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 com.bullhead.classifiedapp.ui.fragments; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
/** | |
* Created by bullhead on 8/24/17. | |
* | |
*/ |
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 com.bullhead.classifiedapp.ui.fragments; | |
import android.graphics.Bitmap; | |
import android.graphics.Color; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.Fragment; | |
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
package com.bullhead.classifiedapp.ui.activities; | |
import android.Manifest; | |
import android.app.ProgressDialog; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.graphics.Bitmap; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; |
OlderNewer