Tag: android manifest

Android意图filter的特定文件扩展名?

我希望能够从网上下载一个具有特定扩展名的文件,并将其传递给我的应用程序来处理它,但我一直无法弄清楚意图filter。 文件types不包含在mimetypes中,我尝试使用 <data android:path="*.ext" /> 但我无法得到这个工作。

在Android中发送和接收短信和彩信(前吉塔Android 4.4)

我已经想出了如何发送和接收短信。 为了发送SMS消息,我必须调用SmsManager类的sendTextMessage()和sendMultipartTextMessage()方法。 要接收SMS消息,我必须在AndroidMainfest.xml文件中注册一个接收器。 然后我不得不重写BroadcastReceiver的onReceive()方法。 我已经包含了下面的例子。 MainActivity.java public class MainActivity extends Activity { private static String SENT = "SMS_SENT"; private static String DELIVERED = "SMS_DELIVERED"; private static int MAX_SMS_MESSAGE_LENGTH = 160; // —sends an SMS message to another device— public static void sendSMS(String phoneNumber, String message) { PendingIntent piSent = PendingIntent.getBroadcast(mContext, 0, new Intent(SENT), 0); PendingIntent […]

Android – 禁用横向模式?

如何禁用我的Android应用程序中的一些视图的横向模式?

Android意图过滤器:将应用与文件扩展名关联

我有一个自定义的文件类型/扩展名,我想要关联我的应用程序。 据我所知,数据元素是为了这个目的,但我不能得到它的工作。 http://developer.android.com/guide/topics/manifest/data-element.html根据文档和大量的论坛帖子,它应该像这样工作: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:mimeType="application/pdf" /> </intent-filter> 那么,这是行不通的。 我做错了什么? 我只是想声明自己的文件类型。