Skip to content

Instantly share code, notes, and snippets.

View Elblassy's full-sized avatar
🏠
Working from home

Muhammad Elblasy Elblassy

🏠
Working from home
View GitHub Profile
private Socket mSocket;
{
try {
mSocket = IO.socket("yourLinkToSocket");
Log.d(TAG, "instance initializer: correct");
} catch (URISyntaxException e) {
Log.d(TAG, "instance initializer: " + e.getMessage());
}
private fun openWhatsApp(fileName: String) {
val smsNumber = mobileNumber
val isWhatsappInstalled = "com.whatsapp".whatsappInstalledOrNot()
if (isWhatsappInstalled) {
val sendIntent = Intent(Intent.ACTION_SEND)
val outputFile = File(
requireContext().getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS),
fileName
)