This file contains hidden or 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
| class MainActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| val button = findViewById(R.id.button) | |
| val editText = findViewById(R.id.editText) as EditText | |
| button.setOnClickListener { |
This file contains hidden or 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
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| public class InitActivity { | |
| public InitActivity() { | |
| logger.debug("Activity loading...."); | |
| } | |
This file contains hidden or 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
| <?php | |
| /* | |
| Parameter Example | |
| $data = array('post_id'=>'12345','post_title'=>'A Blog post'); | |
| $target = 'single tocken id or topic name'; | |
| or | |
| $target = array('token1','token2','...'); // up to 1000 in one request | |
| */ | |
| public function sendMessage($data,$target){ | |
| //FCM api URL |
This file contains hidden or 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
| view.post(new Runnable() { | |
| @Override | |
| public void run() { | |
| int width = view.getWidth(); | |
| int height = view.getHeight(); | |
| //do something cool with width and height | |
| } | |
| }); |
NewerOlder