forked from cory/tildefriends
		
	With approximately this code, I was able to establish an SHS connection with my phone.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4204 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
		| @@ -4,6 +4,7 @@ | ||||
| 	versionCode="1" | ||||
| 	versionName="0.0.4"> | ||||
| 	<uses-sdk android:minSdkVersion="16"/> | ||||
| 	<uses-permission android:name="android.permission.INTERNET"/> | ||||
| 	<application android:label="Tilde Friends"> | ||||
| 		<activity android:name=".MainActivity"> | ||||
| 			<intent-filter> | ||||
|   | ||||
| @@ -11,7 +11,9 @@ public class MainActivity extends Activity { | ||||
| 		super.onCreate(savedInstanceState); | ||||
| 		setContentView(R.layout.activity_main); | ||||
| 		TextView text = (TextView)findViewById(R.id.my_text); | ||||
| 		Log.w("tildefriends", String.format("external files dir is %s", getFilesDir().toString())); | ||||
| 		Log.w("tildefriends", String.format("getFilesDir() is %s", getFilesDir().toString())); | ||||
| 		Log.w("tildefriends", String.format("getPackageResourcePath() is %s", getPackageResourcePath().toString())); | ||||
| 		Log.w("tildefriends", String.format("getPackageCodePath() is %s", getPackageCodePath().toString())); | ||||
| 		setFilesPath(getFilesDir().toString()); | ||||
| 		text.setText(getMessage()); | ||||
| 	} | ||||
|   | ||||
| @@ -362,6 +362,7 @@ static int _tf_run_task(const tf_run_args_t* args, int index) | ||||
| 		result = 0; | ||||
| 	} | ||||
| 	tf_task_destroy(task); | ||||
| 	tf_printf("_tf_run_task is done.  Goodbye.\n"); | ||||
| 	return result; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -2585,7 +2585,7 @@ static void _tf_ssb_send_broadcast(tf_ssb_t* ssb, struct sockaddr_in* address) | ||||
| 	int r = uv_udp_try_send(&ssb->broadcast_sender, &buf, 1, (struct sockaddr*)&broadcast_addr); | ||||
| 	if (r < 0) | ||||
| 	{ | ||||
| 		tf_printf("failed to send broadcast %d: %s\n", r, uv_strerror(r)); | ||||
| 		tf_printf("failed to send broadcast for %s (%d): %s\n", address_str, r, uv_strerror(r)); | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user