Asked  4 Months ago    Answers:  5   Viewed   330 times

I face this problem in two android projects . In one i was trying to retrieve data from Firebase into Recyclerview and in onother i was trying to login using phone number but in both cases logcat is showing V/FA:

 Inactivity, disconnecting from the service

 Answers

91

Inactivity, disconnecting from the service

You Need to follow few steps to remove this problem. Reason: You face this problem because in the background there are few-thread and the process is running in the android studio which uses the connection of firebase and your process not get the connection.

Steps:

  1. Uninstall the app from your mobile/emulator.
  2. Then go to the File option in the main menubar in the android studio.
  3. Then click on Invalidatecasha/restart.

It takes few mints and restarts you android studio and that error is gone. Because all the backend thread and process are closed.

Happy Coding.

Saturday, July 3, 2021
 
huhushow
answered 4 Months ago
55

Since Sessions in Laravel5 are initiated in the middleware stack you should create your own middleware and place it in the $middleware array in Kernel.php. This is a sample middleware:

class myMiddleware {
    public function handle($request, Closure $next) {

       $themeName = Session::get('themeName', 'NONE');

          if(Theme::exists($themeName))
              Theme::set($themeName);

           return $next($request);
       }

   }

your routes.php could be something like:

Route::get('setTheme/{themeName}', function($themeName){
    Session::put('themeName', $themeName);
    return Redirect::to('/');
});

Route::get('/', function() {
    return Theme::get();  // display your views here....
});

Note that you have to pull the latest version (v1.0.4) for this to work

Saturday, May 29, 2021
 
THEK
answered 5 Months ago
65

Define a behavior in your .config file:

<configuration>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="debug">
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    ...
  </system.serviceModel>
</configuration>

Then apply the behavior to your service along these lines:

<configuration>
  <system.serviceModel>
    ...
    <services>
      <service name="MyServiceName" behaviorConfiguration="debug" />
    </services>
  </system.serviceModel>
</configuration>

You can also set it programmatically. See this question.

Thursday, June 3, 2021
 
Juriy
answered 5 Months ago
74

I think you are using your phone as a emulator. So, on your phone,

  1. Go to your Google Play Services.
  2. Open its App Info.
  3. Clear the Data and Cache.

path: --> (Settings > Apps > Google Play services > Storage > Manage Space > Clear All Data).

open the app after few minutes.

Wednesday, August 11, 2021
 
qitch
answered 2 Months ago
98

It is not possible to obtain a profile picture from Firebase that is larger than the one provided by getPhotoUrl(). However, the Facebook graph makes it pretty simple to get a user's profile picture in any size you want, as long as you have the user's Facebook ID.

String facebookUserId = "";
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
ImageView profilePicture = (ImageView) findViewById(R.id.image_profile_picture);

// find the Facebook profile and get the user's id
for(UserInfo profile : user.getProviderData()) {
    // check if the provider id matches "facebook.com"    
    if(FacebookAuthProvider.PROVIDER_ID.equals(profile.getProviderId())) {
        facebookUserId = profile.getUid();
    }
}

// construct the URL to the profile picture, with a custom height
// alternatively, use '?type=small|medium|large' instead of ?height=
String photoUrl = "https://graph.facebook.com/" + facebookUserId + "/picture?height=500";

// (optional) use Picasso to download and show to image
Picasso.with(this).load(photoUrl).into(profilePicture);
Saturday, September 4, 2021
 
Ali
answered 2 Months ago
Ali
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :  
Share