M madSac Active Member Licensed User Longtime User Nov 12, 2012 #1 I want to make my SMS application as default smsing application. Like on hitting send option comes to select an app to send SMS & make it default too
I want to make my SMS application as default smsing application. Like on hitting send option comes to select an app to send SMS & make it default too
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2012 #2 You can add an intent filter as described here: Making alternative SMS sender default in Android - Stack Overflow See also this tutorial (about intent filters): Intent Filters - Intercepting SMS messages in the background It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents). Upvote 0
You can add an intent filter as described here: Making alternative SMS sender default in Android - Stack Overflow See also this tutorial (about intent filters): Intent Filters - Intercepting SMS messages in the background It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents).
M madSac Active Member Licensed User Longtime User Nov 14, 2012 #3 Erel said: You can add an intent filter as described here: Making alternative SMS sender default in Android - Stack Overflow See also this tutorial (about intent filters): Intent Filters - Intercepting SMS messages in the background It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents). Click to expand... i used below code but it didn't worked...? AddManifestText( <activity android:name="MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <action android:name="android.intent.action.SENDTO" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="sms" /> <data android:scheme="smsto" /> </intent-filter> </activity>) Click to expand... Upvote 0
Erel said: You can add an intent filter as described here: Making alternative SMS sender default in Android - Stack Overflow See also this tutorial (about intent filters): Intent Filters - Intercepting SMS messages in the background It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents). Click to expand... i used below code but it didn't worked...? AddManifestText( <activity android:name="MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <action android:name="android.intent.action.SENDTO" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="sms" /> <data android:scheme="smsto" /> </intent-filter> </activity>) Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Nov 14, 2012 #4 It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents). Click to expand... This is why I wrote the above sentence... Upvote 0
It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents). Click to expand... This is why I wrote the above sentence...
M madSac Active Member Licensed User Longtime User Nov 16, 2012 #5 So what should i do now ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 16, 2012 #6 It is not possible to intercept SMS messages from apps that send them directly. Upvote 0
M madSac Active Member Licensed User Longtime User Nov 17, 2012 #7 Any method to just open application ...? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 17, 2012 #8 I'm sorry but I do not understand your question. Upvote 0
M madSac Active Member Licensed User Longtime User Nov 25, 2012 #9 Erel said: I'm sorry but I do not understand your question. Click to expand... can i just make app to appear in options menu when user open an contact to send sms. & also to make it as default app ? Upvote 0
Erel said: I'm sorry but I do not understand your question. Click to expand... can i just make app to appear in options menu when user open an contact to send sms. & also to make it as default app ?
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2012 #10 Have you followed the steps I wrote in post #2? The user should be able to choose your app. Upvote 0
M madSac Active Member Licensed User Longtime User Nov 25, 2012 #11 Erel said: Have you followed the steps I wrote in post #2? The user should be able to choose your app. Click to expand... yes, I followed may be I would be wrong somewhere Sorry, But can you please post the code........ I am again sorry if I irritated you....... Upvote 0
Erel said: Have you followed the steps I wrote in post #2? The user should be able to choose your app. Click to expand... yes, I followed may be I would be wrong somewhere Sorry, But can you please post the code........ I am again sorry if I irritated you.......
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2012 #12 You should add the intent filter to the activity. You shouldn't use AddManifestText. Instead use AddActivityText(main, ...) and only add the intent filter not the activity declaration. You can open AndroidManifest.xml after you compile your program to see the result. Upvote 0
You should add the intent filter to the activity. You shouldn't use AddManifestText. Instead use AddActivityText(main, ...) and only add the intent filter not the activity declaration. You can open AndroidManifest.xml after you compile your program to see the result.
M madSac Active Member Licensed User Longtime User Nov 30, 2012 #13 It worked ...but how to get mobile number of selected contact to an object/variable ? <code> AddActivityText(main,<intent-filter> <action android:name="android.intent.action.SENDTO" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="sms" /> <data android:scheme="smsto" /> </intent-filter>)</code> Upvote 0
It worked ...but how to get mobile number of selected contact to an object/variable ? <code> AddActivityText(main,<intent-filter> <action android:name="android.intent.action.SENDTO" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="sms" /> <data android:scheme="smsto" /> </intent-filter>)</code>
R Roger Garstang Well-Known Member Licensed User Longtime User Nov 30, 2012 #14 You will need to parse the Intent data to get any number or information passed to your application. (Activity.GetStartingIntent) Upvote 0
You will need to parse the Intent data to get any number or information passed to your application. (Activity.GetStartingIntent)
M madSac Active Member Licensed User Longtime User Dec 2, 2012 #15 Roger Garstang said: You will need to parse the Intent data to get any number or information passed to your application. (Activity.GetStartingIntent) Click to expand... Can you please explain it i am new to b4a. Upvote 0
Roger Garstang said: You will need to parse the Intent data to get any number or information passed to your application. (Activity.GetStartingIntent) Click to expand... Can you please explain it i am new to b4a.
M madSac Active Member Licensed User Longtime User Dec 2, 2012 #16 done thank you for guiding me i used below code Code: Copy Dim tmpint As Intent Dim su As StringUtils tmpint=Activity.GetStartingIntent If tmpint.Action="android.intent.action.SENDTO" Then Dim splt() As String splt=Regex.Split(":", tmpint.GetData) tomobile.text=su.DecodeUrl(splt(1),"UTF8") End If Upvote 0
done thank you for guiding me i used below code Code: Copy Dim tmpint As Intent Dim su As StringUtils tmpint=Activity.GetStartingIntent If tmpint.Action="android.intent.action.SENDTO" Then Dim splt() As String splt=Regex.Split(":", tmpint.GetData) tomobile.text=su.DecodeUrl(splt(1),"UTF8") End If