Try please :)
https://play.google.com/store/apps/developer?id=gokh2o

...
12-01 00:11:33.083: I/ActivityManager(146): Force stopping package com.mybilet.android16 uid=10096
12-01 00:11:33.093: I/PackageManager(146): Removing non-system package:com.goksu.myApp
12-01 00:11:33.093: I/Process(146): Sending signal. PID: 2840 SIG: 9
12-01 00:11:33.093: I/ActivityManager(146): Force stopping package com.goksu.myApp uid=10107
12-01 00:11:33.093: W/ActivityManager(146): Scheduling restart of crashed service com.goksu.myApp/.service.myAppService in 44738ms
12-01 00:11:33.093: I/ActivityManager(146): Force stopping service ServiceRecord{40c24020 com.goksu.myApp/.service.myAppService}
12-01 00:11:33.113: I/PackageManager(146): Removing non-system package:com.chartcross.gpstestplus
12-01 00:11:33.113: I/PackageManager(146): Removing non-system package:com.estrongs.android.taskmanager
...
...
12-01 00:12:48.637: D/VoldCmdListener(69): asec mount com.pozitron.biletix-1 {} 1000
12-01 00:12:48.747: D/VoldCmdListener(69): asec path com.pozitron.biletix-1
12-01 00:12:48.817: I/PackageManager(146): /mnt/asec/com.pozitron.biletix-1/pkg.apk changed; collecting certs
12-01 00:12:49.338: D/dalvikvm(146): GC_CONCURRENT freed 1643K, 41% free 9527K/16007K, external 711K/1112K, paused 8ms+19ms
12-01 00:12:49.558: I/PackageManager(146): Linking native library dir for /mnt/asec/com.pozitron.biletix-1/pkg.apk
12-01 00:12:49.588: D/VoldCmdListener(69): asec mount com.goksu.myApp-1 {} 1000
12-01 00:12:49.698: D/VoldCmdListener(69): asec path com.goksu.myApp-1
12-01 00:12:49.748: I/PackageManager(146): Linking native library dir for /mnt/asec/com.goksu.myApp-1/pkg.apk
12-01 00:12:49.758: D/VoldCmdListener(69): asec mount finarea.MobileVoip-1 {} 1000
12-01 00:12:49.938: D/VoldCmdListener(69): asec path finarea.MobileVoip-1
...
package com.goksu.xxx.service;
import android.app.Service;
import android.content.Intent;
/**
* @author kgoksu
*/
public class MyService extends Service {
...
...
@Override
public void onStart(Intent intent, int startid) {
handleCommand();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
handleCommand();
// We want this service to continue running until it is explicitly
// stopped, so return sticky.
return START_STICKY;
}
private void handleCommand() {
//TODO
}
...
...
}
// 1. implements Runnable, 2. extend Thread, 3. extend TimerTask
// *** A thread is born, started, runs, and then dies.
// *** this.yield() -> Causes the currently executing thread object to temporarily pause and allow other threads to execute.
public final void setDaemon(boolean on)
public final void join(long millisec)
public void interrupt()
public final boolean isAlive()
public static void yield()
public static boolean holdsLock(Object x)
// *** Timer Task
public class GCTask extends TimerTask {
public void run() {
System.out.println("Running the scheduled task...");
System.gc();
}
}
Timer timer = new Timer();
GCTask task = new GCTask();
timer.schedule(task, 5000, 5000);
// *** Fixed-delay execution. The period is the amount of time between the ending of the previous execution and the beginning of the next execution.
// *** Fixed-rate execution. The period is the amount of time between the start-ing of the previous execution and the beginning of the next execution.
// *** Synchronized
public synchronized void deposit(double amount) {}
public void deposit(double amount) {
synchronized (this) {
// ....
try {
Thread.sleep(4000);
} catch (InterruptedException e) {}
}
}
// *** Deadlock issues --> Ordering Lock
// *** wait() & notify() --> The wait() and notify() methods from the Object class are useful when multiple threads need to access the same data in any type of producer/consumer scenario.
// *** instanceof keyword using
// *** Usage: reference instanceof ClassName
if(h instanceof Salary)
{
Salary s = (Salary) h;
s.computePay();
}
// *** Virtual Methods
public class Employee {
//....
public void mailCheck() {}
}
public class Salary extends Employee {
//....
@override
public void mailCheck() {}
}
public class SuperDemo {
public static void main(String[] args) {
//...
System.out.println("Instantiating a Salary");
Employee s = new Salary();
s.name = "XXX";
s.address = "";
System.out.println("*** Invoking mailCheck on s ***");
// compile time refers to Employee Class
// run time refers to Salary Class
s.mailCheck();
}
}
// *** Both object and object2 refer to this one object!
SampleObject object = new SampleObject();
SampleObject object2 = object;
// object.getSampleName doesn't change!
SampleUtil.tryReferanceData(object.getSampleName);
public class SampleUtil{
public static void tryReferanceData(String inputy) {
inputy = "tryReferanceData";
}
}
// method parameters & fields...
public void setCurrency(Double currency)
{
// The parameter visitor is the same name as the field visitor.
currency = currency;
// correct this
this.currency = currency;
}
// *** the java naming convention recommends package names be all lovercase
// *** prodected access can seem child class or other class in the same package.
// *** A static fiels or method can be accessed without any instances of the class existing.
// *** Created objects' static fields reference only one memory location.
public class Employee {
public String name;
public static int moneyAmount; // Created all objects reference this static fields!
//.....
public static int getMoneyAmount() {
return moneyAmount;
}
}
// *** the java naming convention recommends package names be all lovercase
// *** prodected access can seem child class or other class in the same package.
// *** A static fiels or method can be accessed without any instances of the class existing.
// *** Created objects' static fields reference only one memory location.
public class Employee {
public String name;
public static int moneyAmount; // Created all objects reference this static fields!
//.....
public static int getMoneyAmount() {
return moneyAmount;
}
}