Life-cycle of App sent to EPD screen in Yotaphone Marshmallow - YotaPhone

Hi, could anyone tell me what happens in the life-cycle of a running App when you send it to the epd screen e.g pause / stop / kill etc?
I'm testing a beta version of an App: on marshmallow (RU1.1.47 on a YD201) it loses its state when sent to the epd screen (so populated fields in the display become empty, frames lose their titles etc).
On the other hand, there's no loss of state when the screen is switched off and on, or if you switch to a different app and then resume again, or if you go to the home screen and execute standard lollipop style yotaphone mirroring from there.
The developer doesn't have a yotaphone, so can't recreate the problem; but I'm hoping that if the sequence of lifecycle steps were known it might shed some light on why / where the problem is happening or what the requirements are to enable this to work. [The app is a project text editor with multiple frames and which uses GDrive for file storage.]
Thanks for reading. any answers would be really appreciated.

Here are some logs for you
Hi,
Interesting question, so I made a little app to check. As I suspected it starts a new process.
So the only solution is start mirroring mode instead of sending the app to the back screen. (You can do this by first going home and then pressing mirror button, or by pressing the mirror button from the epd screen)
My app logs all the onstart, pause, stop, destroy.... to debug logcat with tage ACTIVITY_LIFECYCLE. I ran it, then switched to back and then switched to front again.
in the manifest, I made sure the activity handles all the configchanges that I could find:
Code:
android:configChanges="uiMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen">
The debug apk, mainactivity and manifest files are attached.
Here is the log of the most important method calls
Code:
07-24 16:11:06.018 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:06.021 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:11:19.443 4404-4404/? D/ACTIVITY_LIFECYLE: onPause
07-24 16:11:19.464 4404-4404/? D/ACTIVITY_LIFECYLE: onSaveInstanceState(Bundle outState)
SWITCH TO BACK: New process
07-24 16:11:21.010 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:21.011 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:21.028 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
SWITCH TO FRONT: New process
07-24 16:13:15.242 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:13:15.243 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:13:15.273 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onPause
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
Here is an extended version with more methods:
Code:
07-24 16:11:05.901 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: theme, resid, first
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.924 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:06.014 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onContentChanged()
07-24 16:11:06.018 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:06.021 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:06.021 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: title, color
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState)
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:11:06.049 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onAttachedToWindow()
07-24 16:11:06.176 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, menu
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreateOptionsMenu(menu)
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:11:06.182 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)
07-24 16:11:19.443 4404-4404/? D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)
07-24 16:11:19.443 4404-4404/? D/ACTIVITY_LIFECYLE: onPause
07-24 16:11:19.456 4404-4404/? D/ACTIVITY_LIFECYLE_EXTRA: onCreateDescription()
07-24 16:11:19.464 4404-4404/? D/ACTIVITY_LIFECYLE: onSaveInstanceState(Bundle outState)
07-24 16:11:19.464 4404-4404/? D/ACTIVITY_LIFECYLE_EXTRA: onCreateDescription()
SWITCH TO BACK: New process
07-24 16:11:20.817 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: theme, resid, first
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.847 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:21.008 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onContentChanged()
07-24 16:11:21.010 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:21.011 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:21.016 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:11:21.020 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, menu
07-24 16:11:21.022 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreateOptionsMenu(menu)
07-24 16:11:21.022 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:11:21.022 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:11:21.027 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:11:21.027 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:11:21.027 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:11:21.028 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:11:21.028 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: title, color
07-24 16:11:21.032 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState)
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:11:21.050 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onEnterAnimationComplete()
07-24 16:11:21.051 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onAttachedToWindow()
07-24 16:11:21.154 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)
SWITCH TO FRONT: New process
07-24 16:13:15.133 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: theme, resid, first
07-24 16:13:15.148 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.148 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.149 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.149 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.157 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.238 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onContentChanged()
07-24 16:13:15.242 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:13:15.243 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:13:15.244 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, menu
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreateOptionsMenu(menu)
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: title, color
07-24 16:13:15.251 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState)
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:13:15.273 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onPause
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:13:15.276 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onAttachedToWindow()
07-24 16:13:15.377 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)

Related

[Q] How to create youtube start/stop function for video recording function? HELP!

Is there a way to get the entire surfaceView screen to function like a button which start/atop a video recording process whenever it sees fit by the user? The function is somewhat similar to youTube's start/stop play function but instead this time it is used to start/stop the video recording process.
Is the code suppose to be coded in the .xml file or my .java file to accomplish the task? Sorry i'm rather new to android/java and given only 6 more weeks to finish this assignment by my lecturer to complete an app which act like a car blackbox yet i'm a total beginner in programming... Any help would be appreciated... Thanks in advance...
This is what i tried so far, can someone guide me i'm really in a desperate situation, PLEASE HELP ME :'(
Code:
public class CameraTest extends Activity implements SurfaceHolder.Callback {
private static final String TAG = "Exception";
public static SurfaceView surfaceView;
public static SurfaceHolder surfaceHolder;
public static Camera camera;
public static boolean previewRunning;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
surfaceView = (SurfaceView)findViewById(R.id.surface_camera);
surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);
surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
Button btnStart = (Button) findViewById(R.id.button4);
btnStart.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startService(new Intent(getApplicationContext(), ServiceRecording.class));
}
});
Button btnStop = (Button) findViewById(R.id.button5);
btnStop.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
stopService(new Intent(getApplicationContext(), ServiceRecording.class));
}
});
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
camera = Camera.open();
if (camera != null) {
Camera.Parameters params = camera.getParameters();
camera.setParameters(params);
}
else {
Toast.makeText(getApplicationContext(), "Camera not available!", Toast.LENGTH_LONG).show();
finish();
}
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
if (previewRunning) {
camera.stopPreview();
}
Camera.Parameters p = camera.getParameters();
p.setPreviewSize(320, 240);
p.setPreviewFormat(PixelFormat.JPEG);
camera.setParameters(p);
try {
camera.setPreviewDisplay(holder);
camera.startPreview();
previewRunning = true;
}
catch (IOException e) {
Log.e(TAG,e.getMessage());
e.printStackTrace();
}
}
@Override
public void onResume(){
super.onResume();
}
@Override
public void surfaceDestroyed(SurfaceHolder holder){
camera.stopPreview();
previewRunning = false;
camera.release();
}
}
My serviceRecording.java file
Code:
public class ServiceRecording extends Service {
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return null;
}
private SurfaceView surfaceView;
private SurfaceHolder surfaceHolder;
public static Camera ServiceCamera;
private boolean RecordingStatus;
private MediaRecorder mediaRecorder;
private final int maxDurationInMs = 20000;
private static final String TAG = "Exception";
@Override
public void onCreate() {
super.onCreate();
RecordingStatus = false;
ServiceCamera = CameraTest.MainCamera;
surfaceView = CameraTest.surfaceView;
surfaceHolder = CameraTest.surfaceHolder;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
if (RecordingStatus == false)
startRecording();
return START_STICKY;
}
@Override
public void onDestroy() {
super.onDestroy();
stopRecording();
RecordingStatus = false;
}
public boolean startRecording(){
try {
Toast.makeText(getBaseContext(), "Recording Started", Toast.LENGTH_SHORT).show();
try{
ServiceCamera.unlock();
}
catch(Exception e){
ServiceCamera.reconnect();
}
mediaRecorder = new MediaRecorder();
mediaRecorder.setCamera(ServiceCamera);
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mediaRecorder.setMaxDuration(maxDurationInMs);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
//mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH_mm_ss");
Date date = new Date();
File directory = new File(Environment.getExternalStorageDirectory() + "/VideoList");
if(!(directory.exists()))
directory.mkdir();
File FileSaved = new File(Environment.getExternalStorageDirectory() + "/VideoList", dateFormat.format(date) + ".3gp");
mediaRecorder.setOutputFile(FileSaved.getPath());
mediaRecorder.setVideoSize(surfaceView.getWidth(),surfaceView.getHeight());
//mediaRecorder.setVideoFrameRate(videoFramesPerSecond);
mediaRecorder.setPreviewDisplay(surfaceHolder.getSurface());
mediaRecorder.prepare();
mediaRecorder.start();
RecordingStatus = true;
return true;
}
catch (IllegalStateException e) {
Log.d(TAG,e.getMessage());
e.printStackTrace();
return false;
}
catch (IOException e) {
Log.d(TAG,e.getMessage());
e.printStackTrace();
return false;
}
}
public void stopRecording() {
Toast.makeText(getBaseContext(), "Recording Stopped", Toast.LENGTH_SHORT).show();
mediaRecorder.stop();
try {
ServiceCamera.reconnect();
} catch (IOException e) {
e.printStackTrace();
}
RecordingStatus = false;
}
}
My .xml file
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/frameLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_height="match_parent"
android:layout_width="match_parent">
<Button
android:text="Video"
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
></Button>
<Button
android:text="Setting"
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button1"
></Button>
<Button
android:text="Back"
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
></Button>
<Button
android:text="Start"
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button3"
></Button>
<Button
android:text="Stop"
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button4"
></Button>
<SurfaceView
android:id="@+id/surface_camera"
android:layout_width="480dp"
android:layout_height="320dp"
android:layout_toRightOf="@+id/button2"
></SurfaceView>
<TextView
android:text="TextView"
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/button2"
></TextView>
<TextView
android:text="TextView"
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
></TextView>
<TextView
android:text="TextView"
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
></TextView>
</RelativeLayout>
</FrameLayout>
someone answer me please, i really need your guys help...
why isn't someone answering is my question so unwelcoming?
Haiz can anyone help me, i really need some guidance and help here...
You want to
Code:
implement OnClickListener
add method
Code:
onClick(View v)
then you want to add
Code:
surfaceView.setOnClickListener(this);
When surface is clicked onClick is called
By any chance could you explain how should i implement the above said functions into my codes because like implement onclicklistener and this and that i don't quite understand where should i place these above codes??
And how should this above function handle my startService and stopService intents? Will the surfaceview also the show the same invisible button effects seen in youtube too when being clicked? Could you guide me in this in much more details, sorry if i'm kinna stupid to understand your explanations...
Ok
CameraTest.java
Add
Code:
public void onClick(View v){
}
Replace
Code:
public class CameraTest extends Activity implements SurfaceHolder.Callback {
with
Code:
public class CameraTest extends Activity implements SurfaceHolder.Callback, OnClickListener {
After
Code:
surfaceView = (SurfaceView)findViewById(R.id.surface_camera);
Add
Code:
surfaceView.setOnClickListener(this);
how should this above function handle my startService and stopService intents?
Click to expand...
Click to collapse
Your intent function calls the CameraTest.surfaceView so everything will work with whatever code you put in the onClick function.
Will the surfaceview also the show the same invisible button effects seen in youtube too when being clicked?
Click to expand...
Click to collapse
Need better explanation on what you are asking.
The last part is probably like how when you tap a YouTube video on the video itself it kinda flashes the play or pause button over the video.
Sent from my MIUI SCH-i500
Which of these should i import?
Code:
import android.content.DialogInterface.OnClickListener;
import android.view.View.OnClickListener;
Should i put startService and stopService intent together, but it seems not appropriate as both statement seems to conflict each other when i click to start/stop my service? Or i need add some sort of if.. else logic statement to differentiate the start/stop service alternating when being clicked?
Code:
public void onClick(View v){
startService(new Intent(getApplicationContext(), ServiceRecording.class));
startService(new Intent(getApplicationContext(), ServiceRecording.class));
}
Yes that was what i meant for the last part of my question the sort of effect it will display when being clicked, sorry if i could not explain well which might cause you some confusion.. Thanks for your help
Or should i be implementing some sort of imagebutton to emulate the above effect i mention or is there some other way to do it?
Can someone answer me??
Can someone please guide me on my above problem to get the result similar to what was like youtube??

[Q] What are the types of video encoding/resolution available for android?

Could someone name me the various types of video encoding/resolution type available for encoding/resolution video recording purposes in android? Like mp4, etc...
Now that i think of it is it possible for me to retrieve my phone's camera resolution for user to use for preferences purposes? Does it have to do with flatten something thingy, i'm not quite sure what its called..
If so how should i retrieve a particular phone's resolution for ListPreference?? Can someone guide me on this?
This is the java file that performs the recording process
Code:
public class ServiceRecording extends Service {
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return null;
}
private SurfaceView surfaceView;
private SurfaceHolder surfaceHolder;
public static Camera ServiceCamera;
public static boolean recordingStatus;
@Override
public void onCreate() {
super.onCreate();
recordingStatus = false;
ServiceCamera = CameraTest.MainCamera;
surfaceView = CameraTest.surfaceView;
surfaceHolder = CameraTest.surfaceHolder;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
if (recordingStatus == false)
startRecording();
return START_STICKY;
}
@Override
public void onDestroy() {
super.onDestroy();
stopRecording();
//camera.stopPreview();
recordingStatus = false;
//camera.release();
}
private MediaRecorder mediaRecorder;
private final int maxDurationInMs = 20000;
private static final String TAG = "Exception";
public boolean startRecording(){
try {
Toast.makeText(getBaseContext(), "Recording Started", Toast.LENGTH_SHORT).show();
try{
ServiceCamera.reconnect();
ServiceCamera.unlock();
}
catch(Exception e){
}
mediaRecorder = new MediaRecorder();
mediaRecorder.setCamera(ServiceCamera);
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mediaRecorder.setMaxDuration(maxDurationInMs);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
//mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH_mm_ss");
Date date = new Date();
File dirlist = new File(Environment.getExternalStorageDirectory() + "/VideoList");
if(!(dirlist.exists()))
dirlist.mkdir();
File TempFile = new File(Environment.getExternalStorageDirectory() + "/VideoList", dateFormat.format(date) + ".3gp");
mediaRecorder.setOutputFile(TempFile.getPath());
mediaRecorder.setVideoSize(surfaceView.getWidth(),surfaceView.getHeight());
//mediaRecorder.setVideoFrameRate(videoFramesPerSecond);
mediaRecorder.setPreviewDisplay(surfaceHolder.getSurface());
mediaRecorder.prepare();
mediaRecorder.start();
recordingStatus = true;
return true;
}
catch (IllegalStateException e) {
Log.d(TAG,e.getMessage());
e.printStackTrace();
return false;
}
catch (IOException e) {
Log.d(TAG,e.getMessage());
e.printStackTrace();
return false;
}
}
public void stopRecording() {
Toast.makeText(getBaseContext(), "Recording Stopped", Toast.LENGTH_SHORT).show();
mediaRecorder.reset();
mediaRecorder.release();
recordingStatus = false;
}
}
My Tab1Activity.java file which initialized the preference but how am i going to allow the storage of user data for configuring the camera setting
Code:
[CODE]public class Tab1Activity extends PreferenceActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.tab1);
}
}
[/CODE]
This is the xml file which uses preferences but i'm kinna face with the problem on how am i going to retrieve the available phone resolution to allow the user to configure at the ListPreference area..
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Video">
<CheckBoxPreference
android:title="Audio"
android:defaultValue="True"
android:summary="Select w/o Audio"
android:key="AudioPref" />
<ListPreference
android:title="Video Encoder"
android:summary="Select the video encoding type"
android:key="EncodingPref"
android:defaultValue="3gp"
android:entries="@array/EncodingType"
android:entryValues="@array/updateEncodingType" />
<ListPreference
android:title="Video Resolution"
android:summary="Select the video resolution"
android:key="ResolutionPref"
android:defaultValue="1"
android:entries="@array/VideoResolution"
android:entryValues="@array/updateVideoResolution" />
</PreferenceCategory>
</PreferenceScreen>
Could someone guide me along this??
I'm not really sure what you're asking, nor what the code you've displayed has to do with it.
Have you checked out the CamcorderProfile class?
http://developer.android.com/reference/android/media/CamcorderProfile.html
Q1. What are the available different forms of video encoding type available in android for user to choose from? Because i'm currently doing a video recording app which i wanted to use ListPreference to allow user to dynamically choose what type of encoding is available.
Q2. I wanted to know is there any easy way to retrieve video resolution on the actual phone? Because different phone has different phone resolution's compatibility, so i wanted to retrieve the resolution data and display the different resolutions dynamically into my ListPreference for user selection... Does it have to do with a method name "flatten()" i don't quite know what is the method... I'm kinna new in java/android, can someone guide me on how should i do that?
My mainActivity.java file
Code:
public class CameraTest extends Activity implements SurfaceHolder.Callback {
private static final String TAG = "Exception";
public static SurfaceView surfaceView;
public static SurfaceHolder surfaceHolder;
public static Camera MainCamera;
private static boolean previewRunning;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
surfaceView = (SurfaceView)findViewById(R.id.surface_camera);
surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);
surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
//getparameters
Button btnStart = (Button) findViewById(R.id.button4);
btnStart.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startService(new Intent(getApplicationContext(), ServiceRecording.class));
}
});
Button btnStop = (Button) findViewById(R.id.button5);
btnStop.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
stopService(new Intent(getApplicationContext(), ServiceRecording.class));
}
});
Button btnSetting = (Button) findViewById(R.id.button2);
btnSetting.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startActivity(new Intent(getApplicationContext(), SettingActivity.class));
}
});
}
public static boolean ServiceStatus;
@Override
public void surfaceCreated(SurfaceHolder holder) {
if(ServiceRecording.recordingStatus)
{
stopService(new Intent(getApplicationContext(), ServiceRecording.class));
try {
Thread.sleep(4000);
}
catch (InterruptedException e) {
e.printStackTrace();
}
MainCamera = ServiceRecording.ServiceCamera;
startService(new Intent(getApplicationContext(), ServiceRecording.class));
}
else{
MainCamera = Camera.open();
if (MainCamera != null) {
Camera.Parameters params = MainCamera.getParameters();
params.setPreviewSize(320, 240);
params.setPreviewFormat(PixelFormat.JPEG);
MainCamera.setParameters(params);
try {
MainCamera.setPreviewDisplay(holder);
}
catch (IOException e)
{
e.printStackTrace();
}
MainCamera.startPreview();
previewRunning = true;
}
else {
Toast.makeText(getApplicationContext(), "Camera not available!", Toast.LENGTH_LONG).show();
finish();
}
}
if (previewRunning) {
MainCamera.stopPreview();
}
/*ServiceStatus = ServiceRecording.recordingStatus;
if(ServiceStatus == true)
{
stopService(new Intent(getApplicationContext(), ServiceRecording.class));
if (MainCamera != null) {
Camera.Parameters params = MainCamera.getParameters();
MainCamera.setParameters(params);
MainCamera.startPreview();
}
}*/
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
}
@Override
public void surfaceDestroyed(SurfaceHolder holder){
MainCamera.stopPreview();
previewRunning = false;
MainCamera.release();
}
}
My Preference.xml file
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Video">
<CheckBoxPreference
android:title="Audio"
android:defaultValue="True"
android:summary="Select w/o Audio"
android:key="AudioPref" />
<ListPreference
android:title="Video Encoder"
android:defaultValue="3gp"
android:summary="Select a video encoding type"
android:key="EncodingPref"
android:entries="@array/EncodingType"
android:entryValues="@array/updateEncodingType"
android:dialogTitle="Video Encoding Formats" />
<ListPreference
android:title="Video Resolution"
android:defaultValue="1"
android:summary="Select the video resolution"
android:key="ResolutionPref"
android:entries="@array/VideoResolution"
android:entryValues="@array/updateVideoResolution"
android:dialogTitle="Video Resolution" />
</PreferenceCategory>
</PreferenceScreen>
Can someone guide on how am i going to obtain my dynamic video resolution for every single phone instead of using the hard-coding xml method into my ListPreferenes??

[Q] How should i extract the appropriate video resolution and use in ListPreference?

I wanted to know is there any easy way to retrieve video resolution on the actual phone? Because different phone has different phone resolution's compatibility, so i wanted to retrieve the phone's resolution string data and display the different resolutions dynamically into my ListPreference for user selection...
Does it have to do with extracting the string from log.d, substituting the appropriate resolution values and populate into my ListPreference, does it have to do with some Split method? If so how should i do it i'm a newbie in java/android can someone guide me on how should i do that?
Code:
MainCamera.getParameters().get("preview-size-values");
Log.d("ServiceCamera", MainCamera.getParameters().flatten());
My MainActivity.java file
Code:
public class CameraTest extends Activity implements SurfaceHolder.Callback {
public static SurfaceView surfaceView;
public static SurfaceHolder surfaceHolder;
public static Camera MainCamera;
private static boolean previewRunning;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
surfaceView = (SurfaceView)findViewById(R.id.surface_camera);
surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);
surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
Button btnStart = (Button) findViewById(R.id.button4);
btnStart.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startService(new Intent(getApplicationContext(), ServiceRecording.class));
MainCamera.getParameters().get("preview-size-values");
Log.d("ServiceCamera", MainCamera.getParameters().flatten());
}
});
Button btnStop = (Button) findViewById(R.id.button5);
btnStop.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
stopService(new Intent(getApplicationContext(), ServiceRecording.class));
}
});
Button btnSetting = (Button) findViewById(R.id.button2);
btnSetting.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startActivity(new Intent(getApplicationContext(), SettingActivity.class));
}
});
}
public static boolean ServiceStatus;
@Override
public void surfaceCreated(SurfaceHolder holder) {
if(ServiceRecording.recordingStatus)
{
stopService(new Intent(getApplicationContext(), ServiceRecording.class));
try {
Thread.sleep(4000);
}
catch (InterruptedException e) {
e.printStackTrace();
}
MainCamera = ServiceRecording.ServiceCamera;
startService(new Intent(getApplicationContext(), ServiceRecording.class));
}
else{
MainCamera = Camera.open();
if (MainCamera != null) {
Camera.Parameters params = MainCamera.getParameters();
params.setPreviewSize(320, 240);
params.setPreviewFormat(PixelFormat.JPEG);
MainCamera.setParameters(params);
try {
MainCamera.setPreviewDisplay(holder);
}
catch (IOException e)
{
e.printStackTrace();
}
MainCamera.startPreview();
previewRunning = true;
}
else {
Toast.makeText(getApplicationContext(), "Camera not available!", Toast.LENGTH_LONG).show();
finish();
}
}
if (previewRunning) {
MainCamera.stopPreview();
}
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
}
@Override
public void surfaceDestroyed(SurfaceHolder holder){
MainCamera.stopPreview();
previewRunning = false;
MainCamera.release();
}
}
My Preference.xml file currently without any entryValues and entries because i don't seems to know how to populate the dynamic string Values??
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Video">
<CheckBoxPreference
android:title="Audio"
android:defaultValue="True"
android:summary="Select w/o Audio"
android:key="AudioPref" />
<ListPreference
android:title="Video Encoder"
android:defaultValue="3gp"
android:summary="Select a video encoding type"
android:key="EncodingPref"
android:entries="@array/EncodingType"
android:entryValues="@array/updateEncodingType"
android:dialogTitle="Video Encoding Formats" />
<ListPreference
android:title="Video Resolution"
android:defaultValue="1"
android:summary="Select the video resolution"
android:key="ResolutionPref"
android:entries="@array/ "
android:entryValues="@array/ "
android:dialogTitle="Video Resolution" />
</PreferenceCategory>
</PreferenceScreen>
Can someone guide me on this above problem i'm facing??
I really need some guide from you guys please??
I know it has to do with split something but i'm kinna stuck here can someone guide me on this?? Even after i get the appropriate height and width how should i use the values to be used in ListPreferences?
Code:
String stringRes = MainCamera.getParameters().get("preview-size-values");
Log.d("ServiceCamera", MainCamera.getParameters().flatten());
String videoResolution[] = stringRes.split(",");
String resHeight[] = ;
String resWidth[] = ;

Widget for turning on/off camera flashlight (Android , Eclipse)

I've seen Widget for turning on/off camera flashlight in android but for some unknown reasons its not working I would really appreciate it if someone could help me. I've been trying for over 2 days.There isn't any error in eclipse.
QFlashlightWidgetProvider class:
Code:
public class QFlashlightWidgetProvider extends AppWidgetProvider {
[user=439709]@override[/user]
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
Intent receiver = new Intent(context, QFlashlightWidgetProvider.class);
receiver.setAction("COM_FLASHLIGHT");
receiver.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, receiver, 0);
RemoteViews views = new RemoteViews(context.getPackageName(),
R.layout.qflashlight_appwidget);
views.setOnClickPendingIntent(R.id.flashtoggle, pendingIntent);
appWidgetManager.updateAppWidget(appWidgetIds, views);
}
}
class QFlashlightWidgetReceiver
Code:
class QFlashlightWidgetReceiver extends BroadcastReceiver {
private static boolean isLightOn = false;
private static Camera camera;
[user=439709]@override[/user]
public void onReceive(Context context, Intent intent) {
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.qflashlight_appwidget);
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
appWidgetManager.updateAppWidget(new ComponentName(context, QFlashlightWidgetProvider.class),
views);
Toast.makeText(context, "Turning Cam On", Toast.LENGTH_SHORT).show();
}
}
Manifest.xml
Code:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
Code:
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/qflashlight_appwidget_info" />
</receiver>
<receiver android:name="QFlashLightWidgetReceiver">
<intent-filter>
<action android:name="COM_FLASHLIGHT"></action>
</intent-filter>
</receiver>
P.S: I removed the code for turning the cam on/off and put a toast message but even the toast message isn't showing.The widget should display a toast message when clicked(I will put the code to turn on the flash when i succeed in making it display a toast)

Example of an app that runs as a service(and does some work periodically in a thread)

Hi there,
Can you share please a link to simple example of an app that runs as a service(and does some work periodically in a thread) and started at boot? It should not be an activity. Thank you.
Not a link, but should be good to start:
AndroidManifest.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="your.package" android:versionCode="1" android:versionName="1.0" >
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoDisplay">>
<receiver android:name=".Receiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:enabled="true" android:name=".YourService" />
</application>
</manifest>
Here you receive broadcast (Intent) dispatched by the system on boot.
Receiver.java
Code:
public class Receiver extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
Intent i = new Intent(this, YourService.class);
startService(i);
}
}
Service should do your work.
YourService.java
Code:
public class YourService extends Service {
@Override public void onStart(Intent intent, int startId) {
// do some work here
}
}
This is a simple implementation. To make it run periodically, try to use AlarmManager with IntentService.
I wrote an app that unfortunately doesn't start at boot. I am also aware (theoretically) of the change in policy of BroadcastReceiver from 3.1 version. But I could not catch what the point is, how I register the service from user activity?
public class AlarmScheduleActivity extends Activity {
// UI parameters
Button btnStart;
Button btnStop;
@override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
btnStart = (Button)findViewById(R.id.button1);
btnStop = (Button)findViewById(R.id.button2);
}
public void btnStartSchedule(View v) {
try {
AlarmManager alarms = (AlarmManager) this
.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(getApplicationContext(),
AlarmReceiver.class);
intent.putExtra(AlarmReceiver.ACTION_ALARM,
AlarmReceiver.ACTION_ALARM);
final PendingIntent pIntent = PendingIntent.getBroadcast(this,
1234567, intent, PendingIntent.FLAG_UPDATE_CURRENT);
alarms.setRepeating(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis(), 2000, pIntent);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void btnCancelSchedules(View v) {
Intent intent = new Intent(getApplicationContext(),
AlarmReceiver.class);
intent.putExtra(AlarmReceiver.ACTION_ALARM,
AlarmReceiver.ACTION_ALARM);
final PendingIntent pIntent = PendingIntent.getBroadcast(this, 1234567,
intent, PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager alarms = (AlarmManager) this
.getSystemService(Context.ALARM_SERVICE);
alarms.cancel(pIntent);
}
}
public class AlarmReceiver extends BroadcastReceiver {
public static String ACTION_ALARM = "com.alarammanager.alaram";
@override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
String action = bundle.getString(ACTION_ALARM);
if (action.equals(ACTION_ALARM)) {
Log.i("Alarm Receiver", "If loop");
Intent inService = new Intent(context,TaskService.class);
context.startService(inService);
}
}
}
public class BootBroadcastReceiver extends BroadcastReceiver {
 @override
public void onReceive(Context context, Intent intent) {
Intent alarmIntent = new Intent("com.company.android.AlarmReceiver");
PendingIntent pi = PendingIntent.getBroadcast(context, 0, alarmIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, System.currentTimeMillis(),
2000, pi);
}
}
public class TaskService extends IntentService {
public TaskService() {
super("TaskService");
// TODO Auto-generated constructor stub
}
 @override
protected void onHandleIntent(Intent arg0) {
// Do some task
Log.i("TaskService", "Service running: yes-yes-yes");
}
}
AndroidManifest.xml
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".AlarmScheduleActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".BootBroadcastReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver
android:name="AlarmReceiver"
androidrocess=":remote" >
</receiver>
<service android:name=".TaskService" >
</service>
</application>
Any idea?

Categories

Resources