User Profile

alex levine QnA

alex levine

  • 0Followers
  • 0Experience
  • 54Questions
  • alex levine QnA

    alex levine started a new conversation WebView visible behind statusbar in flutter application? 4 days ago ago

    I am trying to use this However that gives me error .

    I am working on a WebView where I don't want any AppBar, So without AppBar my Container/ Widget or application body going behind the Status Bar in Flutter Application.

    How to Hide or bring out application body from the Status bar?

    Hide flutter application body behind Statusbar

  • alex levine QnA

    alex levine started a new conversation How to create ProgressDialog in Android 28 days ago ago

    I am trying to use this However that gives me error .

    How to create ProgressDialog system define progress dialog box, which will indicate that request is in process.
    Not customize, Is there any way to implement Progress Dialog with Spinner and its Title in android.

  • alex levine QnA

    alex levine started a new conversation More than One Floating Action Button on one page Flutter ? 1 months ago ago

    I am trying to use this However that gives me error .

    I want to add more than one FloatingActionbutton on the flutter app screen. but build function can contain only on floating button How can I add floatingActionButton  on the page

  • alex levine QnA

    I am trying to use this However that gives me error .

    I am creating an App which is on Live location sharing, for getting User's Location I want to make a service which has Location getting the functionality which is working fine, but when I close the app or kill the app from history Apps clear from there, my service stop working. I want to make Service live until the user stops sharing location.

    LocationService.Java

    import android.app.Service;
    import android.content.Intent;
    import android.location.Location;
    import android.location.LocationListener;
    import android.location.LocationManager;
    import android.os.Bundle;
    import android.os.Handler;
    import android.os.IBinder;
    import android.support.annotation.Nullable;
    import android.util.Log;
    import android.widget.Toast;
    
    import java.util.Timer;
    import java.util.TimerTask;
    
    public class LocationService extends Service implements LocationListener {
    
        boolean isGPSEnable = false;
        boolean isNetworkEnable = false;
        double latitude, longitude;
        LocationManager locationManager;
        Location location;
        private Handler mHandler = new Handler();
        private Timer timer = null;
        long notify_interval = 10000;
        public static String str_receiver = "vbage.service.receiver";
        Intent intent;
    
    
        public LocationService() {
        }
    
        @Nullable
        @Override
        public IBinder onBind(Intent intent) {
            return null;
        }
    
        @Override
        public void onCreate() {
            super.onCreate();
    
            timer = new Timer();
            timer.schedule(new TimertoGetLocation(), 5, notify_interval);
            intent = new Intent(str_receiver);
        }
    
        @Override
        public void onLocationChanged(Location location) {
            Log.d("LOCATIONSERVICE", "onLocationChanged= Accuracy:"+location.getAccuracy()+" Lat:" + location.getLatitude() + " Long" + location.getLongitude());
    
        }
    
        @Override
        public void onStatusChanged(String provider, int status, Bundle extras) {
            Log.d("LOCATIONSERVICE", "onStatusChanged: (" + status + ") " + provider);
        }
    
        @Override
        public void onProviderEnabled(String provider) {
            Log.d("LOCATIONSERVICE", "onProviderEnabled: " + provider);
    
        }
    
        @Override
        public void onProviderDisabled(String provider) {
            Log.d("LOCATIONSERVICE", "onProviderDisabled: " + provider);
    
        }
    
        private void getLocationLattitudeLongitude() {
            locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);
            isGPSEnable = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
            isNetworkEnable = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
    
            if (!isGPSEnable && !isNetworkEnable) {
                Toast.makeText(this, "GPS disabled", Toast.LENGTH_SHORT).show();
            } else {
    
                if (isNetworkEnable) {
                    location = null;
                    locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, notify_interval, 0, this);
                    if (locationManager != null) {
                        location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
                        if (location != null) {
                            Log.d("Networklatitude", location.getLatitude() + "");
                            Log.d("Networklongitude", location.getLongitude() + "");
    
                            latitude = location.getLatitude();
                            longitude = location.getLongitude();
                            locationUpdate(location);
                        }
                    }
                }
                if (isGPSEnable) {
                    location = null;
                    locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, notify_interval, 0, this);
                    if (locationManager != null) {
                        location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                        if (location != null) {
                            Log.d("GPSlatitude", location.getLatitude() + "");
                            Log.d("GPSlongitude", location.getLongitude() + "");
                            latitude = location.getLatitude();
                            longitude = location.getLongitude();
                            locationUpdate(location);
                        }
                    }
                }
    
    
            }
    
        }
    
        private class TimertoGetLocation extends TimerTask {
            @Override
            public void run() {
                mHandler.post(new Runnable() {
                    @Override
                    public void run() {
                        getLocationLattitudeLongitude();
                    }
                });
            }
        }
    
        private void locationUpdate(Location location) {
            intent.putExtra("latutide", location.getLatitude() + "");
            intent.putExtra("longitude", location.getLongitude() + "");
            intent.putExtra("gps_status", location.getLongitude() + "");
            sendBroadcast(intent);
        }
    }

     

    MainActivity.java

    import android.Manifest;
    import android.app.Activity;
    import android.app.AlertDialog;
    import android.content.BroadcastReceiver;
    import android.content.Context;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.content.IntentFilter;
    import android.content.SharedPreferences;
    import android.content.pm.PackageManager;
    import android.location.Address;
    import android.location.Geocoder;
    import android.location.LocationManager;
    import android.preference.PreferenceManager;
    import android.provider.Settings;
    import android.support.v4.app.ActivityCompat;
    import android.support.v4.content.ContextCompat;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.View;
    import android.widget.Button;
    import android.widget.TextView;
    import android.widget.Toast;
    
    import java.io.IOException;
    import java.util.List;
    import java.util.Locale;
    
    public class MainActivity extends Activity {
        Button btn_start, btn_stop;
        private static final int REQUEST_PERMISSIONS = 100;
        boolean boolean_permission;
        TextView tv_latitude, tv_longitude, tv_address, tv_area, tv_locality;
        SharedPreferences mPref;
        SharedPreferences.Editor medit;
        Double latitude, longitude;
        Geocoder geocoder;
        Activity mActivity;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            btn_start = (Button) findViewById(R.id.btn_start);
            btn_stop = (Button) findViewById(R.id.btn_stop);
    
            tv_address = (TextView) findViewById(R.id.tv_address);
            tv_latitude = (TextView) findViewById(R.id.tv_latitude);
            tv_longitude = (TextView) findViewById(R.id.tv_longitude);
            tv_area = (TextView) findViewById(R.id.tv_area);
            tv_locality = (TextView) findViewById(R.id.tv_locality);
            geocoder = new Geocoder(this, Locale.getDefault());
            mPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
            medit = mPref.edit();
            mActivity = MainActivity.this;
            final Intent intent = new Intent(mActivity, LocationService.class);
            if (mPref.getString("service", "").matches("service")) {
                medit.putString("service", "").commit();
                stopService(intent);
            }
            btn_start.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
    
                    if (!checkLocation()) {
                        if (mPref.getString("service", "").matches("")) {
                            medit.putString("service", "service").commit();
                            startService(intent);
                            setButtonfun();
                        } else {
                            Toast.makeText(getApplicationContext(), "Service is already running", Toast.LENGTH_SHORT).show();
                        }
                    } else {
                        Toast.makeText(getApplicationContext(), "Please enable the gps ", Toast.LENGTH_SHORT).show();
                    }
                }
            });
            btn_stop.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    medit.putString("service", "").commit();
                    stopService(intent);
                    setButtonfun();
                }
            });
    
            setButtonfun();
        }
    
        void setButtonfun() {
            fn_permission();
            if (mPref.getString("service", "").matches("")) {
                btn_start.setVisibility(View.VISIBLE);
                btn_stop.setVisibility(View.GONE);
            } else {
                btn_start.setVisibility(View.GONE);
                btn_stop.setVisibility(View.VISIBLE);
            }
        }
    
        private void fn_permission() {
            Log.d("CheckPermission", "Entered");
            if ((ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) && (ContextCompat.checkSelfPermission(mActivity, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
                ActivityCompat.requestPermissions(mActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_PERMISSIONS);
                Log.d("CheckPermission", "Exiting " + boolean_permission);
                return;
            }
    
        }
    
        @Override
        public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
            super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    
            switch (requestCode) {
                case REQUEST_PERMISSIONS: {
                    if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                        boolean_permission = true;
    
                    } else {
                        Toast.makeText(getApplicationContext(), "Please allow the permission", Toast.LENGTH_LONG).show();
    
                    }
                }
            }
        }
    
        private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                latitude = Double.valueOf(intent.getStringExtra("latutide"));
                longitude = Double.valueOf(intent.getStringExtra("longitude"));
                Geocoder geocoder;
                List<Address> addresses;
                geocoder = new Geocoder(mActivity, Locale.getDefault());
                try {
                    addresses = geocoder.getFromLocation(latitude, longitude, 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5
    
                    String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()
                    String city = addresses.get(0).getLocality();
                    String state = addresses.get(0).getAdminArea();
                    String country = addresses.get(0).getCountryName();
                    String postalCode = addresses.get(0).getPostalCode();
                    String knownName = addresses.get(0).getFeatureName();
                    tv_area.setText(addresses.get(0).getAdminArea());
                    tv_locality.setText(knownName + ", " + city + ", " + state + ", " + country + "-" + postalCode);
                    tv_address.setText(address);
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
                tv_latitude.setText("latitude: " + latitude);
                tv_longitude.setText("longitude: " + longitude);
                tv_address.getText();
            }
        };
    
        @Override
        protected void onResume() {
            super.onResume();
            registerReceiver(broadcastReceiver, new IntentFilter(LocationService.str_receiver));
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            unregisterReceiver(broadcastReceiver);
        }
    
    
        boolean checkLocation() {
            LocationManager lm = (LocationManager) mActivity.getSystemService(Context.LOCATION_SERVICE);
            boolean gps_enabled = false;
            boolean network_enabled = false;
    
            try {
                gps_enabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
    
            try {
                network_enabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            boolean locationCheck = !gps_enabled && !network_enabled;
            Log.d("CheckPermissionLo", "" + locationCheck);
            if (locationCheck) {
                // notify user
                new AlertDialog.Builder(mActivity).setTitle("Device GPS is disabled.")
                        .setMessage("Please enable it now.").setCancelable(false)
                        .setPositiveButton("Enable", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface paramDialogInterface, int paramInt) {
                                mActivity.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
                            }
                        })
                        .setNegativeButton("Cancel", null)
                        .show();
            }
            return locationCheck;
        }
    }
  • alex levine QnA

    I am trying to use this However that gives me error .

    I am getting a list of mobile numbers from the phone book, But I need to show mobile and country code split. 
    how to split phone number and area code in android?

  • alex levine QnA

    I am trying to use this However that gives me error .

    I want to use web services which has some headers and body parameters, for now, I am using AsyncTask which is working quite easy and trusted lib. so why we need to Volley, what is actually Volley lib How to use it?
    Image result for android volley

  • alex levine QnA

    I am trying to use this However that gives me error .

    How to integrate Free OTP service which will help us to verify valid mobile number?
    How to login with Mobile Number Firebase?
    Authenticate with Firebase with a Phone Number and get OTP to verify valid mobile number.

     

  • alex levine QnA

    I am trying to use this However that gives me error .

    I am tring to integrate Flutter map from lib 

    google_maps_flutter:

    it is working fine and showing me map in emulator and real device but when i run project on IOs device it gives me below mentioned error

    *** Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:...] prior to use'

    How to resolve GMSServicesException?

  • alex levine QnA

    alex levine started a new conversation How to change URL without reload the Website 4 months ago ago

    I am trying to use this However that gives me error .

    I have multiple users on the same page and there is some commen data for all customers when i click on any user only some part of webpage change and url change but Web Page should not refresh on click.

  • alex levine QnA

    alex levine started a new conversation Flutter Switch widget does not working fine 4 months ago ago

    I am trying to use this However that gives me error .

    Flutter Switch widget does not working fine, i am using switch widget for yes and no options but in flutter i am not able to change swtich button state. when i drag dot left to right only then it is changeing but i want to switch on click event. 

    Switch(
              value: false,
              onChanged: (bool val) {},
            ),

    also switch doesnt have anything to show my Text.

    whats wrong i am doing here?

  • alex levine QnA

    I am trying to use this However that gives me error .

    I have created New React Native Project and start using Props it gives me Error Unable to load script from assets index.android.bundle I resolve this error but after resolving this error I got a new issue about Module HMRClient is not a registered callable module Why this error is raised before the props my project was working fine. How can resolve this issue?

  • alex levine QnA

    I am trying to use this However that gives me error .

    I want to implement Facebook Login with Firebase Authentication using facebook login in android. I am trying to implement facebook Login but not getting any easy documentation and elaboration tutorial.

    Please share Firebase Authentication using facebook login in android tutorial or sample Project

  • alex levine QnA

    I am trying to use this However that gives me error .

    I am learning React Native app, Working on a Live Location Sharing App for Android and Ios Mobile Application. Where I 

    want to show MapView to show geoLocation of mine (User). like below MapView Screen.

    Get Current Location using React Native MapView

    and show Marker of the location where user locate.

    Get Current Location and Map Centered on Current Location with a Marker.

     

     

  • alex levine QnA

    alex levine started a new conversation "localhost phpmyadmin " unable to connect 6 months ago ago

    I am trying to use this However that gives me error .

    After installing a local XAMPP server and trying to connect phpMyAdmin it is giving me Error. Unable to connect Localhost Phpmyadmin.and showing me white page with the link localhost/phpmyadmin/

    and sometimes gives me error

    Object not found!
    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
    If you think this is a server error, please contact the webmaster. Error 404 localhost  Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8
  • alex levine QnA

    I am trying to use this However that gives me error .

    I have download Project from GitHub to check some functionality and when I open Android Project  in Android Studio it gives me Error

    no toolchains found in the ndk toolchains folder for abi with prefix mips64el-linux-android

    I have updated everything as required

    and Already installed NDK in SDK but Still showing this issue. I have download another Project to check issue is in My Side or In the project but that project also gives the same.

    What is the issue in Android studio for that it is raising No toolchains Folder not found Error?

  • alex levine QnA

    I am trying to use this However that gives me error .

    I have created React Native project by npm install -g create-react-native-app to import project 

    it imports many packages and at the end shows Expo QR code I don't want to run React native app in Expo I need to execute it as the Native app so I exit from npm run eject and it ask to me for How would you like to eject from create-react-native-app? React Native: I'd like a regular React Native project. after all this, I have successfully exited from running npm Now I have the project with android and ios folder too.

    To Run Hello World React Native 

    npm run android

    These are the version of my Needed Libs which is using in the React Native App Development

    Node -v
    v8.11.2

    npm -v
    6.4.1

    react-native -v
    react-native-cli: 2.0.1
    react-native: 0.55.4

     

    ERROR: 

    warning: string 'catalyst_debugjs' has no default translation.
    warning: string 'catalyst_element_inspector' has no default translation.
    warning: string 'catalyst_jsload_error' has no default translation.
    warning: string 'catalyst_jsload_message' has no default translation.
    warning: string 'catalyst_jsload_title' has no default translation.
    warning: string 'catalyst_reloadjs' has no default translation.
    warning: string 'catalyst_settings' has no default translation.
    warning: string 'catalyst_settings_title' has no default translation.

    :app:generateDebugSources
    :app:incrementalDebugJavaCompilationSafeguard
    :app:compileDebugJavaWithJavac
    :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:5: error: cannot find symbol
    import com.facebook.react.ReactApplication;
                             ^
      symbol:   class ReactApplication
      location: package com.facebook.react
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:6: error: cannot find symbol
    import com.facebook.react.ReactNativeHost;
                             ^
      symbol:   class ReactNativeHost
      location: package com.facebook.react
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:14: error: cannot find symbol
    public class MainApplication extends Application implements ReactApplication {
                                                                ^
      symbol: class ReactApplication
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:16: error: cannot find symbol
      private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                    ^
      symbol:   class ReactNativeHost
      location: class MainApplication
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:36: error: cannot find symbol
      public ReactNativeHost getReactNativeHost() {
             ^
      symbol:   class ReactNativeHost
      location: class MainApplication
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainActivity.java:5: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActivity
    public class MainActivity extends ReactActivity {
           ^
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:16: error: cannot find symbol
      private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                                                           ^
      symbol:   class ReactNativeHost
      location: class MainApplication
    C:\ReactNative\PROJECTFOLDER\android\app\src\main\java\com\appName\MainApplication.java:35: error: method does not override or implement a method from a supertype
      @Override
      ^
    8 errors
    :app:compileDebugJavaWithJavac FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 1 mins 3.452 secs
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/getting-started.html

  • alex levine QnA

    alex levine started a new conversation What do we get in Android Wear SDK? 7 months ago ago

    I am trying to use this However that gives me error .

    What we have in our Wear SDK to develop? How Android Wear Os is different than our Android Mobile Application?

    What new Features are introduce in Wear SDK?

  • alex levine QnA

    alex levine started a new conversation Why we need Android Wear Platform? 7 months ago ago

    I am trying to use this However that gives me error .

    We already have a mobile smartphone then why we needed any other smart device like an Android watch?

    Everything can we do on our Smart mobile and they are much cheap then Android Wear Device then why Google Launch Android Wear?

  • alex levine QnA

    I am trying to use this However that gives me error .

    I have searched for the easy way to earn Money without any investing just with my Website and Android Mobile App then I heard about Flipkart Affiliate Marketing How can I create flipkart affiliate login in it and how to use this program in my website and earn money. i have some flipkart information like i can Download Flipkart app or login on Flipkart you will get a link post that link everywhere who will purchase by the your affiliate Flipkart URL you got commission.

  • alex levine QnA

    alex levine started a new conversation How to convert HTML page in Image Format from jquery? 8 months ago ago

    I am trying to use this However that gives me error .

    Every i have to create a Image from Photoshop and set all value what clients website earn then i sent to client.

    I want any macanisum like at one click download same Html Page as Image and share to my Clients.

    How to convert Html to Image (JPG/JPEG/PNG) any Image format by Jquery or Php?

  • alex levine QnA

    alex levine started a new conversation