Posts

Showing posts from December, 2020

how to check app running in foreground or background in ionic4

   //Subscribe on pause i.e. background         this.platform.pause.subscribe(() => {           //Hello pause           if(localStorage.getItem("LOG_IN") == "YESORANGE") {                 this.loginprofile=  JSON.parse(localStorage.getItem("Loginprofile"));                 this.api.UserLoginStatus({                   loginUserId: this.loginprofile.Id,                   status:"online"                 }).subscribe((res: any) => {                   console.log(res);                 })               }         });            ...

refresh page when page routing to another page and come back to previous page(like tabs page to another page and other page to came back tabs page that time load the page using below code)

import { NavigationEnd, Router } from '@angular/router'; place the below code in ngOnInt() function inside  this.router.events.subscribe((evt) => {       if (!(evt instanceof NavigationEnd)) {         return;       }       console.log('hai')           });

multiple images url path taking in instagram

 single image taking process Instagram image displaying format 1) instagram user needs login 2) Only public post pictures can copy the link address of the image 3) copy the link address of the image and modify the url  for example: https://www.instagram.com/p/CIDarnTHWHV/?utm_source=ig_web_copy_link modify above link  like this:  use parameter after the url image media/?size=l Thumbnail ?size=t Medium ?size=m Large ?size=l https://www.instagram.com/p/CIDarnTHWHV/media/?size=l;  the above link should work through instagram user login. we can modify the above link , logged in user enter url in browser https://www.instagram.com/p/CIDarnTHWHV/media/?size=l above link change the url format like this : https://instagram.fhyd2-1.fna.fbcdn.net/v/t51.2885-15/e35/128017220_2869929233225574_3640516192658627214_n.jpg?_nc_ht=instagram.fhyd2-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=vEkiPLbAZq8AX_7P990&tp=1&oh=3e678f161e50badf8d0083983cec8549&oe=5FC9C64C after we ...