Monday, February 28, 2011

Diaper Rules Punishment

last week in Libe


Wednesday, February 23, 2011

Heather Brooke Talking

Android: Give your applications to the authorities


Introduction :
Often it happens to some crazy developer like me to develop application to send SMS or to call, or write notes only. But weird
always requires that the user can get my application in the menu to type a sms.

Problem: Declaring the capabilities of your application OS Android. That my application is able to send sms therefore report to Android that if someone wants to send sms, it also has the option to choose your application.

Objective: Make your implementing a default application, showing his ability to Android OS.


Process: We will use the intent more particularly the intent filter. Meaning
the intentions filters: http://developer.android.com/guide/topics/intents/intents-filters.html # ifs

Intent: An intent is somehow a messenger, an emissary who carries an intention, a necessary action, information (data). A
intent alone does nothing, he cons contains sub-elements Intent-Filter in the activity and the receiver to interpret.

Intent-Filter:

An intent filter deposes

1. One or more categories: how the activity should be launched? Default? Hand?
2. One or more actions: An action can be performed by the intentions implied that our activity or application is capable of. For example my application can send an SMS, call ( action android: name = "android.intent.action.DIAL") and many more.


3. Datas: The datas are made t

In the following we will develop an application that is theoretically capable of sending sms. To do this when the user clicks on one of his contacts send an SMS, our application will show and tell him that you can choose me, I am also able to send sms.

In fact there is nothing to add the following code in your manifest:





   




   



With these lines, we are currently tell OS that our application can also send SMS or call.

Priority: The higher the number, the greater will be our application above.


Development We will develop a small application to test this:



SMS sender application :


package org.sidibe.tutorial.intentfilter.home;

import android.app . Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

/**
 *
 * @author JBromo
 *
 */
public class Main extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
   super.onCreate (saved instance state);
setContentView (R.layout.main)

final numEditText = edit text (alt text) findViewById (R.id.num)

Button text = (Button) findViewById (R.id.sms )
sms.setOnClickListener (new View.OnClickListener () {

public void onClick (View v) {final String
numEditText.getText num = (). ToString ();
launchCall (v.getContext (), a false );


}});

Button = call (Button) findViewById (R.id.call);
call.setOnClickListener (new View.OnClickListener () {

public void onClick (View v) {
numEditText.getText final String num = (). ToString ();
launch call (v.getContext () , num, true);


}});}



/ *
* * This method allow to send or call in number arguments.
     * @param contex Application context
     * @param num  the num to call or send sms
     * @param isCall if true method will launch the call else will send sms
     */
    public static void launchCall(Context contex,String num,boolean isCall)
    {
    
     if(isCall)

{Intent intent = new Intent (Intent.ACTION_DIAL, Uri.parse ("tel:" + num));
intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
contex.startActivity (intent);}

else
; {
Intent intent = new Intent (Intent.ACTION_VIEW, Uri.parse ("tel:" + num));
intent.putExtra ("sms_body", "Sms example") ;
intent.setType ("vnd.android-dir/mms-sms");
/ / Just to avoid leave our application
intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK)
      contex.startActivity(intent);
     }
    }
}


  Source complete :








Most Powerful Deskktop

Android BroadCastReceiver: A code for launching applications



Sources




This trick surely has given ideas to some of of you. And you wonder: how can create a hidden application in Android?


Objective: To explore the hidden feature of Android through the creation of an application that is launched by any code (1212: my birthday!). Otherwise this application is not useful ..


Solution
tutorial Let's official: TestBroadCast. We need to create a receiver to listen and treat "secret codes" seized on the phone:
 
 package org.sidibe.intent; 

import junit.framework.Test;
import android.content.BroadcastReceiver;
import android.content.Context;
android.content.Intent import, import
android.telephony.TelephonyManager;

/ ** *

* * @ author JBromo
Launch applications on Android
* / public class

TestBroadCast extends BroadcastReceiver {


@ Override public void
OnReceive (Context context, Intent intent) {


if (intent.getAction (). Equals ("android.provider.Telephony.SECRET_CODE")) {

intents Intent = new Intent (Intent.ACTION_MAIN)
intents.setClass (context, TestAndroid.class)
intents.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity (intent);

}}}




You can see that it is the receptor that is responsible to launch the HelloWorld application.
Then you must change AndroidManifest.xml file to hide the HelloWorld application and set the code that


Android Manifest.xml



The application does TestBroadCast is then more in the category "launcher" but "default". The consequence it is no longer visible in the list of applications launcher application.
To start the application, just open the phone application and dial number: * # * # 1212 # * # * . The application then sets TestBroadCast.

Conclusion You are now equipped to create applications invisible. We just have to tell your users to enter the code to start it. In

made this application is useless since it is not visible, just explore the functionality of Android.



Brent Everett Trailer

Develop applications with hidden Intent-Filter in



     


The HelloWorld application does so more in the category "launcher" but " default ". The consequence it is no longer visible in the list of applications launcher application.
To start the application, just open the phone application and dial the following number: * # * # 1212 # * # * . The HelloWorld application starts then.

Conclusion You are now equipped to create applications invisible. We just have to tell your users to enter the code to start it.
In fact, it is no use hiding the application process, just enjoy the pleasure of good nuclei android.

Wednesday, February 16, 2011

Diabetic With Fever Vomiting And Chills

YOUR APPOINTMENT IN MARCH