Re: Paging Keaton: Share neocore elo disini

by Andika Ikhsan » Sat, 19 Mar 2011 08:44:33 GMT


Sponsored Links
 santai bro lut :D

ayo2 yg dipaging ditunggu neocorenya
rasanya orang ini dr forum sebelah deh :))


On Mar 19, 7:40am, Lutfi Hidayat Ramdhani



-- 
===============



Re: Re: Paging Keaton: Share neocore elo disini

by Dzikki.Muhammad » Sat, 19 Mar 2011 09:15:22 GMT


 Luuuut
Kan gw lagi mikir defy, liat lo posting kan ragu..


#halah

Sent from my iPhone

On Mar 19, 2011, at 8:01 AM, Lutfi Hidayat Ramdhani 




-- 
===============


Sponsored Links


Re: Re: Paging Keaton: Share neocore elo disini

by Lutfi Hidayat Ramdhani » Sat, 19 Mar 2011 09:22:03 GMT


 Beli aja defy, bagus koq
Ngapain juga gara2 gua jadi ga milih defy hehe

Apa pengen putih yang lain?




-- 
===============



Re: Re: Paging Keaton: Share neocore elo disini

by Vanda » Sat, 19 Mar 2011 10:16:10 GMT


 tinggi juga ya. ini pake froyo ya? *nunggu satunya yg mo ditandingin* :-)


2011/3/19 Lutfi Hidayat Ramdhani <lutfi.hidayat.ramdh...@gmail.com>:


-- 
===============



Other Threads

1. Using the dev phone without a wireless carrier

Is it possible to use the dev phone without having a service contract
with any mobile carrier? I want to use the dev phone in a class to
teach app development using all the other features of the device
except for telephony. Is that possible?

Also, does anyone know of institutions that have classes that teach
app development using the Android platform?

--~--~---------~--~----~------------~-------~--~----~

2. Alarm manager on boot only runs once?

I'm trying to set up a service that gets started when the device
boots.  I see that service being started once in the logs but it never
seems to run again.  So the fact that I see it in the right after boot
up means that I am properly intercepting the boot up notification and
firing off the service and that everything is registered correctly in
the the manifest (DeviceBootReceiver and service.)

What I want to have happen is the service to be fired up, regardless
of whether the owning application is running periodically, say every 6
hours.  I'm able to fire up the services and run them from main.java
but obviously this only works if the user has the application in
memory.  Eventually the service will be garbage collected.  So I think
I'm doing something wrong here, but after a day of playing around
(even looking at android:process) can't seem to get it to work.

Any leads will earn a beer.

Thanks! and here's some code!

// this class gets the Boot Broadcast and supposedly :-) sets up the
Alarm Manger to run every 20 seconds and call DownloadAlarm Class.

public class DeviceBootReceiver extends BroadcastReceiver {
private static final String TAG= "DeviceBootReceiver";
@Override
public void onReceive(Context context, Intent intent) {

        Log.d(TAG, "Starting the alarms from device boot receiver....");
         Intent i  = new Intent(context, DownloadAlarm.class);
         PendingIntent sender = PendingIntent.getBroadcast(context,
0, i, 0);


         Log.d(TAG, "Got bootup notice....");
         // Schedule the alarm for every thirty seconds after the
first 15 second delay....
         AlarmManager am = (AlarmManager)context.getSystemService
(Context.ALARM_SERVICE);
         am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
SystemClock.elapsedRealtime(), 20000, sender);

        }

}
----
Download Alarm Class listens for that pending intent and fires up the
service...

public class DownloadAlarm extends BroadcastReceiver
{


private static final String TAG= "DownloadAlarm";

    @Override
    public void onReceive(Context context, Intent intent)
    {
        Log.d(TAG, "Received intent for service: Starting app service");
         context.startService(new Intent(context, AppService.class));



    }


--------------
 App service does some stuff...
public class AppService extends Service {

    private static final String TAG= "AppService";
    @Override
    public void onCreate() {
         Log.d(TAG, "Started the app service");

        Thread thr = new Thread(null, mTask, "AppService");
        thr.start();
    }

    @Override
    public void onDestroy() {

    }

    /**
     * The function that runs in our worker thread
     */
    Runnable mTask = new Runnable() {
        public void run() {
                try {
                        // Download files.
                        HttpClient httpclient =  new DefaultHttpClient();
                  //    Log.d(TAG, "Attempting to load:"+ mURL);
                         HttpGet httpget = new HttpGet("http://www.yahoo.com");
                        httpclient.getParams().setParameter
("http.socket.timeout", new Integer(10000));
                        httpget.getParams().setParameter
("http.socket.timeout", new Integer(10000));
                         // Create a response handler

                        ResponseHandler<String> responseHandler = new
BasicResponseHandler();



                } catch (Exception e) {
                        Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString
(e));
                    }

              File log=new File(Environment.getExternalStorageDirectory(),
"AlarmLog.txt");

          try {
          BufferedWriter out=new BufferedWriter(new FileWriter
(log.getAbsolutePath(), true));

          out.write(new Date().toString());
          out.write("\n");
          out.close();
          }
          catch (IOException e) {
          Log.e("AppService", "Exception appending to log file", e);
          }
            Log.d(TAG, "In thread");

            // Done with our work...  stop the service!
            AppService.this.stopSelf();
        }
    };

    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }



    /**
     * This is the object that receives interactions from clients.
See RemoteService
     * for a more complete example.
     */
    private final IBinder mBinder = new Binder() {

    };

--~--~---------~--~----~------------~-------~--~----~

3. Stuck at starting Intent ??

4. Package Problems following Notepad Tutorial in Eclipse for Android 1.5_r3: android.app not Included

5. Must have missed something...1.5->1.6

6. build path error (solved)

7. WebView Dimensions