Leaning Guideline: Database : MySQL. [ 3 days ] Programming Knowledge PRABEESH R K Simplified Coding PRABEESH R K - Android SQLite MySQL Sync - 01 - Understand the Application . API: REST API: INTEGRATING PHP MYSQL REST API WITH AN ANDROID APP
পোস্টগুলি
মার্চ, ২০১৮ থেকে পোস্টগুলি দেখানো হচ্ছে
Alarm Schedule After some times:
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Alarm Schedule After some times: à Like Clash of royal chest Box [take 3/1 hours to open] =============================. 1. Take time as milliseconds from user :- activity.xml file 2. Make a Java class [ Alarm.java ] which extend by BroadcastReceiver class … public class Alarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast. makeText (context, “Alarm ..... “ , Toast. LENGTH_LONG ).show(); Vibrator v = (Vibrator)context.getSystemService(Context. VIBRATOR_SERVICE ); v.vibrate( 10000 ); } } 3. Change the [ AndroidManifest.xml ] file à last part of <application> …………………. < receiver android :name= ”.Alarm” /> </...
Android & Wifi
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Android & Wifi get my IP get wifi information https://stackoverflow.com /questions/6064510/how-to-get-ip-address-of-the-device-from-code https://stackoverflow.com/questions/32120773/how-to-detect-ip-of-a-device-connected-to-the-same-network how-to-transfer-files-using-wi-fi-pair-connection-in-android WiFiShareFilesExampleAndroid/app/src/main/res/layout developer.android.com/p2p/WifiP2pManager.html -------------------------------------------------------------------------------------------------- When an application needs to fetch the current list of peers, it can request the list of peers with requestPeers(WifiP2pManager.Channel, WifiP2pManager.PeerListListener) . When the peer list is available onPeersAvailable(WifiP2pDeviceList) is called with the device list. --------------------------------------------------------------------------------------------------
Calendar / current time / date, hour, minutes, seconds, miliseconds
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
/*All about Calender */ Calendar now = Calendar. getInstance (); // public String day,hour,minutes,seconds; day = String. valueOf (now.get(Calendar. DAY_OF_MONTH )); hour = String. valueOf (now.get(Calendar. HOUR )); minutes = String. valueOf (now.get(Calendar. MINUTE )); seconds = String. valueOf (now.get(Calendar. SECOND )); /*All about Calender */
Interval / delay / Timer / wait for times. / thread / interval
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Timer Class Timer.html A facility for threads to schedule tasks for future execution in a background thread. Tasks may be scheduled for one-time execution, or for repeated execution at regular intervals. Timer timer = new Timer(); timer.schedule( new TimerTask() { @Override public void run() { //do whatever task you want to do after 10 seconds mediaPlayer .stop(); } }, 10000 ); Handler Class Handler.html Best Handlers are the best way of communication between the background and UI thread. Generally, Handlers are associated with message Queue of a Thread and they are used to send messages and runnable to the Message. Handler Used to communicate between the UI and Background thread. Handler handler = new Handler(); handler.postDelayed( new Runnable() { @Override public void run() { ...
Database [ SQLite Database ] [ local database ]
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Android SQLite Database SQLite is a local database, so it doesn't need any server or any online place to keep the date. that's why no need for any ODBC / JDBC queries /connection for its functionality. It saves its data into a text file and it saves locally into your mobile or Android device. SQLite is an open source database. SQLite supports standard relational database features. Android comes in with built-in SQLite database implementation. so you don't need to install any extra libraries to use SQLite with Android. To create and upgrade a database in your Android application : you create a subclass of SQLiteOpenHelper class. in the constructor of your subclass, you call the super() method of SQLiteOpenHelper . Start Code: we are going to open an Android project. then we are going to create a java class [ ex: DatabaseHelper .java ] for handling the SQLite database. this class extends SQLiteOpenHelper . implements all the @O...
Play MP3/sound / audio / music with Media player:
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Tab / viewpager / sliding / fragments /
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Sliding Tabs 1. 1st we need 2 library dependencies: compile 'com.android.support:design:25.3.1' compile 'com.android.support:support-v4:25.3.1' 2. Take some Fragments [Blank]: tab1, tab2, tab3 e.t.c 3.Now the Host Activity [ex: MainActivity.java ] should implement all the tabs: [and ovverride methods] public class MainActivity extends AppCompatActivity implements Tab1.OnFragmentInteractionListener, Tab2.OnFragmentInteractionListener, Tab3.OnFragmentInteractionListener, Tab4.OnFragmentInteractionListener { here my host activity is mainActivity and I have 4 tabs so ..... 4. take ViewPager & TabLayout in Host Layout [ex: activity_main.xml] : < android.support.v4.view.ViewPager android :id= "@+id/pager" android :layout_width= "match_parent" android :layout_height= "0dp" android :layout_weight= "4" > </ android.support....
Fragment
- লিঙ্ক পান
- X
- ইমেল
- অন্যান্য অ্যাপ
Fragment or Sub Activity: A part of an activity. https://developer.android.com/guide/components/fragments.html Why we use Fragment: 1. Space Utilize 2. Code Reuse. cause fragment can be used just as a template. [ ex: login form use in 5 activity but code once ] we can change a part of any activity without changing full activity... that part of activity name is fragment. A Fragment represents a behavior or a portion of user interface in an Activity . You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you can reuse in different activities). the perfect example for a fragmen...