This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends Activity { | |
private IntentFilter filter = //filtr, to po prostu nazwa :) | |
new IntentFilter("com.example.services.PrzykladowyBroadcast"); | |
private PrzykladowyBroadcast broadcastreceiver = | |
new PrzykladowyBroadcast(); | |
@Override | |
public void onResume() { | |
super.onResume(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<receiver android:name="NaszBroadcast"> | |
<intent-filter> | |
<action android:name="android.provider.Telephony.SMS_RECEIVED"> | |
//w tym przypadku oczekujemy nadejścia SMS'a | |
</action> | |
</intent-filter> | |
</receiver> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BroadCast extends BroadcastReceiver{ | |
@Override | |
public void onReceive(Context arg0, Intent arg1) { | |
Bundle pudsBundle = arg1.getExtras(); | |
Object[] pdus = (Object[])pudsBundle.get("pdus"); | |
SmsMessage messages =SmsMessage.createFromPdu((byte[]) pdus[0]); | |
Toast.makeText(arg0, "Author : "+messages.getOriginatingAddress()+"\n Contents: "+messages.getMessageBody(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission> | |
<receiver android:name="BroadCast"> | |
<intent-filter> | |
<action android:name="android.provider.Telephony.SMS_RECEIVED"> | |
</action> | |
</intent-filter> | |
</receiver> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Button android:id="@+id/btnStartService" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:text="broadcast_intent" | |
android:onClick="broadcastIntent"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void broadcastIntent(View view) | |
{ | |
Intent intent = new Intent(); | |
intent.setAction("com.example.services.BroadCast"); | |
sendBroadcast(intent); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println("Asdasd"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
... | |
private List<String> lista = new ArrayList<>(); | |
@PostConstruct | |
public void init(){ | |
lista.add("1"); | |
lista.add("2"); | |
lista.add("3"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<output jsf:id="confirm" name="confirm"> | |
Hoho ale to trudne - #{reservationBean.lista[0]}. | |
</output> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="alert alert-info"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
<strong>Uwaga! </strong>Ten formularz umożliwia dodawanie wielu pracowników na raz. Dla każdego pracownika którego chcesz dodać msusisz podać przynajmniej imie i nazwisko. | |
</div> | |
<!-- Jeden wiersz z formularza który kopiuje--> | |
<div class="hide"> | |
<div class="single-employee-fieldset"> | |
<div class="row"> | |
<p class="span12 text-error"> |