I'm working on a project that requires creating a function to extract the IP address of the phone being used. Since this is new territory for me, I'm struggling to find information on how to do this. Could you please provide some guidance on which library or plugin I can use to retrieve the IP address of my device?
import * as application from 'application';
import { android } from "application";
var context = application.android.context;
var wifiMgr = context.getSystemService("wifi");
var wifiInfo = wifiMgr.getConnectionInfo();
var ip = wifiInfo.getIpAddress();
console.log('android.context',android.context)
var ipAddress = android.context.format.Formatter.formatIpAddress(ip);
The issue is with the Formatter being Undefined.