A car controlled by a cell phone. Development of a working prototype of an application that will facilitate the use of the DTMF Callback telephony function on Android devices Decoding a dtmf signal in android

Radio controlled models use RF circuits that have limited operating range, limited frequency response, and problems matching with controllers. Using a mobile phone to control the model avoids these disadvantages. When using a mobile phone, the model can be controlled throughout the operator's coverage area and work with external devices without problems.

Although the appearance and capabilities of a model can vary greatly, all models have a mechanical part and a part that controls the model. Model management includes three stages: command reception, processing and execution. As a rule, commands are given by external sensors, processed by a microcontroller, and motors are used for execution.

Review

This machine uses two mobile phones for control - one in your hands as a remote control, the other installed on the model as a receiver. A call is received from your phone to the model's phone, and when you press the keys during the call, a multi-frequency signal is received from the mobile phone. This signal is called Dual-Tone Multi-Frequency (DTMF).
Using the MT8870 DTMF decoder, the DTMF is decoded into binary code, which is processed by the ATmega16 microcontroller and then issued a command to the motor driver.

As you can see, this model is quite simple and does not require the construction of complex transmitters.
DTMF signal is used for dialing a telephone number or voice answering.
The signal consists of two sinusoidal signals of a fixed frequency, and is easily decoded into binary code and vice versa. To encode a character into a DTMF signal, two sinusoidal signals must be added. For example, if we need to transmit the number 5, then the frequency of one signal will be 1336 Hz, and the other 770 Hz, and we will receive this signal on the second phone.

Description of the scheme

The block diagram shows the operating principle of the device. Its main components are a DTMF decoder, a microcontroller and a motor driver.

The MT8870 chip is used as a DTMF decoder. It uses digital signal recognition methods and outputs a signal to 4 pins. It also does not require preliminary filtering of the input signal. When an input signal is applied to PIN2 (B-), the decoded signal is output at pins Q1(pin11) to (pin14).

ATmega16 is an 8-bit CMOS microcontroller based on the advanced AVR RISC architecture with low power consumption. It has 16KB of programmable flash memory, 512B EEPROM, 1KB SRAM, 32 I/O lines, and 32 registers. From the microcontroller pins PD0 - PD3 and PD7, a signal is sent to the outputs IN1 - IN4 and EN1-EN2 of the L293d motor driver. Switch S1 is used for manual reset.

Program

The microcontroller is programmed using WIN AVR. For those who don’t know how to do this, take a look, everything is described in detail there. The article is accompanied by a source and a hex file. If WinAVR is installed, then there should be no problems with opening.

Job

In order to control the model, you must call the model's mobile phone from any phone. When the machine automatically answers, press the following keys:
2 – moving forward.
4 – turn left.
8 – movement in the opposite direction.
6 – turn right.
5 – stop.

List of elements:
DTMF decoder MT8870 – 1.
Microcontroller Atmega16 – 1.
Motor driver L293d – 1.
Op-amp Cd7004 – 1.
Diode 1N4007 – 1.
Resistor 100 kOhm – 2.
Resistor 10 kOhm – 5.
Resistor 330 kOhm – 1.
Capacitor 0.47uF – 1.
Capacitor 0.1uF – 1.
Capacitor 22pF – 4.
Quartz 3.57 MHz – 1.
Quartz 12 MHz – 1.
Momentary button – 1.
Motors (6V, 50 rpm) – 2 or 4 for all-wheel drive.
Battery 6V – 1.
Wheels – 4.
Mobile phone – 2.
Speakerphone (hands - free) – 1.

You must secure the phone to the chassis. The phone is connected to the robot via a hands-free headset.

Hands-free connection
I used hands-free with a mini jack connector.

You can download the program source code and firmware below

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
IC1 DTMF decoderMT88701 To notepad
IC2 MK AVR 8-bit

ATmega16

1 To notepad
IC3 Motor DriverL293D1 To notepad
IC4 Buffer IC, driver

SN74LS04

1 To notepad
D1 Rectifier diode

1N4007

1 To notepad
C1 Capacitor0.47 µF1 To notepad
C2, C3, C5, C6 Capacitor22 pF4 To notepad
C4 Capacitor0.1 µF1 To notepad
R1, R2 Resistor

100 kOhm

2 To notepad
R3 Resistor

330 kOhm

1 To notepad
R4-R8 Resistor

10 kOhm

5 To notepad
XTAL1 Quartz resonator3.57 MHz1 To notepad
XTAL2 Quartz resonator12 MHz1

DTMF (Dual-Tone MultiFrequency) is a tone generated when you press a button on your phone.
DTMF is widely used in answering machines (IVRs) for various interactive systems. When applied to VoIP, when working with various codecs, DTMF requires quite a lot of attention, so its operation must be clearly understood.

By default, Gateway sends DTMF in the RTP stream ( in-band), this works fine when using the codec high-bit-rate G.711, i.e. if the voice stream is not compressed.
The main problem with DTMF occurs when using compression algorithms such as the G.729 codec. The fact is that when compressed, the quality of the head stream noticeably deteriorates, and although this has almost no effect on the ability of subscribers to understand each other, the DTMF tone is no longer clear enough and is perceived incorrectly.

This problem can be solved using DTMF Relay, in which DTMF signals are transported separately from the RTP stream, or out-of-band.

Let's look at a few examples.


The figure shows a diagram of connecting telephony via an H.323 gateway.

On the PSTN section, DTMF is sent in-band, i.e. there is not even the concept of DTMF Relay, since it is an analog line.

DTMF relay becomes necessary only in the VoIP section, where compression methods can be used.
It can also be said that:
- in-band DTMF relay will go inside the RTP stream, i.e. in the figure along the red RTP line.
- out-of-band DTMF relay will go along with the signaling, i.e. along the green lines in the figure.

At the sites phone-CUCM And CUCM-H.323Gateway Different signaling is used, and therefore different DTMF relay methods. From the phone side, SCCP messages come, containing DTMF in their encoding; from the H.323 gateway side, signaling along with DTMF comes from H.245 messages.
CUCM in our case acts as a DTMF Forwarder between different types of signaling.

Location on phone-CUCM we will only be able to out-of-band, since the SCCP phone does not support in-band.
Location on CUCM-H.323Gateway methods like in-band, so out-of-band. Moreover, in the case of an SCCP phone, to enable in-band will require use MTP.

You also need to understand that the DTMF settings for H.323 Trunk are the settings for the operation of this trunk with a Dial-peer on a physical H.323 Gateway.

Depending on the signaling protocol (H.323, SIP, MGCP, SCCP), there are different methods to implement DTMF Relay. In any case, Call Manager CUCM initially tries to uncoordinate a method common to all. If no common method is found, an attempt is made to use MTP.

H.323 DTMF Support

Cisco Gateways supports the following DTMF Relay methods:

  • Cisco proprietary: - in-band DTMF relay. DTMF is sent in the same RTP stream as voice, but DTMF tones are encoded slightly differently, which allows them to be successfully distinguished and received on the other side. DTMF samples are identified as RTP payload type 121. The method only works if there is Cisco equipment on both sides, and the same method
  • H.245 Alphanumeric:-Out-of-band DTMF relay. Separates DTMF from RTP stream and sends them via H.245 User Input Indication messages. This method does not send tone length: The tone length is always considered to be 500msec.
    In this example we clicked on "5".

    Debug: debug h245 asn1

  • H.245 Signal:-Out-of-band DTMF relay. This method is capable of sending tone length ( tone length).

    Debug: debug h245 asn1

  • NTE:- in-band DTMF relay. Works similar to Cisco proprietary, DTMF is sent in the same RTP stream as voice, using RTP payload type. Another payload does not allow DTMF samples to be compressed. Unlike Cisco proprietary, NTE uses the RFC 2833 standard.

    Debug: debug h245 asn1

The following commands are available on a Cisco router:

Router(config-dial-peer)#dtmf-relay ?

cisco-rtp Cisco Proprietary RTP h245-alphanumeric DTMF Relay via H245 Alphanumeric IE h245-signal DTMF Relay via H245 Signal IE rtp-nte RTP Named Telephone Event RFC 2833 router(config-dial-peer)#
Best practice:

On dialpir it is best to give commands as follows:

Dial-peer voice 3000 voip description Long calls destination-pattern ... session target ipv4:192.168.0.11 dtmf-relay h245-signal h245-alphanumeric cisco-rtp rtp-nte codec g711ulaw no vad

In this case, both parties can negotiate the appropriate dtmf-relay method between themselves.
To determine the selected DTMF relay method:

show call active voice

Router#show call active voice ........... PeerAddress=5001 ........... tx_DtmfRelay=rtp-nte
Thus, CUCM automatically checks which DTMF method is suitable for both parties.

Regarding H.323 Gateway in CUCM, there are no DTMF settings there. CUCM accepts the other party's setting.

MGCP DTMF Support

  • Cisco proprietary: The following DTMF Relay methods are available for MGCP: RTP payload type 121 DTMF is sent in the same RTP stream as voice, but DTMF tones are encoded slightly differently, which allows them to be successfully distinguished and received on the other side. DTMF samples are identified as
  • . The method only works if there is Cisco equipment on both sides and a similar method is selected (nothing is negotiated). NSE:
  • NTE: NSE is essentially Cisco Proprietary NTE. The method only works if there is Cisco equipment on both sides and a similar method is selected (nothing is negotiated).
    - Gateway-controlled mode (NTE GW): Gateways negotiate DTMF with each other independently, exchanging capability information in SDP messages. This process is transparent to the Call Agent. In this case, both gateways have MGCP running and both are connected to the same CUCM.
    - Call agent–controlled mode (NTE CA): In negotiations, Call Agent is used, i.e. acts on behalf of the MGCP gateway (SDP messages are sent to the Agent). This mode can be used when the second gateway is not an MGCP-Gateway. After negotiation, the Call Agent instructs the gateway about the RTP-NTE values ​​accepted with the other party.
  • Out-of-band: Tones are sent to CUCM using MGCP messages, i.e. outside the RTP stream (Out-of-band). CUCM in turn receives DTMF and transmits it to the other side.

MGCP uses DTMF relay only for low-rate codecs (G729, iLBC, GSM, etc). For bit-rate codecs G711 DTMF will be sent in-band.

In the case of MGCP, we can choose whether the DTMF settings will be dictated by the Call Agent (CUCM) or whether those set on the Gateway will be used.
Let's go to CUCM: Device > Gateway, select the appropriate MGCP Gateway.
We are interested in the section Type of DTMF Relay.

When choosing Current GW Config, the setting that is on the gateway will be used.
On IOS Gateway we can set DTMF with the following command:

Router(config)#mgcp dtmf-relay voip codec all mode ?

cisco Set mgcp dtmf-relay mode to be cisco disabled Set mgcp dtmf-relay mode to be disabled nse Set mgcp dtmf-relay mode to be nse nte-ca Set mgcp dtmf-relay mode to be nte-ca nte-gw Set mgcp dtmf -relay mode to be nte-gw out-of-band Set mgcp dtmf-relay mode to be out-of-band If we put another choice on CUCM, for example cisco

, the corresponding command above will be entered automatically (MGCP mechanisms).

A bug was noticed with MGCP: CSCta69407 Bug Details

(When using any type of inband DTMF signaling (RTP-NTE, NSE, or Cisco Proprietary) DSP"s aren"t turning off OOB dtmf signaling using mgcp packets. There fore duplicate digits will be seen on the terminating GW as one coming from rtp and other coming from CUCM) Workaround:

Use mgcp dtmf-relay type out-of-band.

SIP DTMF Support in-band By default SIP sends DTMF

  • , but we can use the following options: (NTE RTP-NTE or) - in-band RFC 2833 in-band, but in reality the tone will not be heard in the audio stream, since NTE packets are not voice
    RTP-NTE cannot work with SCCP phones, since SCCP phones only use out-of-band DTMF relay. For this reason, MTP must be used in conjunction with RTP-NTE.
  • SIP INFO - out-of-band(OOB) DTMF relay. DTMF information is sent in SIP INFO messages. Those. if the gateway receives an INFO message, it issues an appropriate tone.
  • SIP NOTIFY - out-of-band(OOB) DTMF relay. or it is also called NOTIFY-based out-of-band DTMF relay. This type of DTMF relay uses NOTIFY to transmit tones. This method is compatible with SCCP phones and can also be used with analog phones connected to the FXS ports on the gateway.
  • KPML - out-of-band(OOB) DTMF relay. When using Key Press Markup Language, the SIP phone sends the number digit-by-digit. This method is similar to SIP NOTIFY, with the only difference that it gives each digit separately.
router(config-dial-peer)#session protocol sipv2 router(config-dial-peer)#dtmf-relay ?

cisco-rtp Cisco Proprietary RTP h245-alphanumeric DTMF Relay via H245 Alphanumeric IE h245-signal DTMF Relay via H245 Signal IE rtp-nte RTP Named Telephone Event RFC 2833 sip-kpml DTMF Relay via KPML over SIP SUBCRIBE/NOTIFY sip-notify DTMF Relay via SIP NOTIFY messages router(config-dial-peer)#
- , but we can use the following options: (NTE RTP-NTE or);
- Here we see several available methods, with only suitable for working with CUCM;
- SIP-NOTIFY.

SIP-KPML
Hi all.

Do you want to control something using your cell phone, and without any fancy microcontrollers? If yes, welcome to cat.
Recently on Muska there have been several reviews of GSM modules, such as SIM800, using which you can control anything over a cellular network. But the problem is, they all require connecting to a microcontroller, writing firmware and other things that are difficult for the uninitiated person. The other extreme is: “I soldered a relay to the vibration motor of the phone, everything works for me.” :)) This is also possible, but don’t be surprised if the pump tries to water your greenhouse with water from a frozen well, after receiving the SMS “Happy New A year! from an unknown sender :)))

In general, I decided to fill the gap between these two solutions and offer my own.
Today we will talk about the DTMF signal decoder, or in simple terms, a tone signal.
The curious can read
Actually, it is tone dialing that you use when you call some institution, and the answering machine tells you: “if you know the subscriber’s number, press “1”, if you want to find out about our new offers, press “2” and so on. By pressing the button with the desired number on your phone, you send a signal of a certain tone over the voice channel. Each character on the telephone keyboard has its own “melody”. It is this sound that the DTMF decoder decodes, turning it into signals at its outputs.


The board is assembled on a microcircuit, is powered by 5 Volts and has the following outputs: Q1-Q4 discrete outputs, StQ/StQ inverse outputs, which are triggered whenever a signal is correctly recognized. IN input for audio signal if you do not want to use the 3.5 mm jack soldered on the board. GND/VCC power supply, 5 Volts.
Outputs Q1-Q4 are triggered in accordance with the table:

For example, now two middle LEDs on my board are lit, outputs Q2 and Q3 are activated, look at the table - this corresponds to the pressed key “6”. If I press the “1” key, then output Q1 will work, if “2”, then Q2. If “3”, then outputs Q1 and Q2 will “light up” simultaneously. And so on.
In general, this is a 4-bit code. If you decrypt it with a special chip, you can get 16 outputs.
By the way, Ali sells the board already with a decoder, but it costs more. An option for the advanced is to connect all this to a microcontroller, I did this, you can even set a password, call and type the password, gain access to the control...
But this is no longer within the scope of my article, because... at the beginning of the article I promised that everything would be simple.

And so, we take the KT815 transistor, a 1.1 kOhm resistor, or so, a 12 V relay, and an LM7805 stabilizer. The remaining parts (1N4007 protective diode on the relay coil, yellow 0.1 µF ceramic capacitors and 1000 µF electrolytic capacitors) are desirable, but it works without them. A tweeter is connected to the relay as a load.
I won’t draw a diagram, the installation is hinged, you can see everything in the photo:


On the other side:


The general power supply of the structure is 12 V, because this is required by the relay, but for the board it is lowered by the stabilizer to 5 V.
We connect the 3.5 mm jack on the board with a cord to the phone's headphone output, set up auto-pickup and you're done. Now, if you call a phone connected to the board, wait until the handset is picked up, and press “1”, the relay will work and the buzzer will start beeping. If you press “2”, everything will turn off. By the way, regardless of what you plan to control, I would recommend leaving the buzzer. This is convenient because you can hear it over the phone, and this way you can get some feedback: you called, you hear a beeping sound, which means the load is on :)

I made a short video showing how it all works.

I'm planning to buy +128 Add to favorites I liked the review +72 +169

Send your good work in the knowledge base is simple. Use the form below

Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.

Posted on http://www.allbest.ru/

Introduction

The development of scientific and technological progress in the world contributed to the widespread rapid spread of cellular communications at the beginning of the 21st century, this is due to the need to constantly be in the field of access, in places where landline telephone communication is impossible.

Thanks to the downward trend in prices on the market, almost every citizen of Russia has access to their own personal mobile phone.

Many telecom operators provide cellular services. Thanks to the development of Internet technologies, IP telephony has gained popularity, which has a number of advantages over conventional cellular telephony, for example, a conversation protected from eavesdropping or recording a conversation on a server, the use of short numbers, and communication without the involvement of providers.

There are several ways to communicate between a VoIP server and a mobile phone. One of the most obvious is the Internet connection, for which you usually need to pay a cellular operator, which is not particularly profitable to make Internet communication for VoIP cheaper than its own telephony services. Therefore, prices for a tariff with stable Internet, necessary for calls via IP telephony, may be inflated.

There is a way to communicate with a VoIP server, which is usually called callback, when the server is told which number to call, and the server calls the subscriber back, connecting to the number to which the subscriber is calling. This number can be transmitted via the Internet, SMS or tone dialing (DTMF).

It is not always possible to send SMS or use the Internet, especially if the subscriber is roaming. Often, the only communication method available is a “traditional” cellular call. There is a way through which you can communicate with the VoIP server via a cellular call; for this, DTMF Callback is used using the following algorithm:

1. Subscriber “A” calls the telephony server number

Figure 1. Step 1

2. The telephony server disconnects

Figure 2. Step 2

3. The telephony server calls back to subscriber “A” and waits for a response

Figure 3. Step 3

4. Subscriber “A” answers the call

Figure 4. Step 4

5. In tone dialing, subscriber “A” dials the number of subscriber “B”

Figure 5. Step 5

6. The server initiates a call to subscriber “B”

Figure 6. Step 6

7. After initialization, the server associates the connection of subscriber “A” and subscriber “B”. Subscriber “A” already hears dial tone to subscriber “B”.

Figure 7. Step 7

Subscriber “B” answers the call. Both users can exchange voice messages.

Figure 8. Step 8

As a result, subscriber “A” and subscriber “B” have an incoming call, and they can communicate with each other through the telephony server.

There is a Callthrough method, which, unlike Callback, does not require the server to call subscriber “A” back, but in connection with this, subscriber “A” pays for the outgoing call.

Basis for development

The main disadvantage of initializing callback using DTMF is that subscriber “A” must manually dial the number of subscriber “B” after the server called him back. In the call log on subscriber “A”’s phone, the number he dialed, that is, the server number, remains in the outgoing calls, and the callback number that called him back remains in the incoming calls. This information is not very informative for the user. The telephony server can be configured so that callback calls back to subscriber “A” from different numbers. This means that the user will have a large number of unfamiliar numbers in the call log. This information is unnecessary and should be hidden from the subscriber. Often, callback services do not have direct access via DTMF, but use an Internet connection, SMS or a special SIM card.

Purpose of development

Develop a working prototype of an application that will facilitate the use of the DTMF callback telephony function on Android devices.

Review and analytical part

cellular

Cellular communications are wireless communications whose access areas are divided into hexagonal cells similar to honeycombs. One such access zone is provided by the base station. A set of such base stations that make up zones of cells is called a cellular network; devices that use the cellular network are cell phones. In a cellular network, each cell uses a different set of frequencies from neighboring cells to avoid interference and to ensure guaranteed throughput for each cell.

Cellular network features:

· Using multiple base stations provides more options than using one large transmitter. Each cell can be assigned multiple frequencies corresponding to the base station. A group of frequencies can be reused if neighboring cells use different frequencies.

Figure 9. Frequency reuse scheme (F1-F4 - frequencies)

· Mobile devices allocate less energy to communicate with the tower, so how a less powerful signal is required to find it due to the closer location of the communication tower

· Larger coverage area than a single terrestrial transmitter, so additional cell towers can be added to areas with poor communication where the signal does not reach well due to interference.

When arranging cells, it is optimal to avoid overlapping cell areas; there should be no empty space between cells. Therefore, the geometric shape of the coating can be figures such as triangles, squares or hexagons. The shape of the antenna coverage is most similar to a hexagon.

The devices that manage and route signals from one cell phone to another are called automatic telephone exchanges (PBXs). At the moment, almost all automatic telephone exchanges are electronic.

Dialer is a part of the telephone interface that allows you to transmit the number of the telephone to which the PBX should connect. For a long time, pulse dialers were used, which generated pulses, where each digit corresponded to its own number of pulses. The telephone set had a disk with 10 holes. The principle of connecting to a PBX was as follows:

On the telephone, a disk is rotated from the point with the indicated number, which winds the spring. When the disk is released, the spring begins to unbend and the disk begins to move in the opposite direction. The dialing of a pulse corresponds to the closing and opening of the telephone line. Pauses are made between sets of pulses to distinguish the set of one character from another. This dialing method is quite inconvenient; the subscriber has to remove the disk several times and wait until it returns to its place. Subsequently, a pulse push-button dial appeared, which eliminated this drawback.

At the moment, a two-tone multi-frequency signal (Dual Tone Multi-Frequency, DTMF) is used to dial a number. DTMF can be used for internal telephone network commands. In DTMF, the transmitted digit is encoded by a signal obtained by summing two sinusoidal voltages of a certain frequency. Two groups of four audio frequencies are used in each group.

Table 1. Correspondence of frequencies and symbols for DTMF dialing

Direct Inward System Access (DISA) is a direct access function that allows a subscriber to gain access to control a telephone exchange or telephony server using DTMF signals from the telephone.

Cellular market overview

The revenue of companies providing cellular communications in Russia is growing, as evidenced by their reports. The same reports show that a large share of revenue comes from mobile communications. It is in the interests of both the average private user and the corporate player to reduce mobile communications costs. One way is to analyze the services used per month and select the most suitable tariff from a mobile operator.

The mobile communications market in Moscow consists of three players, the distribution of which can be seen at:

Diagram 1: distribution of major players in the cellular market

Comparison local tariffs in Moscow

Three major players in the Moscow market have similar package tariffs that can be compared. For example, “Smart” class tariffs for MTS, “All Inclusive” for Megafon and “All for” for Beeline. These tariffs offer a package of options and a subscription fee for them. Let's compare similar-priced tariffs from these classes. Service packages may include SMS, MMS, Internet and other services, but in this analysis they are not taken into account, since we are interested in the price of the call. For the same reason, there is no detailed description of the nuances of tariffs if they do not directly affect the price, however, it can be noted that the quality of communication in different areas of the area can vary greatly among operators. There is also no need to calculate the cost of calls if the monthly tariff limit is exceeded, since a person who controls costs will choose the tariff correctly, however, it is worth noting that the price after exceeding the limit can be quite high. It is worth noting that incoming calls within Russia are free for all three package groups.

The minimum price is the package tariffs “Smart mini” - 200?, “All inclusive XS” - 199? and “All for 200” - 200?. There are some features for calls within the operator's network. “Smart mini” and “All inclusive XS” make calls throughout Russia, and “All for 200” only in Moscow and the Moscow region. Prices are indicated as of May 15, 2015.

Table 3. Minimum package rates

As can be seen from the table, the tariff options are very similar. Calls within the network are the cheapest. It is more expensive for subscribers of other operators to call, especially outside the Moscow region.

Although this tariff is not intended for calls to other countries, a person may need to call outside of his own country, so it is worth considering international tariffs for calls to other countries.

Table 4. Minimum package rates (calls abroad)

CIS, rubles per minute

24 Also for the Republic of Crimea and the city of Sevastopol

Europe, rubles per minute

Other countries, rubles per minute

USA, rubles per minute

Canada, rubles per minute

Australia and Oceania, rubles per minute

Asia, rubles per minute

CIS within the network, rubles per minute

North and Central America (excluding the USA and Canada), rubles per minute

As can be seen from the table, tariffs for calls to other countries are already quite different. Beeline provides the opportunity to call Beeline numbers in other countries at a low price. Megafon has more price differences for different countries, while MTS, on the contrary, has a single price for Europe and a single price for all other countries.

Table 5. Small package tariffs

As in the case of minimum package rates, the conditions are very similar, but the price differs.

MTS prices for calls to other countries for “Smart” packages are no different, as are Megafon’s for “All Inclusive” packages, but Beeline’s “All for” packages have slightly different prices abroad:

· In the “All for 400” tariff: “All for 200” conditions + the first 10 minutes a day cost 5?, if you call to the CIS countries, Crimea and Sevastopol.

· In the “All for 600” tariff: “All for 400” conditions + the first 10 minutes a day cost 7?, if you call to Azerbaijan, Belarus and Moldova

· In the “All for 900” tariff: “All for 600” conditions + the first 10 minutes a day cost 5?, if you call to Europe, the USA and Moldova

· In the “All for 1500” tariff: “All for 900” conditions + to the Maldives, Madagascar, Burundi, North Korea, Papua New Guinea, Seychelles, Somalia, Tokelau, Tunisia, one minute costs 55?

Table 6. Average package rates

With equal local tariffs, Megafon's price for calls to other operators in Russia is 3.3 times cheaper.

Table 7. Tariff packages above average

With equal local tariffs, the price of calls to other operators in Russia from MTS is 3.3 times cheaper.

Table 8. Large tariff packages

These local tariffs have almost the same conditions.

Conclusion

Package tariffs are very favorable if you use them for calls within the network. Competing operators keep prices at approximately the same level. For an ordinary subscriber who speaks 20-60 minutes a day, these tariffs are suitable. If a person needs to talk more than 120 minutes a day, then he will have to take more expensive tariff packages ranging from 1500 to 2500, which is already quite expensive.

International roaming has its own conditions that differ from each other. This roaming is expensive for all three operators; a thirty-minute call can exceed the cost of the service package. If the subscriber has to call to other countries, then it is worth choosing a different tariff.

Tariffs for calls to other countries

Tariffs for calls to other countries were divided into three groups:

1. Tariffs for relatives and friends of tourists

2. Tariffs for migrants

3. Tariffs for businessmen

Tariffs for relatives and friends of tourists

To compare the tariffs for relatives and friends of tourists, five popular resort destinations were taken::

1. Spain

Calls to such directions are considered only when calling to a cell phone, since a tourist is unlikely to sit near a landline phone for the entire trip.

MTS has a tariff option “Profitable international calls”. The monthly subscription fee is 50?. Calls to these five directions will cost 10 rubles per minute. The tariff option is compatible with other tariffs, for example, “Smart”.

Beeline has a "Welcome" tariff. The cost of switching to this tariff is 150?, there is no monthly subscription fee for the tariff, but there is a daily fee of 4.45? for options included in the tariff. The cost of calls to Turkey is 6? in a minute. Unfortunately, there is no information on other of the five tourist countries. On the tariff page following the link:

http://moskva.beeline.ru/customers/products/mobile/tariffs/details/dobro-pozhalovat/

Figure 10. Screenshot of the area from the Beeline “Welcome” tariff page

A transition that redirects to the address:

http://moskva.beeline.ru/customers/products/mobile/roaming/roaming-new/

The page interface contains three hyperlinks.

Figure 11. Interface of the “Roaming, long-distance and international communications” page

“Roaming when traveling around the world”, “Roaming when traveling around Russia” and “Calls from home to other cities and countries”. Obviously, prices for calls to other countries should be on the third hyperlink. The page at this link provides an interface for requesting the Beeline server for information.

Figure 12. Screenshot from the “Calls from home to other cities and countries” page after the request “Cyprus” with the “Welcome” tariff

If you check the price, for example, for Cyprus, then instead of the prices for Cyprus, the general tariff conditions will be indicated. There will be no specific conditions for Cyprus. In the “Calls to other countries” section there is a hyperlink called “According to international communication tariffs” with the address:

http://moskva.beeline.ru/customers/products/mobile/roaming/

For which this information is not available, as was shown earlier.

It is difficult to conclude whether the information is intentionally hidden or whether this is an interface design error. At the moment, I have not received any sane explanations from Beeline representatives, so I consider it impossible to compare Beeline tariffs in the absence of official information.

For calls to other countries, Megafon offers the “Call to all countries” option. For the first 30 days, a fee of 60? is charged, then a daily fee of 2? in a day. Calls to Italy, Spain, Cyprus and Greece cost 6? per minute, and to Turkey 8? in a minute.

Tariffs for migrants

The tariffs for migrants consider prices for the CIS countries and neighboring countries.

MTS in the “Profitable international calls” option provides calls to the CIS (except Azerbaijan and Belarus) at a price of 15? per minute and to Azerbaijan and Belarus at a price of 20? in a minute.

Beeline has special conditions for Tajikistan in its “Welcome” tariff. For calls to Beeline numbers 1 minute - 7?, subsequent minutes 1?. For calls to Beeline numbers in Armenia, Kazakhstan, Kyrgyzstan and to Kyivstar numbers in Ukraine - 2.5 ? in a minute. For calls to other numbers in Tajikistan, Armenia, Ukraine, Kazakhstan, Kyrgyzstan, as well as any numbers in Turkmenistan - 7? in a minute. A call to Azerbaijan and Belarus costs 13? in a minute. To Uzbekistan Beeline - 3 numbers? per minute, the remaining 4? in a minute.

In the “Call to all countries” option, calls from Megafon to Azerbaijan and Belarus cost 15? per minute, to Ukraine - 10? per minute, Armenia, Kazakhstan and Kyrgyzstan - 8? per minute, to Tajikistan and Turkmenistan - 6? per minute, to Uzbekistan - 5? in a minute. Megafon also has a special “Tajikistan+” option for Tajikistan. The first minute of conversation costs 7?, up to the 20th minute a minute costs 1?, and from 21 minutes it costs 7?.

Tariffs for businessmen

A businessman may have a need to communicate with any of the countries. The purpose of this review is to compare the price level for different tariffs, and not to create a complete comparison of prices for all countries, so 5 countries were selected where a businessman could call.

3. Germany

5. UK

MTS in the “Beneficial International Calls” option provides calls to China at 1.5? per minute, US 5? per minute, Germany and Great Britain 10? per minute, to Japan for 25? in a minute.

Beeline's "Welcome" tariff offers calls to China for 2? in a minute.

Megafon in the “Call all countries” option provides calls to China for 1? per minute, US 4 ? per minute, Germany at 6? per minute, UK at 11? per minute, to Japan at 9? in a minute.

Conclusion

For the considered tourist destinations, the most profitable option is Megafon’s “Call to all countries” option. There is not enough data on Beeline.

In the considered directions for migrants, Beeline and Megafon's prices compete; MTS is the most expensive.

In the areas considered for businessmen, prices from MTS and Megafon compete; there is not enough data for Beeline.

Roaming

Many operators provide roaming services, where it is possible to use your operator’s SIM card to connect to another operator’s network. There is long-distance and international roaming. Long-distance roaming may be needed if the subscriber is traveling on a train. Such a subscriber can quickly change his position on the map, so he cannot purchase a local SIM card from a local operator for each point through which he travels.

International roaming is usually more expensive than long-distance roaming.

For international roaming, MTS offers the “Zero Without Borders” service. The subscription fee for this service is 60? in a day. For some destinations, incoming calls for the first 10 minutes may be free, but after using up the limit of 200 minutes for the month, each incoming minute will cost 25? in a minute.

For Greece, Germany and Turkey, it will be more profitable to use the “Free Travel” service. The subscription fee is 100? in a day. The service offers 60 minutes per day for incoming and outgoing calls to Russian numbers.

Table 9. Price for “Zero Without Borders” by tourist destination

Most likely, it will not be difficult for migrants to acquire local tariffs, so this area will not be considered separately for the CIS countries.

For businessmen, it is important to always be in touch, on the same number, so they are unlikely to agree to change the SIM card to a local one.

Figure 13. Price for “Zero Without Borders” by business direction

Germany

Great Britain

Incoming calls (first 10 minutes), rubles per minute

Incoming calls (from 11 minutes), rubles per minute

Outgoing calls to Russian numbers (1 minute and starting from 6 minutes), rubles per minute

Outgoing calls to Russian numbers (from 2 to 5 minutes), rubles per minute

Outgoing calls to host country numbers, rubles per minute

Outgoing calls to numbers in other countries, rubles per minute

For international roaming, Beeline provides the “My Planet” service. The cost of connecting to the service is 25?. To all tourist destinations, incoming calls cost 15? per minute, outgoing to any country and within the host country 25? in a minute. The same prices for the neighboring countries and the previously mentioned business directions, with the exception of Japan, for which incoming 19? per minute, and outgoing 49 per minute.

For international roaming, Megafon provides two options: “The whole world” and “Around the world”. “The whole world” offers 30 minutes a day of free incoming calls with a subscription fee of 39? to the knocks. “Around the World” connects for 15? and has a daily subscription fee of 9?. Incoming and outgoing calls within Europe and the CIS, Turkey, Abkhazia and South Ossetia cost 6? per minute, for Japan 9? per minute, for the USA and China 36? in a minute. Megafon uses Callback for calls to Russia.

Conclusion

International roaming, unlike other tariffs, may have a paid incoming call, prices can reach 200? in a minute.

Market Review VoIP communications

In addition to cellular operators, there are operators providing Voice over IP (VoIP) telephony services. The main difference of this connection is the use of the Internet to connect subscribers. Some companies offer various VoIP services, often the connection of two or more subscribers of one VoIP company via the Internet is free. Such services are provided by Skype, Hangouts, Viber products.

VoIP can communicate not only via the Internet, but also via a cellular network. GSM-VoIP gateways are used for this. For the VoIP server, you can configure Least Cost Routing - automatic selection of a route for a call depending on the number. The server itself chooses the most favorable tariff for accessing the network, and therefore the cost of communication falls.

Prices for VoIP may depend on the exchange rate or be indicated in another currency; for comparison, all prices will be converted into rubles at the exchange rate as of May 26, 2015 indicated on the website of the Central Bank of the Russian Federation. Exchange rate for this date:

Table 10. Exchange rates as of May 26, 2015

Skype offers the following rates for calls to Cyprus cell phone numbers:

Table 12. Skype prices for calls to Cyprus

Skype offers the following rates for calls to Turkish cell phone numbers:

Table 13. Skype prices for calls to Turkey

Skype offers the following rates for calling US cell phones and landlines:

Table 14. Skype prices for calls to the USA

Skype offers the following rates for calls to cell phone numbers in Japan:

Table 15. Skype prices for calls to Japan

Skype offers the following rates for calls to cell phones and landlines in China:

Table 16. Skype prices for calls to China

Based on the considered tariffs for Skype, we can conclude that they can be more profitable than similar tariffs from the top three cellular networks.

Viber

Viber Out offers the following rates:

Table 17. Viber Out prices

A VoIP server can be installed on a regular computer, so VoIP solutions are often used within companies to communicate with clients or for intranet communication. This connection can be controlled by the system administrator. He can configure the security of communications and record conversations himself. You can configure DISA for the server so that calling clients can enter commands in DTMF mode that the virtual PBX will accept. You can also configure a gateway for such a server, which will allow you to make calls and receive a cellular signal.

Conclusion

Using VoIP can reduce communication costs, especially where there is free and stable internet. With VoIP you don't have to worry about roaming. VoIP tariffs are not as complex as those of cellular operators.

Telephony callback feature overview

In practice, Internet communications have a limited coverage area, and the Internet service itself costs money. At the same time, prices for VoIP remain attractive.

If there is a connection via the Internet, but it is unstable, then the Callback service comes to the rescue. The number where the subscriber wants to call is sent to the VoIP server, and the server calls the subscriber back via a cellular channel, after which it starts calling the other subscriber and connects these two subscribers. If it is not possible to use the Internet, you can send an SMS to the VoIP server number with the number of subscriber “B”, whom subscriber “A” is calling. There are also SIM cards that have the necessary parameters for Callback telephony built into them. These carriers save money by using VoIP, so their rates are cheaper.

Such services are provided by MTS. The code *137* is added to the subscriber's number, and # at the end. After sending the request, there is an incoming call; if you answer it, a connection will begin with the subscriber sent in the request. The cost of a call back depends on the subscriber's country of residence.

Megafon also provides the following services: a callback can occur when dialing a number normally if the Around the World service is activated.

There is another way to transfer the number of subscriber “B” to the server from subscriber “A” - using a DTMF signal. This method is good because any modern phone can generate DTMF signals, and incoming calls from many operators are free.

Since any phone with the Android operating system can generate DTMF signals, this method is the most universal, it requires minimal connection of additional services and does not require a SIM card. This is exactly the method that owners of their own VoIP servers can use to communicate with subscribers.

Analysis of programs whose functionality can be used to facilitate the use of the Callback function

Direct implementation Applications for DTMF Callback without being tied to an operator are difficult to find.

There are implementations of functions that can be useful when using DTMF Callback.

One of these implementations is most often called a prefixer. These programs catch an incoming or outgoing call and add the so-called prefix or suffix to it, that is, they add the phone number before or after the number, resulting in the following type of number: prefix xxxxxxxxx suffix, where x is any character of the number.

The task of these programs in the implementation of Callback will be to add a DTMF signal after a certain event.

Prefixer

The closest solution to this problem is Prefixer from the company 253°Below. This program contains rules in which you can configure:

c. Program schedule

d. The number that will be recorded in the call log

e. Numbers on which the rule will work

As follows from the program interface, rules can be configured for both incoming and outgoing calls. That is, the program should add a number when an incoming call arrives. In theory, if you send in suffix “,” for a pause or “;” to wait for a dial tone, you can send the number to DISA.

Figure 14. Screenshot of prefixer " A

For outgoing calls, the program actually adds a prefix and suffix, but for incoming calls, contrary to the configured rules, it does not add anything. That is, in practice it cannot be used for DTMF Callback communication, but it can be used to implement Callback from MTS.

There is a way to type a specific character or group of characters on the keyboard. Most often, programs with such functionality are used to expand the functions of the keyboard or Android control interface. To prevent the subscriber from entering the entire number from memory when the Callback server calls him back, he can use emulation of pressing a number. In this case, the phone will send DTMF signals as if the user entered them himself. There are quite a large number of programs with this functionality.

Gamekeyboard

To test this feature, we used Gamekeyboard from Locnet. To use the program you need root rights. This program contains macros in which you can record which characters will be entered at what interval. You can customize the size and position on the screen of the virtual button that will activate the macro. Creating a macro for this program from a phone is quite difficult, so its scope is limited to a small number of favorite numbers. This program supports profiles, so theoretically it is possible to develop an application that will create a macro for a dialed number and associate it with a button. This solution will allow the subscriber not to store the subscriber’s number in memory and not to dial the entire number. However, additional actions from the user are still required.

Root rights - rights to access all functions of UNIX systems. Since Android is a UNIX-like operating system, it also provides root rights, but phone manufacturers often restrict access to them. The manufacturer can make it difficult to obtain root rights by software and prohibit flashing. The manufacturer may itself provide a tool for obtaining root rights, but the user who received root rights waives guarantees. Despite this, it happens that the only way to implement some functionality is to have root access.

Conclusion

Most solutions for DTMF Callback are based on the use of a specific operator. While there are software tools that simplify the use of DTMF Callback, there is no comprehensive solution that is aimed specifically at solving this problem. It is beneficial for owners of their own servers for providing VoIP communications to use the DTMF method.

Technological part

Analysis of development tools for Android

The main language for writing custom applications for Android is Java. The programming interface (API) for working with Android functions involves the use of Java. To create applications written in Java for Android, Build Tools from the Android Software Sevelopment Kit (SDK) are used. There is a way to write applications in C/C++ to make applications run faster. The Native Development Kit is used for this. There is a C# development solution called Xamarin that allows you to create cross-platform applications. To develop in Python for Android, you can use one of several solutions listed in the table:

Table 18. Comparison of python implementations for Android

Python for Android

Android scripting

Python on a chip

The kivy framework allows you to create cross-platform applications. It can be linked with python for Android. Then it becomes possible to write cross-platform applications that will run on Android. There is also a way to use a wrapper to call Java classes from the Android API called PyJNIus.

Solutions such as kivy or Xamarin have advantages if the application is developed not only for Android, but also for other platforms. However, when using Android-specific features, you must use the Android API. This does not provide an advantage for the task at hand, since Android has its own specifics with the operation of telephone functions.

Facilities for Android development - SDK Tools

The main tools for Android development are included in the toolkit - SDK Tools. This package includes tools for working with virtual devices. Android Virtual Device Manager (AVD) is designed to operate and configure emulators. To create an emulator, a system image is used. Such images can be downloaded in the graphical or console interface of the Android SDK Manager program. In the Android SDK Manager interface, for one version of Android, you can select several images that will emulate different devices.

Figure 15. Screenshot of the Android SDK Manager GUI

One important tool is Android Debug Bridge (adb), a program designed to debug Android devices. Adb is launched from the command line and controlled through the console interface. Adb works with different devices connected to the computer:

· Devices connected via USB

· Devices connected via Wifi

· Emulated devices

Adb allows you to:

· install or remove applications from the device

· work with the command shell of the device

· work with packet manager

· launch Intent

· work with LogCat

The SDK includes a large set of tools that are somehow integrated into development environments, for example Build Tools are included in Eclipse or Android Studio.

Integrated Development Environment Android Studio

Currently, the official integrated development environment (IDE) for Android is Android Studio. This IDE is based on IntelliJ IDEA from JetBrains and includes a number of functions:

· Gradle scripts for building apk

· Build options and generate multiple apk

· Code templates

· Layer editor (layouts)

Application signing

· Built-in support for Google Cloud Platform and the ability to integrate Google Cloud Messaging and App Engine

Android Studio allows you to install assembled applications in parallel on several devices connected via adb.

Android Studio supports version control systems.

The source code editor in Android Studio has a number of features that make development easier:

· auto-completion of words

· hint about errors in the code

· syntax highlighting for java and xml files

· automatic import from the Android library if a class from it is used

· greying out variables that were not used

· commenting lines of code

· jumping through different project files in search of the highlighted word

Android Studio is a powerful tool that is recommended to be used when developing for Android, so we decided to use it in development.

telephony callback android programming

Overview of the Python programming language

Python is a high-level language that combines several programming paradigms, such as:

· Object oriented programming. In python, everything is an object: strings, classes, numbers, etc. If, for example, you take the number “1” and add the number “2” to it:

then the __add__ method will actually be called on object 1, which will receive an Integer type, so the following entry will give the same result:

· Dynamic typing. The type is set automatically during program execution. The advantage of this type of typing is the ease of writing programs and the rapid mastery of this method by the programmer. In Python, you can specify the type yourself. Using the "type" function you can find out the type of an object. Using the "int" and "float" functions you can change the type. So you can represent the number 1 as a string with the value 1 or a floating point number. Example:

>>> b = str(1)

>>> c = float(1)

If you check the type of variables, "a" will be "int", "b" will be "str", and "c" will be "float"

>>> print type(a)

>>> print type(b)

>>> print type(c)

· Strict typing. Python is generally considered a strongly typed object language.

· Functional programming. Python allows you to use recursion, lazy evaluation, and higher order functions

· Imperative programming. Python supports procedural programming method and modules can be used in python.

Python is considered a fairly simple language and is the most popular language to study in US colleges.

Python code is executed line by line, so often an error in the code can only be noticed after executing that line. Programs created using python for android take quite a long time to launch.

To run such an application, the technical means must be a communication device with the following characteristics:

· The device must have 10 MB of free memory in its internal memory to install the application and store its data.

· The device must have the following software:

a. Android 2.2 and higher

b. OpenGL ES 2.0

The internal memory requirements are determined by the fact that the installed application will contain python for android and kivy. To run python for android, you need OpenGL ES 2.0, which is available in Android starting with version 2.2.

Programming Language Overview Java

Java is an object-oriented programming language. With the help of a compiler, the Java source code is converted into byte code, which contains a set of instructions for the Java machine. This approach provides platform independence. In the case of Android development, the Java machine is Dalvik. Using such a machine can greatly reduce productivity.

The concept of Java in terms of object orientation is similar to python: “Java has a special superclass Object and all classes are its subclasses. Therefore, a reference variable of class Object can refer to an object of any other class."

Java has a flexible access control system, which is specified by the class modifiers private, public, protected, or the absence of a modifier:

Table 19. Modifiers and access in Java

Development of an interface for simplified use of the telephony function Callback

The simplest interface for the user is the standard interface of his system. The call algorithm when using the Callback function should not differ from the usual call initialization algorithm.

The interface of such a program should help implement the following functions:

1. Callback

o Launch the application when a call is initiated from the contact book (Contacts)

o Initializing a call to the telephony server

o Receiving a call from the telephony server

o Determining that a communication channel has been established

o Analysis of DTMF signals from the server

o Transmit DTMF signal during a call

2. Working with history

o Ability to delete information from the system call history log

o Ability to add information to the system call history log

3. Settings

o Enable/disable profile

o Ability to select a profile

o Ability to customize your profile

o Ability to add a profile

o Ability to delete profile

4. Profiles

o Ability to change the server number

o Ability to set a white list of server numbers

o Ability to specify the waiting time for a call back from the server

o Ability to specify the interval between sending DTMF signal

The application algorithm with these functions is as follows:

The user opens the application for the first time and creates a profile. In the profile, the user specifies the telephony server number. The user enters into the white list those numbers from which the telephony server will call him back. The user specifies the waiting time in the settings. If there is no call back from the server, the user will be able to continue using telephony without manually turning off the application.

After setting up the application, the user can call a person from the contact book. At this time, a menu for selecting an application with which you can make calls will appear. If the user selects DTMF Callback, the contact number will be saved by the application, and the application itself will initiate a call with the server. When the server disconnects and calls back, the application will answer the call and dial the saved number in touch tone, after which the user will need to wait for a connection with the called subscriber.

After the end of the conversation, the number of the subscriber to whom the user called should remain in the call log. Calculation of call time should begin from the moment of dialing.

Development of a prototype that demonstrates how to simplify the use of the Callback function

Based on their real capabilities and zero experience in developing Android, the minimum requirements for the prototype were developed:

1. The prototype must run on all modern Android devices from Android 2.1 to Android 5.1

2. The prototype should make it easier to dial the subscriber’s number when the telephony server calls back

3. When calling a subscriber’s number through a prototype, the call must be initiated to the telephony server number and at the same time remember the number to which the subscriber called

Initialize a call to a specified number

The first stage of development was writing an application that can make calls to the number specified in the application code. This method, when variable values ​​are hard-coded in the code and not taken from external sources, is called hard coding. This method is used specifically for quickly testing the application, so as not to dial the number every time.

It was decided to write in the python programming language, since I have experience writing in this language. To implement it, it was necessary to connect the Java class android.intent.action.CALL from the Android API. The purpose of this application is to test the ability of the application to call any subscriber. This function is needed so that after subscriber “A” calls the number of subscriber “B”, a call to the telephony server number begins. After implementing this function, it became clear that, despite my experience, writing applications for python comes up with many non-obvious problems, and as a result, the finished application takes too long to load, which is quite critical for telephony. It also became obvious that understanding the API without knowledge of the Java programming language would be very difficult. Since an understanding of the Java programming language was still required, and the final result in Java gave advantages, it was decided to rewrite the function for Java using Android Studio. Here is the code for the final function in Java:

public void Call(View view) (

mNumberTextView.setText("Called on " + tel.getText() + " Initialized");

String toDial = "tel:" + tel.getText().toString();

startActivity(new Intent(Intent.ACTION_CALL, Uri.parse(toDial)));

Receiving a number from the contact book

In order for an Android application to be called from another application, you can use explicit and implicit Intents. An explicit Intent specifies which class it should call:

Intent intent_about = new Intent(MainActivity.this, AboutActivity.class);

startActivity(intent_about);

The activity AboutActivity.class is registered in Android.Manifest.xml, so the system knows which activity should be launched.

In the implicit Intent, instead of the class that needs to be launched, the action that the system should react to is indicated. In the standard contact book (Contacts) in android, when called from it, the action ACTION_CALL_PRIVELEGED occurs. The “tel:” number is passed to this action. For example, we can use adb to call this action by writing:

adb -e shell am start -a android.intent.action.CALL_PRIVILEGED -d tel:911

Where 100 is the number where the phone will call. If you write the command

adb shell am start -a android.intent.action.CALL -d tel:911

In this case, there will be no call, since there will be no privileges to call such a number. Depending on the need, different applications can use different actions. If emergency calls are not expected, then ACTION_CALL will be used. This is a more common case for calls from a browser or application with a contact number.

On some firmware, an alternative application can be used as a contact book. The source code of this application itself may be closed. If in such applications the call is initiated in some other way, then it can be difficult to guess through which Intent the call is initiated. In this case, you can install an alternative contact book from Google Play or other trusted sources.

In order for the program to intercept the implicit Intent, you need to add an intent-filter to AndroidManifest.xml:

Since you only need to take the number from the contact book, “tel” is indicated in the scheme.

The Android operating system will now prompt you to call the application every time an ACTION_CALL or ACTION_CALL_PRIVILEGED Intent is called.

In order for the application to be able to use the number that was in “tel”, we need to use the getData() method in the class we need:

Floating window with button

There is a library called StandOut with which you can create a floating window. The library is open source and has examples. This library is distributed under the free MIT license. This license allows you to freely distribute software that contains this library. The library is supplied as is; the authors are not responsible for any damage it may cause.

Features of this library:

· Providing your own VIEW. Easy integration.

Floating window decorators:

1. floating window title

2. button that minimizes the floating window

3. button that closes the floating window

4. button for resizing the window

· A minimized window can be restored

· Creation of different types of windows

Windows can be moved

When testing examples from this library, it was discovered that floating windows can be on top of all windows, including during a call. This feature can be used to create a button that will dial the desired number in the dialer during a call.

In order to create a window, you need to write a class that will be an extension of the StandOutWindow class:

public class FloatingButton extends StandOutWindow (

public void createAndAttachView(int id, FrameLayout frame) (

LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);

View view = inflater.inflate(R.layout.floating_button, frame, true);

And in res/layouts there is a layer describing the interface of this window floating_button.xml.

Button for floating window

Similar documents

    Architecture and history of the Android operating system. Java programming language. Choosing a tool to implement an Android application. Software implementation of an Android application. Conducting testing of developed software.

    course work, added 01/18/2017

    Review of Android mobile OS. Selection of tools and technologies. Graphical interface prototype design. Characteristics and description of the user interface. Database design and development. Determining the list of required permissions.

    course work, added 09/13/2017

    Review of existing popular programs for viewing weather on Android OS. Operating systems of modern smartphones. Key features of Android, Java technology. Development of the software part, choice of language, description of the algorithm, its logical structure.

    course work, added 04/16/2014

    Implementation of telephone communication over an IP network using a set of protocols and equipment. Development of a dynamic call routing subsystem for a billing and management system in an IP telephony network. Basic requirements for a graphical user interface.

    thesis, added 11/08/2015

    Development of smartphone applications on Android OS for the Pharmacy pharmacy chain. Architecture of the Android operating system. Application architecture and implementation. Its functionality. Description of the mobile application. Calculation of costs for creating a product.

    thesis, added 06/17/2017

    Characteristics of the Android operating system used for mobile phones. Creating an Android project in the Eclipse development environment. General structure and functions of the manifest file. Android application components. Methods for marking.

    course work, added 11/15/2012

    General scheme of operation of an Android application. Development of an educational application for the Android operating system, the purpose of which is to develop speech through the pronunciation of tongue twisters. Description of the components of the developed application, its testing.

    thesis, added 02/04/2016

    Basic concepts of IP telephony and types of structure of IP telephony networks. Cisco Systems voice gateways for IP telephony. IP IVR as a means of automatically answering calls. The advantages of building a distributed Contact Center, the architecture of its construction.

    thesis, added 04/21/2016

    General characteristics of the Android operating system. Application development based on the creation of a file manager. Using the application, obtaining access to files stored in “cloud storage” on the Internet. Software cost calculation.

    thesis, added 04/03/2015

    Software development for the Android platform version 2.3: an information application for fans of a football team, with the ability to view events, statistics and other information about the team and its successes. Listing JsonDataManager.java.