I have seen many examples with
startActivityForResult(Intent, int)
and then using
onActivityResult(int, int, Intent)
but for me I dont need to pass anything, I simply want to startActivity(intent), and when intent activity returns, a method get called in main activity..
Any tutorial on doing this?
EDIT:
Here a sample code:
public void onCreate(Bundle savedInstanceState) {
super.onCrea
I have two activities:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void click(View view) {
Intent intent= new Intent(this, TranslucentActivity.class);
startActivity(intent);
}
}
public class TranslucentActivity extends Activity
In my application, I have created a notification feature through which Activity_1 gets called.
How do I add a rectangular overlay (which should be more like a rectangular frame) in the camera preview? My application consists of a button that opens the camera upon clicking.
My app keeps crashing when I start the Camera class.
package com.example.tutorial;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
public class Camera extends Activity implements View.OnClickListener {
Button photoTaken, setWall;
Image
Here is my WallePapeAuto.java code:
package com.demo.wallpaper;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
public class WallePapeAuto extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = new Intent(WalleP
I have a button that links to another activity, when I click on it it goes to the layout.xml I want it to
This is the java file for the main/first screen
Button button;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
addListenerOnButton();
}
public void addListenerOnButton() {
final Context context
what are the reasons that would affect my intent not to load the next activity i've fixed my manifest the intent is correct the button is okey and the activity is good basically i don't have any errors or i don't see any can anyone clear this things for me i need help..this is my intent if you would like to check it
final Intent intent = new Intent();
intent.setClass(MainActivity.this
Is there a way to add the option to start camera and upload image from it in a webview.
See my entire code here. Below is the code block that allows to open a dialog box to upload image from gallery.