android - how can i send data from mobile phone to sony watch not in on resume because if watch is already open then it will not work -


I am currently developing a simple application in which I need to send data from mobile which is working perfectly It is ... I have done this by using the method of preference. But the problem occurs when the device is not in the sleep state, it will show the previous data, so I have to take some steps and call the method again. If so, then it will be completely ... so what do i basically The Smart Clock is getting triggered (show the screen lightly) when I click on the Android app button and whatever I want leaves the app when I leave the app from mobile .... This code is Which is working on restarting me for the event

  @override resume at public zero (log). ("On On On", "On Resume"); SetScreenState (Control.Intents.SCREEN_STATE_ON); Shared references pref = mContext.getSharedPreferences ("text", reference.MODE_PRIVATE); String text = pref.getString ("textdowndream", "test"); Bundle bundle 1 = new bundle (); Bundle 1. Input (Controls .INTRA_LAYOUT_REFERENCE, R.id.txtvSWText); Bundle 1.putstring (control intent .EXTRA_TEXT, text); Bundle [] BundleData = New Bundle [1]; Bundle data [0] = bundle 1; Showout (R.layout.ed edits_ edit, bundle data); }  

If there is still doubt then I know ... I will try to understand more ... any help on this will be appreciated

Thanks

How to use a broadcast receiver

  // Send this intent with intentions = new intent ("com.yourApp.yourAppAction"); Intent.setPackage ("com.yourApp.yourMainApp"); Intent.putExtra ("Event", "Update Display"); Ctxt.sendBroadcast;  

  // and then get it and update the extension in the Registry register register (this); Private Zero Register Broadcast Receiver (Reference Reference) {IntentFilter IF = New IntentFilter (); IF.addAction ("com.yourApp.yourAppAction"); Context.registerReceiver (MREC, if); } Private Broadcast Receiver MRECRE = New Broadcast Receiver () {@ Override Public Records on Receive (Context Reference, Intent of Intent) {String Event = Intent.Tetting Extra ("Event"); If (event.equals ("updateDisplay")) {showBitmap (yourUpdatedBitmap); }}};  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -