Good Day,
I have 2 mobile applications.
- Application 1
- Application 2
What we are trying to achieve is to open an activity (mobile window) in Application 2 from Application 1 using Java code.
I made a test application in android studio and successfully achieve doing that with a few lines of code.
I am now trying to use that java code in my windev mobile application but im getting an error on compile :
- error: cannot find symbol startActivity(launchIntent);
We have tried adding all the necessary imports but still no luck.
My java code :
import android.content.ComponentName;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public static void BTN_Open_Application_B()
{
Intent launchIntent = new Intent();
launchIntent.setComponent(new ComponentName("com.example.myapplicationb", "com.example.myapplicationb.MyExampleActivity1"));
if (launchIntent != null) {
Toast.makeText(getApplicationContext(), " opening application b", Toast.LENGTH_SHORT).show();
startActivity(launchIntent);
} else {
Toast.makeText(getApplicationContext(), " launch Intent not available", Toast.LENGTH_SHORT).show();
}
}
Help would be greatly appreciated.
Thanks