Mi modelo:
public class model_Frio {
String tarima,grados;
public String getTarima() {
return tarima;
}
public void setTarima(String tarima) {
this.tarima = tarima;
}
public String getGrados() {
return grados;
}
public void setGrados(String grados) {
this.grados = grados;
}
}
Activity de guardar:
model_Frio model_frio;
model_frio = new model_Frio();
model_frio.setGrados(grados.getText().toString());
Mi problema es que el activity que guarda esa información necesito cerrarlo para desde otro activity recoger esa información:
model_Frio model_frio;
model_frio = new model_Frio();
Log.d("datos>",model_frio.getgrados());
Pero recibo el siguiente error:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: desarrolladoresalpha.adminempaq, PID: 18129
java.lang.RuntimeException: Unable to start activity ComponentInfo{desarrolladoresalpha.adminempaq/desarrolladoresalpha.adminempaq.Tarimas_App}: java.lang.NullPointerException: println needs a message
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2193)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5019)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException: println needs a message
at android.util.Log.println_native(Native Method)
at android.util.Log.d(Log.java:139)
at desarrolladoresalpha.adminempaq.Tarimas_App.onCreate(Tarimas_App.java:33)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5019)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)