I have a soft-keyboard that dose not expands activity it has one button when I click on that I intent another app perfectly but when I want to get respond from that app which extends activity and has a button, the problem is that when I click that button it gets back to my first app but my first app could not get-intent from that. here is my some part of my soft-keyboard:
public void onKey(int primaryCode, int[] keyCodes) {
if (primaryCode == LatinKeyboardView.KEYCODE_11) // username_paste_button
{
handle_username_paste(); // handle username_paste_button
}
}
private void handle_username_paste() { // handle username_paste_button
try {
// url = (EditText) findViewById(R.id.urlTextEdit);
String text ="google.com";
Intent i = new Intent(Intent.ACTION_MAIN);
PackageManager manager = getPackageManager();
i = manager.getLaunchIntentForPackage("fake.domain.examplesta");
i.putExtra("URL", text);
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
// startActivityForResult(i, 1);
} catch (Exception e) {
e.printStackTrace();
//Toast.makeText(v.getContext(), "App Not Found", Toast.LENGTH_LONG).show();
}
String name = getIntent().getStringExtra("OTP");
}
have any idea how can I solve this?